290 likes | 550 Views
MID311. Windows Communication Foundation RIA: Ready for Business. Brian Noyes Chief Architect IDesign Inc ( www.idesign.net ) . About Brian. Publishing Developers Guide to Microsoft Prism 4, O’Reilly & Assoc., March 2011
E N D
MID311 Windows Communication Foundation RIA: Ready for Business Brian Noyes Chief Architect IDesign Inc (www.idesign.net)
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
Agenda • WCF RIA Services Overview • Querying and Updating Data with RIA Services • Data Validation • Security & Integration • Customer View: Cactus Software
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 Presentation Services Entities Validation Business Logic Data Access DB
The Benefits Built on / Simplifies WCF Flexible Data Sources Client Query / Updates Change Tracking Security Shared Validation
What do you need? • Silverlight Tools for Visual Studio 2010 • RTW Core bits (v1) • RIA Services Toolkit • Other endpoint types (SOAP, JSON) • ASP.NET support for consuming domain service in process • WCF RIA Services SP1 (shipped with VS 2010 SP1) • Complex types support for child objects • Sharing entities across domain services • Better data binding to client collection types • Various other improvements
Coming Soon in SP2 • MVVM Support • EF Code First • DateTimeOffset • Support for SL5
Agenda • WCF RIA Services Overview • Querying and Updating Data with RIA Services • Data Validation • Security & Integration • Customer View: Cactus Software
Application Architecture Client App • Web project • Silverlight host • Domain Services • Client project • Generated code • DomainContext classes • One per domain service View/ViewModel DomainContext + Entities Server Host DomainService Data Access + Entities DB
Querying and Updating Data With RIA Services Brian Noyes Chief Architect, IDesign demo
Entities • The data you pass between client and service • Entity Framework • LINQ to SQL • POCO
Query Operations • Return collections or individual objects • Support deferred execution through IQueryable<T> • Load through DomainDataSource • Load programmatically with DomainContext
Update Operations • Entity changes are cached in the client DomainContext • Contains an EntityContainer that tracks changes • Sent as a batch to the service • Including original version for optimistic concurrency • Service executes batch, calling Insert, Update, and Delete methods with one entity per method call • Returns server updated entities (i.e. PK Ids) and refreshes the client cache
Agenda • WCF RIA Services Overview • Querying and Updating Data with RIA Services • Data Validation • Security & Integration • Customer View: Cactus Software
RIA Services Validation • Seamless client and server validation options • Data Annotation Attributes • Server Update method logic • Async [Invoke] method execution
Validating Data Brian Noyes Chief Architect, IDesign demo
Agenda • WCF RIA Services Overview • Querying and Updating Data with RIA Services • Data Validation • Security & Integration • Customer View: Cactus Software
RIA Services Security • Authentication and Authorization • Silverlight application login or web application host login • Declarative security model in services • Client security context • Populated by service call • Leverages Membership, Role, and Profile providers • Can use whether you use RIA Services for other service needs
RIA Services – Security Brian Noyes Chief Architect, IDesign demo
Exposing OData, SOAP, JSON • You can expose your domain services via: • OData • REST – ATOM standard • Read only • SOAP • BasicHttpBinding • JSON • REST – JSON serialization
Agenda • WCF RIA Services Overview • Querying and Updating Data with RIA Services • Data Validation • Security • Customer View: Cactus Software
RIA in the Real WorldCACTUS Software Jeremy Marsch, Director, Software Development Matt Goodwin Director, Software Architecture customer
Summary • Rich client side functionality for entity-based CRUD and service operations • Async service calls • Validation • Security • Error handling • No WCF knowledge needed • RAD focused without compromising your architecture • 10 Part Series on WCF RIA Services: http://tinyurl.com/wcfriaseries E-mail: brian.noyes@idesign.net Blog: http://briannoyes.net Twitter: @briannoyes
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub. Track Resources • Windows Azure Platform Training Kit • Windows Server AppFabric Training Kit • BizTalk 2010 Developer Training Kit • AppFabric Team Blog • Windows Azure AppFabric on MSDN • Windows Server AppFabric on MSDN
Resources • Connect. Share. Discuss. http://northamerica.msteched.com Learning • Sessions On-Demand & Community • Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers http://microsoft.com/technet http://microsoft.com/msdn