1 / 9

Be The Master Of Your Domain with POCO WCF RIA Services

Be The Master Of Your Domain with POCO WCF RIA Services. SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 27 Sep 2011. About Brian. Publishing Developers Guide to Microsoft Prism 4, O’Reilly & Assoc., March 2011

kitra
Download Presentation

Be The Master Of Your Domain with POCO WCF RIA Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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 Chief ArchitectIDesign Inc. (www.idesign.net) Microsoft Regional Director(www.theregion.com) Microsoft MVP Silverlight E-mail: brian.noyes@idesign.net Twitter: @briannoyes Blog: http://briannoyes.net

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

  4. WCF RIA Services Overview Entities Validation Service Access • 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) WCF RIA Services Services Entities Validation Presentation Business Logic Data Access DB

  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/wcfriaseries E-mail: brian.noyes@idesign.net Twitter: @briannoyes Blog: http://briannoyes.net

More Related