Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

.NET RIA Services Architecture Overview


Published on

Mostly taken from Nikhil Kothari’s excellent presentations…

Published in: Technology, Business
  • Be the first to comment

.NET RIA Services Architecture Overview

  1. 1. Building Business Centric Applications with Silverlight 3 and .NET RIA Services <br />Brad Abrams<br />Product Unit manager<br />Microsoft<br /><br />Twitter: @brada<br />
  2. 2. Vision and Goals<br />Simplify RIA-style application development<br />n-tier is hard, and un-natural<br />Focus on data-driven apps<br />Bring ASP.NET-style productivity to RIA development<br />Building blocks for data, security, etc.<br />Focus on scenarios<br />
  3. 3. Value Propositions<br />Focus on data in an end-to-end manner<br />A unified story for client and server development<br />A prescriptive framework that targets key scenarios, and leads the common developer to a pit of success<br />
  4. 4. Service<br />Rich Internet Application<br />Browser<br />Application<br />DB<br />Other Applications<br />A Unified Story for Client and Server<br />Client is an extension of the server<br />A single logical application<br />Presentation<br />Logic<br />Data Access Layer<br />App<br />Logic<br />HTML<br />Network<br />Services<br />
  5. 5. A Prescriptive Pattern<br />DomainService<br />Stateless CRUD + App Logic<br />class LibraryService<br />IQueryable&lt;Books&gt; GetBooks()<br />IQueryable&lt;Book&gt; SearchBooks(string)<br />void AddBook(Book)<br />void RequestBook(Book)<br />Validation and authorization rules,<br /> Application workflows, …<br />Data Model<br />class Book<br />DomainContext<br />Stateful view + Bindable Data<br />class LibraryContext<br />EntityList&lt;Book&gt; Books { get }<br />EntityQuery&lt;Book&gt; GetBooksQuery()<br />EntityQuery&lt;Book&gt; SearchBooksQuery(string)<br />void RequestBook(Book)<br />class Book<br />Data members + Validation<br />void RequestBook()<br />Data Model +<br />Metadata +<br />Shared Code<br />Services<br />Rich Internet Application<br />Presentation<br />Logic<br />Data Access Layer<br />App<br />Logic<br />Network<br />DomainContext<br />Data<br />Service<br />DB<br />Under the covers infrastructure<br />
  6. 6. A Single Pattern that Scales and Grows<br />Support for multiple presentation tiers and data access technologies<br />Databases<br />ADO.NET,<br />ORMs (LTS, EF, …)<br />.NET Clients<br />Silverlight, WPF<br />Standards Clients<br />JavaScript<br />App<br />Logic<br />CLR Lists/Objects<br />Repository<br />(nHibernate, …)<br />Server Rendering<br />HTML, SEO,<br />Printing, …<br />SOAP, XML, JSON,<br />Binary<br />Services<br />REST/SOAP<br />(Azure, …)<br />Services<br />WCF<br />Unit Test Code<br />
  7. 7. Summary<br />RIA Services focuses on writing n-tier apps by treating them as one logical application<br />Still get n-tier goodness from the architecture/pattern without the plumbing getting in your way<br />RIA Services provides a pattern for encapsulating application logic on the middle tier that can be useful in a variety of scenarios<br />DAL-agnostic<br />Multiple presentation layers<br />
  8. 8. Roadmap and Resources<br />First public preview at MIX ’09<br /><br />Links to bits, docs, samples, forums<br />Next big release is at PDC ‘09<br />Slides + sample code<br /><br />Other blogs<br /><br />
  9. 9. Extra: ViewModel<br />
  10. 10. Patterns for Separating UI and Logic<br />MVC, MVP, ViewModel, …<br />General approach<br />Separate interaction logic from view<br />Decouple components of app<br />Motivations<br />Loosely coupled building blocks<br />Designer-developer workflow<br />Greater degree of testability<br />User Interface<br />Interaction Logic<br />Data Model<br />
  11. 11. ViewModel Pattern<br />MVVM (Model – View – ViewModel), Presentation Model<br />Basic idea<br />View model encapsulates application behavior independent of view<br />View is responsible for rendering and user input<br />Leverage data-binding and commanding to hook up view to its view model<br />
  12. 12. Hello WorldFrom code-behind to ViewModel<br />demo<br />
  13. 13. Interaction Logic in Code-behind<br />View<br />XAML<br />Data Model<br />Code-Behind<br />Event Handlers<br />
  14. 14. Interaction Logic in View Model<br />View<br />XAML<br />Code-Behind<br />Property change and other event notifications<br />Data-binding and commands<br />View Model<br />Data Model<br />State + Operations + Notifications<br />
  15. 15. question & answer<br />
  16. 16. Required Slide<br />© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.<br />The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.<br />