data access layer (dal) app logic database view web service app logic trust boundary

Post on 31-Mar-2015

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Mastering WCF RIA Services

Dinesh KulkarniProgram ManagerDeveloper DivisionMicrosoft Corporation

CL07

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”> Using RIA Services effectively

RIA Services in n-tier applications

Data Acces

s Layer (DAL)

App Logic

Database

View

Web Servic

e

AppLogic

TrustBoundary

Framework, tools and services withprescriptive pattern for n-tier

applications

Windows Communication Foundation (WCF)

Channel Model

Formats(Atom, JSON, XML,…)

Transports(HTTP, TCP, …)

Protocols(SOAP, HTTP, OData,

…)

Service Model

Data Contract Service ContractService Behavior

Programming Model

Core Services

Web HTTP

Services

Data Services

Workflow Services

RIA Services

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

Data access & presentation neutral

AppLogic

XML, JSON, Binary

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”

> Design-time view> Run-time view> Services

> Using RIA Services effectively

Agenda

> WCF RIA Services in context> A look “under the hood”

> Design-time view> Run-time view> Services

> Using RIA Services effectively

Client project

Design-time view

Server project

DomainService

Data Acces

s Layer (DAL)

Entities

Solution (Application)

ViewsDomainContex

t

EntitiesBuild,

reflect & code-gen

Design-time view

Writing app logic and using generated code

Demo

Code gen recap …

Server project

[EnableClientAccess()]DishViewDomainService:

DomainService

IQueryable<Plate> GetPlates(…)

void UpdatePlate(Plate p)

void FeatureOnSite(Restaurant r)

Client projectGenerated code

DishViewDomainContext: DomainContext

class Plate: Entity EntityQuery<Plate>

GetPlatesQuery(…)

CreateEntitySet<Plate>(EntitySetOperations.Edit)

Restaurant.FeatureOnSite();

Agenda

> WCF RIA Services in context> A look “under the hood”

> Design-time view> Run-time view> Services

> Using RIA Services effectively

Silverlight

Run-time view (entity lifecycle)

Web server

DomainService

Data Acces

s Layer (DAL)

Application

ViewsDomain

Context

LoadQuery

Entities

Results

Submit

Entities

Submit

Results

context.Load(GetRestaurantsQuery(…).Skip(10).Take(10))

context.SubmitChanges()

GetRestaurants(…).Skip(10).Take(10)

Submit(changeSet)

Run-time view

Query w/ LINQ & CUD w/ unit of work

Demo

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

Agenda

> WCF RIA Services in context> A look “under the hood”

> Design-time view> Run-time view> Services

> Using RIA Services effectively

Services

> Authentication> Roles> User profile> All integrate w/ ASP.NET infrastructure

Services

Authentication and roles

Demo

Summary

> Authentication & roles> Declarative: class / method-level> Integrated into Query / Submit processing

Agenda

> WCF RIA Services in context> A look “under the hood”> Using RIA Services effectively

Using RIA Services effectivelyDo> 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

Don’t> Deploy with anon access

> Expose non-essential entities/ operations or allow free-form access to data

> Use a single large DomainService class

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/

Related sessions

CL21 Building Amazing Business Applications with Microsoft Silverlight and Microsoft .NET RIA Services

CL32 Developing Testable Silverlight Applications

CL22 Advanced Topics for Building Large-Scale Applications with Microsoft Silverlight

CL19 Building LoB Applications with Silverlight 4

FT55 Developing REST Applications with .NET Framework

FT12 ADO.NET Data Services: What’s New with the RESTful Data Services Framework

SVC23 Using the Microsoft Sync Framework to Connect Apps to the Cloud

YOUR FEEDBACK IS IMPORTANT TO US!

Please fill out session evaluation

forms online atMicrosoftPDC.com

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/learnBuilt by Developers for Developers….

© 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.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.

Using the right tool for the jobWCF Layer Description

Domain Services

Prescriptive E2E experience for Silverlight applications

Data Services Turn-key entity-oriented programming model for HTTP/RESTful services

Workflow Services

Workflow-oriented programming model for long-running business processes

Service Model Method-oriented programming model for WS-* & REST developers1. All programming models can leverage the wide-ranging set of

behaviors and protocols2. We have good integration in SL4/Dev10, that gets even better

in Dev11

Microsoft Confidential

top related