WCF RIA Services “do Geral ao Detalhe”
WUX303
Nuno Godinho
Partner & CTO @ ITech4All
@NunoGodinho
Nuno Filipe GodinhoPartner & CTO @ ITech4all
Mail: [email protected]@sapo.pt
Blogs: http://pontonetpt.com/blogs/nunogodinhohttp://xamlpt.com/blogs/nunogodinhohttp://weblogs.asp.net/nunogodinhohttp://msmvps.org/blogs/nunogodinho
Twitter: @NunoGodinho
About Me
• Introduction• RIA Services • Q&A
Note: Use #techdays2010pt and #WUX303 hashtags for requests and comments about this session on TechDays Portugal 2010
Agenda
Introduction
DemoSample Line-of-Business Application without WCF RIA Services
• Common Problems• N-Tier Development• Controls• Rich Text Support• Multi-language Support• Customer Devices Interaction• Communications• Extensibility• Offline Support• Interoperability
Problem Statement
• The validation needs to run on Client and On Server as well as on Mid-Tiers
• Common validation across the tiers
• Services that may be shared with other applications
Challenges using N-Tier applications
Value Proposition
• Simplify RIA-style application development• n-tier is hard, and un-natural• Focus on data-driven apps
• Bring ASP.NET-style productivity to RIA development• Building blocks for data, security,
etc.• Focus on scenarios
Vision and Goals
• Focus on data in an end-to-end manner
• A unified story for client and server development
• A prescriptive framework that targets key scenarios, and leads the common developer to a pit of success
Value Propositions
• Simplify application development across tiers and trust boundary • Provides a set of tools to build the multiple
tiers of an application together• Application logic remains aware of tier and
trust boundaries• Uses the end-to-end flow of data and
metadata described earlier • Code generation and shared code
• Enhance the experience by providing multiple choices for sharing logic while respecting tier and trust boundaries
Value Propositions
DemoSample Line-of-Business Applicationwith WCF RIA Services
ApplicationBrowser Rich Internet Application
DB
Service
Other Applications
• Client is an extension of the server• A single logical application
Unified Story
Data Access Layer
AppLogic
Services
HTMLPresentati
onLogic
Network
A Prescriptive Pattern
Rich Internet Application
DB
Services
Data Access Layer
AppLogic
Presentation
Logic
Network
DomainCont
ext
Domain
Service
Under the covers infrastructure
• Support for multiple presentation tiers and data access technologies
Single Pattern that Scales and Grows
AppLogic
DatabasesADO.NET,ORMs (LTS, EF, …)
CLR Lists/ObjectsRepository(nHibernate, …)
ServicesREST/SOAP(Azure, …)
SOAP, XML, JSON,Binary
.NET ClientsSilverlight, WPF
Standards ClientsJavaScript
Server RenderingHTML, SEO,Printing, …
ServicesWCF
Unit Test Code
RIA Services
DemoWCF RIA Services
• Data Access• DataBinding• Validation• Extensibility
RIA Services
Interopwith other
Platforms & WS-*
ASMX & WSE
Attribute- Based
Programming
Enterprise Services
REST / HTTP Programming
HTTP Services
Message-Oriented
Programming
System.Messaging
ExtensibilityLocation
transparency
.NET Remoting
Unified Programming Model
• Windows Communication Foundation (WCF)
Architecture
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 Service
s
Client project
WCF RIA Services - Design-time view
Server project
DomainService
Data Acces
s Layer (DAL)
Entities
Solution (Application)
ViewsDomainContex
t
EntitiesBuild,
reflect & code-gen
Silverlight
• Entity lifecycle
WCF RIA Services - Run-time view
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)
• Authentication• Roles• User profile• All integrate w/ ASP.NET
infrastructure
Services Out-of-the-Box
Q & A
A sua opinião é importante!Complete o questionário de avaliação e devolva-o à saida.