Developing with WCF RIA Services Quickly and Effectively Nikhil Kothari Software Architect, Microsoft Corporation Blog:

Slides:



Advertisements
Similar presentations
Svetlin Nakov Director Training and Consulting Activities National Academy for Software Development (NASD) ASP.NET 3.5 New Features.
Advertisements

Data Access Layer (DAL) App Logic Database View Web Service App Logic Trust Boundary.
Data Access Layer (DAL) App Logic Database View Web Service App Logic App Logic Trust Boundary.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Change the Rules Distributed data apps with.NET Zlatko Knezevic Developer Evangelist Microsoft
Jeff Derstadt Senior Development Lead Microsoft Corporation Patterns & Architecture.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Be The Master Of Your Domain with POCO WCF RIA Services SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 27 Sep 2011.
WCF RIA Services - Querying and Updating Data SILVERLIGHTSHOW.NET WEBINARS SERIES BRIAN NOYES, CHIEF ARCHITECT, IDESIGN INC 2 FEB 2011.
Ronnie Saurenmann Principal Architect Microsoft Switzerland
1 SL4BIZ - Silverlight for Business. 2  Some points… › Microsoft MVP › MCP, MCTS. › Trainer (hopefully MCT in short ;) › Technical writer & speaker.
From legacy desktop application to Single Page Application By Jens Munk Freelance consultant.
Ronnie Saurenmann Microsoft Switzerland
Creating a SharePoint App with Microsoft Access Services
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
N-Tier Architecture.
Building Offline/Cache Mode Web Apps Using Sync Framework Mike Clark Group Manager Cloud Data Services Team
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Entity Framework Code First End to End
@benday #vslive Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
RIA Services Master Class Presenter: Kevin Grossnicklaus November 30 th, 2010.
Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies.
Michele Leroux Bustamante IDesign DTL201 Michele Leroux Bustamante Chief Architect IDesign: Microsoft Regional Director,
Microsoft Confidential ASP.NET Broadest reach Most mature dev platform Silverlight Broad reach Rich, Interactive UI WPF Richest, Interactive UI.
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
Project “Astoria” first announced in Mix 2007 Shared early prototypes, got tons of feedback Now we’re talking about the real deal Production quality bits,
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture.
Silverlight Dev Demo Scott Edmondson NextMinute Application at
Why data services? Common challenges when creating rich web applications Creating rich web applications with data services Future scenarios & roadmap.
SPEECH DESCRIPTORS GENERATION SOFTWARE UTILIZED FOR CLASSIFICATION AND RECOGNITION PURPOSES Lukasz Laszko Department of Biomedical.
Hello WCF RIA Services An introduction to RIA Services Gill Cleeren Microsoft Regional Director Silverlight MVP Ordina Belgium.
Web Application BrowserBrowser Rich Internet Application DB ServicesServices Other Applications Data Access Layer AppLogic Services HTMLPresentationLogic.
Nikhil Kothari Software Architect Microsoft Corporation Session Code: WUX312.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
Stephen Forte DAT401 from s in dat.Speaker select s.Bio; Chief Strategy Officer of Telerik Certified Scrum Master Active in the community: International.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
Model View ViewModel Architecture. MVVM Architecture components.
ADO.NET 3.0 – Entity Data Model Gert E.R. Drapers Chief Software Architect Visual Studio Team Edition for Database Professionals Microsoft Corporation.
Data lifecycle (CRUD+) Operation logic, query, databinding, change tracking, unit of work Validation User: authn/authz/profile.
Data Access Methodologies: When to choose what (ADO.NET, Entity Framework, WCF Data Services) Wriju Ghosh Lead Partner Consultant, Microsoft.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Building business application using Visual Studio 2013 LightSwitch.
Programming with MVVM Miguel A. Castro Architect -
Exploring Networked Data and Data Stores Lesson 3.
L. (Van) Van Lowe Twitter:lvanlowe
The best of WF 4.0 and AppFabric Damir Dobric MVP-Connected System Developer Microsoft Connected System Division Advisor Visual Studio Inner Circle member.
KORAK PRED OSTALIMI VISUAL STUDIO LIGHTSWITCH Danijel Malik Artifis Danijel Malik s.p.
The cutting edge event for ITPros and Devs December 7-8, 2013 Athens, Greece Fix it once use it everywhere Elias Markelis MCT, Windows Phone Enthusiast.
2 ADO.NET Data Services for the Web Mike Flasko Program Manager, Microsoft “Project Astoria”
Building Enterprise Applications Using Visual Studio®
Introducing the Microsoft® .NET Framework
Building and Consuming REST-based Data Services for the Web
MIX 09 6/5/2018 9:14 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Building Custom Workflows
Beyond the BDC\BCS Model
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Tech Ed North America /13/ :13 AM Required Slide
End to end app development ASP.NET, WCF, WF, EF, & RIA Services
Windows Communication Foundation RIA: Ready for Business
Accessing Data in a .NET Web Application
Rich single page applications with SharePoint
Tech Ed North America /1/ :36 AM Required Slide
LitwareHR v2: an S+S reference application
The Islamia University Bahawalpur
Pablo Castro Software Architect Microsoft Corporation
WCF Data Services and Silverlight
Windows Forms in Visual Studio 2005: An in-depth look at key features
.NET Framework V3.5+ & RESTful web services
Tech Ed North America /6/2019 2:07 PM Required Slide
SQL Azure to .NET Developers
Presentation transcript:

Developing with WCF RIA Services Quickly and Effectively Nikhil Kothari Software Architect, Microsoft Corporation Blog: Twitter:

Agenda Getting started on an application – End-to-end introduction Going beyond the basics – Implementing MVVM/ViewModel – Designing the application logic Tips and guidelines along the way Sneak peek at future possibilities

The RIA Services Vision Simplify n-tier data-driven application development A higher level framework on top of existing building blocks – LINQ, Data Access Technologies, WCF, Metadata Provide an application architecture that scales to fit needs of breadth line-of-business applications

What would you like to see? Pick a real-world scenario; skip the drag/drop – An example of when UI is not mapped one-to-one with a database table – An example of projections across tables – An example where DAL types are not passed to the client – An example of using a stored procedure – When to use [Invoke] vs. Insert/Update/Delete methods? – How to implement the combobox/lookup table scenario? How to make RIA Services work with MVVM?

DEMO An End-to-End Introduction to RIA Services

BookClub ApplicationApplication DB Services Data Access Layer AppLogic PresentationLogic Network DomainService Stateless CRUD + App Logic class BookShelfService IQueryable GetBooks() void ShareBook(Book) void UpdateBook(Book) void UnshareBook (Book) Validation, authorization, business rules Data Model class Book DomainContext Stateful view + Bindable Data class BookShelfContext EntitySet Books { get } EntityQuery GetBooksQuery() Entities class Book Data members + Validation Data Model + Metadata + Shared Code DomainService.Query Invoke GetBooks() Compose query, execute, serialize results DomainService.SubmitChanges Authorize, Validate, Execute, Persist var q = Context.GetBooksQuery() Context.Load(q); Context.Books.Add(newBook); Context.SubmitChanges(); Queries and ChangeSets

Thinking ViewModel aka MVVM A pattern for separating application behavior out of the user interface Motivation – Facilitate designer/developer workflow, and independent design/development activity – Encapsulate state and operations of application – Improve maintainability – Facilitate testability

ViewModel + RIA ServicesApplication Data Model Services, Business Rules View Model App State, Operations, Notifications Presentation XAML, UI Logic <Button Content=“Load” Command=“loadCommand” /> public class BookShelfModel : INotifyPropertyChanged { BookShelfContext _bookShelf; public IEnumerable Books { get; } public void LoadBooks(string) { // use _library to perform search } public class Book : Entity { … } public class BookShelfContext : DomainContext { public EntitySet Books { get; } }

Sketching the ViewModel Books SelectedBook (two-way) SelectedBook LoadBooks() LoadMoreBooks() SaveBooks() ShareBook() UnshareBook() EditBook()

DEMO Implementing the ViewModel Pattern with RIA Services

The Role of DomainServices Encapsulate reusable application logic and expose it as a set of CRUD – Meaningful tasks unique to your application Interesting implementation scenarios – Constraining results – Validation, authorization and business rules – Shaping data – Aggregating data – Caching – Triggering business processes – …

Designing DomainServices - Identifying the Tasks GetBooks UpdateBook UnshareBook ShareBook

Designing DomainServices - Identifying the Tasks RequestBook GetBooksOfDay SearchBooks GetLatestBooks

Designing DomainServices – Presentation Model Types

DomainServices + Entities Layering your DomainServices Data Access Layer + DAL Types BookClub ObjectContext Reference DataService BookClub Service BookMemberRequestCheckoutCategory BookInfo IQueryable GetCategories() IQueryable GetBooks() IQueryable SearchBooks() IQueryable GetBooksOfDay() void RequestBook(int bookID) Category Amazon BookShelf Service Book IQueryable GetBooks() void ShareBook() void UnshareBook() void UpdateBook()

DEMO Walkthrough of an Interesting DomainService Implementation

Recap: Tips and Guidelines Constrain your queries – Parameters, business rules, result limits Define specific operations on your domain service that match your application semantics Use validation to enforce rules, and provide useful user experience – Member, Entity, Operation, Server-only, Async Use authorization to restrict access to data and operations Handle errors – any Load/Submit could fail Separate out reference data to facilitate sharing and optimal loading

Recap: Some More Tips Focus on the tasks that define your application – Customize your DomainServices – Group logically related tasks per DomainService Create custom entity types designed for use between client and server when appropriate – Expose sufficient and minimum amount of information – Aggregate, re-shape, project on the server – Consider security, band-width and latency

Scaling your DomainServicesAppLogic Databases ADO.NET, ORMs (LTS, EF, …) Lists/Objects Repository (NHibernate, …) Services REST/SOAP (Azure, …).NET Clients Silverlight, Phone, WPF Standards Clients JavaScript Server Rendering HTML, Sitemaps Services SOAP, XML, JSON, OData Unit Test Code

DEMO RIA Services + Windows Phone 7

Related Talks CL08 – Microsoft Silverlight 4 Business Applications CL50 – Search Engine Optimization for Microsoft Silverlight FT15 – Accessing Data in a Microsoft Connected Web Application EX14 - Understanding the Model-View- ViewModel Pattern RIA Services Meetup at 8pm today in 24001

Roadmap and Further Information Bits – Today: Feature-complete RC build that works with SL4 and VS2010 RC – V1: Ship with SL4 on top of.NET 4/VS2010 – Hosters starting to get on-board (eg. DiscountASP, OrcsWeb) More Information – - RIA Services Online – Blogs

Call to Action Get a jumpstart on your next Silverlight-based LOB/data-driven app – RIA Services builds on WCF and Silverlight 4 and provides end-to-end solutions – Takes care of services infrastructure, binding infrastructure Implement well-architected manageable application, and work well for designer/developer workflow – RIA Services is complemented by patterns such as task- centric design approaches and ViewModel

Q&A