Presentation is loading. Please wait.

Presentation is loading. Please wait.

Be The Master Of Your Domain with POCO WCF RIA Services SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 27 Sep 2011.

Similar presentations


Presentation on theme: "Be The Master Of Your Domain with POCO WCF RIA Services SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 27 Sep 2011."— Presentation transcript:

1 Be The Master Of Your Domain with POCO WCF RIA Services SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 27 Sep 2011

2 Chief Architect IDesign Inc. (www.idesign.net) Microsoft Regional Director (www.theregion.com) Microsoft MVP Silverlight About Brian Publishing Developers Guide to Microsoft Prism 4, O’Reilly & Assoc., March 2011 Developing Applications with Windows Workflow Foundation, LiveLessons training DVD, June 2007 Smart Client Deployment with ClickOnce, Addison Wesley, January 2007 Data Binding in Windows Forms 2.0, Addison Wesley, January 2006 MSDN Magazine, MSDN Online, CoDe Magazine, The Server Side.NET, asp.netPRO, Visual Studio Magazine Speaking Microsoft TechEd US, Europe, Malaysia, Visual Studio Connections, DevTeach, INETA Speakers Bureau, MSDN Webcasts E-mail:brian.noyes@idesign.netbrian.noyes@idesign.net Twitter: @briannoyes Blog:http://briannoyes.nethttp://briannoyes.net

3 RIA Services Overview Defining POCO Domain Services Defining Entities Handling Concurrency Entity Relationships Agenda

4 WCF RIA Services Overview Simplifies building N-tier Line of Business (LOB) applications – Highly dependent on push pull of data – Can use for non-CRUD operations as well Architecture and tools for building the glue code between the client and the back end – Streamlined pipeline for data and operations between client and server – Clients: Silverlight & ASP.NET – Future releases: ASP.NET client side JavaScript (WCF JQuery) Business Logic Entities Validation Service Access Services Entities Validation WCF RIA Services DB Data Access Presentation

5 Domain Service Classes LinqToEntitiesDomainService – Can use with Entity Framework Database-first or Model-first models – Encapsulates access to the ObjectContext – Simplifies data access coding slightly – Not as efficient as you might like DomainService – Up to you to implement data access and entity types – Still can leverage the full capabilities of RIA Services

6 Defining Entities No specific base class or interface requirements Plain Old CLR Objects (POCO) Define properties Must have a property or properties that are treated as a [Key] property – RIA Services needs to be able to uniquely identify each entity it transfers May need additional attributes for related object properties, concurrency, and validation Can use metadata classes

7 Handling Concurrency Can lookup the original value on the server side from the data source By default, RIA Services will not round trip original values of entity properties from the client for updates – Bandwidth optimization Can indicate the desire for original values with the [RoundtripOriginal] attribute – Class or property level Access the ChangeSet property – GetOriginal method

8 Handling Relations Some properties on your entities may point to other entities – Child collections (i.e. Task has a collection of TimeEntries) – Parent / related object (Task may have a related Customer) Decorate those properties with [Include] and [Association] attributes

9 Summary /Resources POCO Entities give you maximum control over your object model Need some attributes to decorate your entities Do whatever kind of data access from your domain service you need Still get full client framework richness Silverlight Show WCF RIA Services Series: http://tinyurl.com/wcfriaserieshttp://tinyurl.com/wcfriaseries E-mail:brian.noyes@idesign.netbrian.noyes@idesign.net Twitter: @briannoyes Blog:http://briannoyes.nethttp://briannoyes.net


Download ppt "Be The Master Of Your Domain with POCO WCF RIA Services SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 27 Sep 2011."

Similar presentations


Ads by Google