1 / 30

Mastering WCF RIA Services

CL07. Mastering WCF RIA Services. Dinesh Kulkarni Program Manager Developer Division Microsoft Corporation. Agenda. WCF RIA Services in context A look “under the hood” Using RIA Services effectively. Agenda. WCF RIA Services in context A look “under the hood”

Antony
Télécharger la présentation

Mastering 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. CL07 Mastering WCF RIA Services Dinesh Kulkarni Program Manager Developer Division Microsoft Corporation

  2. Agenda • WCF RIA Services in context • A look “under the hood” • Using RIA Services effectively

  3. Agenda • WCF RIA Services in context • A look “under the hood” • Using RIA Services effectively

  4. RIA Services in n-tier applications Trust Boundary Framework, tools and services with prescriptive pattern for n-tier applications Web Service Data Access Layer (DAL) App Logic App Logic View Database

  5. Windows Communication Foundation (WCF) Programming Model Core Services Web HTTP Services Data Services RIA Services Workflow Services Service Model Data Contract Service Contract Service Behavior Channel Model Formats (Atom, JSON, XML,…) Transports (HTTP, TCP, …) Protocols (SOAP, HTTP, OData, …)

  6. Design principles • End-to-end view of an application: framework, pattern, tooling and services • Prescriptive approach to app logic • DAL-neutral and targets multiple presentation technologies

  7. Data access & presentation neutral App Logic XML,JSON, Binary

  8. Agenda • WCF RIA Services in context • A look “under the hood” • Using RIA Services effectively

  9. Agenda • WCF RIA Services in context • A look “under the hood” • Design-time view • Run-time view • Services • Using RIA Services effectively

  10. Agenda • WCF RIA Services in context • A look “under the hood” • Design-time view • Run-time view • Services • Using RIA Services effectively

  11. Design-time view Solution (Application) Client project Server project Entities Entities Data Access Layer (DAL) Views DomainService DomainContext Build, reflect & code-gen

  12. Design-time view Demo Writing app logic and using generated code

  13. Code gen recap … Server project Client project Generated code DishViewDomainContext: DomainContext class Plate: Entity EntityQuery<Plate> GetPlatesQuery(…) CreateEntitySet<Plate>(EntitySetOperations.Edit) Restaurant.FeatureOnSite(); [EnableClientAccess()] DishViewDomainService: DomainService IQueryable<Plate> GetPlates(…) void UpdatePlate(Plate p) void FeatureOnSite(Restaurant r)

  14. Agenda • WCF RIA Services in context • A look “under the hood” • Design-time view • Run-time view • Services • Using RIA Services effectively

  15. Run-time view (entity lifecycle) Application Silverlight Web server DomainContext DomainService Data Access Layer (DAL) Views Query Entities Entities Submit Submit Results Results Load context.Load(GetRestaurantsQuery(…).Skip(10).Take(10)) context.SubmitChanges() GetRestaurants(…).Skip(10).Take(10) Submit(changeSet)

  16. Run-time view Demo Query w/ LINQ & CUD w/ unit of work

  17. Summary • Entity lifecycle • Query • Unit of work: insert, delete, update, custom update • DomainContext • Bindable collections, entities • Async support • Id management, change tracking • DomainService • CRUD support • Option of open service layer with WCF

  18. Agenda • WCF RIA Services in context • A look “under the hood” • Design-time view • Run-time view • Services • Using RIA Services effectively

  19. Services • Authentication • Roles • User profile • All integrate w/ ASP.NET infrastructure

  20. Services Demo Authentication and roles

  21. Summary • Authentication & roles • Declarative: class / method-level • Integrated into Query / Submit processing

  22. Agenda • WCF RIA Services in context • A look “under the hood” • Using RIA Services effectively

  23. Using RIA Services effectively Do Don’t Deploy with anon access Expose non-essential entities/ operations or allow free-form access to data Use a single large DomainService class • Require authentication / roles • Authenticate w/ https • Utilize query composition • Filter, sort, page • Consider custom update • Factor into multiple DomainService classes / libraries • Handle errors on server • Use declarative validation

  24. Call to action • Try RIA Services bits • Beta on .NET 3.5 SP1/ VS 2008 / Silverlight 3 • Preview on Dev10 / Silverlight 4 (this will evolve into V1 RTW) • Give us feedback and join us on forum • Home page • http://silverlight.net/riaservices/

  25. Related sessions

  26. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  27. Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….

  28. Microsoft Confidential Using the right tool for the job All programming models can leverage the wide-ranging set of behaviors and protocols We have good integration in SL4/Dev10, that gets even better in Dev11

More Related