Trilha .NET - REST na plataforma Microsoft com ASP.NET Web API
Developing REST Applications with the .NET Framework
description
Transcript of Developing REST Applications with the .NET Framework
![Page 1: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/1.jpg)
Developing REST Applications with the .NET FrameworkHenrik Frystyk Nielsen, Principal Architect
FT55
![Page 2: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/2.jpg)
Do You Speak REST?> What is REST?> Why REST?> How does .NET support REST? > How do I get started?
![Page 3: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/3.jpg)
Constrained Interactions
> Resource are identified by URIs
> Resources are exposed in terms of state
> Resources can only interact through exchange of state
> Resource behavior is hidden
![Page 4: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/4.jpg)
Guiding Principles or Straight Jacket?> Loose coupling
> Resources only see each other as state> Scalability
> State is often cacheable and can be moved around> Composability
> State + State = State> Deployment
> State can be rendered in many different ways> Reuse and Interop
> State is easy to consume> Observability
> State shows what the system is doing
![Page 5: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/5.jpg)
Going Beyond Retrieval> HTTP Vocabulary
> GET – get state> PUT – create/replace state> POST – insert/modify/process state> DELETE – delete state> OPTIONS – metadata
> Atom and AtomPub> Collections and link relationships
![Page 6: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/6.jpg)
Open Data Protocol (OData)> A RESTful protocol for data sharing> It all started with Astoria, or “Data
Services”> A set of conventions on top of
AtomPub> Structured data, expanded hierarchies,
queries in URLs, batching> With many products following the
conventions, it was time for a name
![Page 7: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/7.jpg)
From Browsing to App Model
> Move towards HTTP/REST across all tiers> Mash-ups, Cloud Services, User Interface> Computation and Business Logic> Databases and Files> Devices and hardware
![Page 8: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/8.jpg)
Service alignment> WCF WebHttp Services (WCF REST)
> Building RESTful as well as Xml over HTTP services with control over URI/format/protocol
> WCF Data Services (ADO.Net Data Services)> Exposing data models through a RESTful interface
> WCF RIA Services (.NET RIA Services)> Building end-to-end Silverlight application
> WCF Core Services> Full flexibility for building operation-centric services with
industry standard interop, as well as channel and host plug-ability.
> WCF Workflow Services> Long running, durable operations or where the
specification and enforcement of operation sequencing is important
![Page 9: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/9.jpg)
Windows Communication Foundation
Channel ModelFormats
(Atom, JSON, XML,…)
Transports(HTTP, TCP, …)
Protocols(SOAP, HTTP, Open Data Protocol,…)
Service ModelData Contract Service
ContractService Behavior
Programming ModelCore
ServicesWeb HTTP
ServicesData
ServicesRIA
ServicesWorkflo
w Services
![Page 10: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/10.jpg)
DEMO
ServiceOperation style HTTP/REST services
Web HTTP Services
![Page 11: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/11.jpg)
DEMO
Exposing RESTful data models
Data Services
![Page 12: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/12.jpg)
DEMO
Rich end-to-end Silverlight apps
RIA Services
![Page 13: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/13.jpg)
Demo Recap…> WCF WebHttp Services (WCF REST)
> Building RESTful as well as Xml over HTTP services with control over URI/format/protocol
> WCF Data Services (ADO.Net Data Services)> Exposing data models through a RESTful
interface> WCF RIA Services (.NET RIA
Services)> Building end-to-end Silverlight application
![Page 14: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/14.jpg)
DEMO
Mixing HTTP, Data & RIA Services
>>FUTURE
![Page 15: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/15.jpg)
DEMO
New generation HTTP API
Http Client
>>FUTURE
![Page 16: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/16.jpg)
What’s Next?> What is REST?
> Architectural style for state-driven applications> Key is constrained interactions
> Why REST?> Interop between cloud, on-premise, cross-
domains> Move towards resource-based application model
> How do I get started?> .NET 4.0 Beta 2 and Silverlight 4.0 Preview
> http://blogs.msdn.com/endpoint> Blogs and announcements
![Page 17: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/17.jpg)
Catch These PresentationsID Title
CL06 Networking and Web Services in SilverlightCL07 Mastering Microsoft .NET RIA Services
CL21 Building Amazing Business Applications with Microsoft Silverlight and Microsoft .NET RIA Services
FT10 Evolving ADO.NET Entity Framework in .NET 4 and Beyond
FT12 ADO.NET Data Services: What’s new with the RESTful data services framework
FT13 What’s New for Windows Communication Foundation 4PR02 Overview of SharePoint 2010 Programmability
PR12 It's All About the Services: Developing Custom Applications for Microsoft SharePoint Server 2010 Using Microsoft ASP.NET, WCF, and REST
SVC19 REST Services Security Using the Microsoft .NET Access Control Service
![Page 18: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/18.jpg)
YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation
forms online atMicrosoftPDC.com
![Page 19: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/19.jpg)
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….
![Page 20: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/20.jpg)
© 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.
![Page 21: Developing REST Applications with the .NET Framework](https://reader035.fdocuments.in/reader035/viewer/2022062520/56816381550346895dd466a6/html5/thumbnails/21.jpg)