slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
WCF The Unified Services Programming Model for SOAP, REST, Data and RIA Communication PowerPoint Presentation
Download Presentation
WCF The Unified Services Programming Model for SOAP, REST, Data and RIA Communication

Loading in 2 Seconds...

play fullscreen
1 / 35

WCF The Unified Services Programming Model for SOAP, REST, Data and RIA Communication - PowerPoint PPT Presentation


  • 318 Views
  • Uploaded on

WCF The Unified Services Programming Model for SOAP, REST, Data and RIA Communication. Ron Jacobs Sr. Program Manager, AppFabric Development Platform (WCF/WF) Microsoft Corporation http://blogs.msdn.com/rjacobs @ ronljacobs. What you wanted. What you got. What you need. WCF.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'WCF The Unified Services Programming Model for SOAP, REST, Data and RIA Communication' - magdalene


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
wcf the unified services programming model for soap rest data and ria communication

WCF The Unified Services Programming Model for SOAP, REST, Data and RIA Communication

Ron Jacobs

Sr. Program Manager, AppFabric Development Platform (WCF/WF)

Microsoft Corporation

http://blogs.msdn.com/rjacobs

@ronljacobs

slide6
WCF

Programming Model

SOAPServices

Web HTTP Services

Data Services

RIA Services

Workflow Services

Service Model

Data Contract

Service Contract

Service Behavior

Channel Model

Formats

(Atom, JSON, XML,…)

Transports

(HTTP, TCP, …)

Protocols

(SOAP, HTTP, Open Data Protocol,…)

slide7
WCF

Programming Model

SOAPServices

Web HTTP Services

Data Services

RIA Services

Workflow Services

Service Model

Data Contract

Service Contract

Service Behavior

Channel Model

Formats

(Atom, JSON, XML,…)

Transports

(HTTP, TCP, …)

Protocols

(SOAP, HTTP, Open Data Protocol,…)

wcf soap services

WCF SOAP Services

(made easy in .NET 4)

demo

slide9
WCF

Programming Model

SOAPServices

Web HTTP Services

Data Services

RIA Services

Workflow Services

Service Model

Data Contract

Service Contract

Service Behavior

Channel Model

Formats

(Atom, JSON, XML,…)

Transports

(HTTP, TCP, …)

Protocols

(SOAP, HTTP, Open Data Protocol,…)

wcf workflow services

WCF Workflow Services

http://channel9.msdn.com/Shows/Endpoint/endpointtv-WF4--AppFabric-Contoso-HR-Sample

demo

slide11
WCF

Programming Model

SOAPServices

Web HTTP Services

Data Services

RIA Services

Workflow Services

Service Model

Data Contract

Service Contract

Service Behavior

Channel Model

Formats

(Atom, JSON, XML,…)

Transports

(HTTP, TCP, …)

Protocols

(SOAP, HTTP, Open Data Protocol,…)

service
Service

publicclassConference: DataService<ConferenceDataEntities>

{

// This method is called only once to initialize service-wide policies.

publicstaticvoidInitializeService(DataServiceConfigurationconfig)

{

config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);

config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;

}

}

wcf data services

WCF Data Services

http://bit.ly/bTKZNz

demo

slide15
WCF

Programming Model

SOAPServices

Web HTTP Services

Data Services

RIA Services

Workflow Services

Service Model

Data Contract

Service Contract

Service Behavior

Channel Model

Formats

(Atom, JSON, XML,…)

Transports

(HTTP, TCP, …)

Protocols

(SOAP, HTTP, Open Data Protocol,…)

resource
Resource

publicclassSessionData

{

publicint ID { get; set; }

publicstring Title { get; set; }

publicDateTime? Date { get; set; }

publicstring Speaker { get; set; }

}

step 1 create service
Step 1 – Create Service
  • public class Session
  • {
  • public SessionData[] GetSessions(int start, int count)
  • {
  • }
  • public SessionData GetSession(string id)
  • {
  • }
  • }
step 2 implement service
Step 2 – Implement Service
  • public class Session
  • {
  • public SessionData[] GetSessions(int start, int count)
  • {
  • return ConferenceRepository.GetSessions(start, count);
  • }
  • public SessionDataGetSession(string id)
  • {
  • return ConferenceRepository.GetSession(id);
  • }
  • }
step 3 attribute for wcf
Step 3 – Attribute for WCF
  • [ServiceContract]
  • [AspNetCompatibilityRequirements(
  • RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
  • public class Session
  • {
  • }
step 3 attribute for wcf1
Step 3 – Attribute for WCF
  • [WebGet]
  • public SessionDataGetSession(string id)
  • {
  • return ConferenceRepository.GetSession(id);
  • }

HTTP GET = “~/Sessions/GetSession?id=123”

step 3 attribute for wcf2
Step 3 – Attribute for WCF
  • [WebGet(UriTemplate = "/{id}")]
  • public SessionDataGetSession(string id)
  • {
  • return ConferenceRepository.GetSession(id);
  • }

HTTP GET = “~/Sessions/123”

step 3 attribute for wcf3
Step 3 – Attribute for WCF
  • [WebGet(UriTemplate = "/?skip={skip}&take={take}")]
  • public SessionData[] GetSessions(int skip, int take)
  • {
  • return ConferenceRepository.GetSessions(
  • AdjustSkip(skip),
  • AdjustTake(take));
  • }

HTTP GET = “~/Sessions?skip=5&take=7”

step 4 add routes
Step 4 – Add Routes
  • void Application_Start(object sender, EventArgs e)
  • {
  • RouteTable.Routes.Add(
  • new ServiceRoute("Sessions",
  • new WebServiceHostFactory(),
  • typeof(SessionService)));
  • }

No .SVC file!

step 5 configure
Step 5 – Configure

<system.serviceModel>

<standardEndpoints>

<webHttpEndpoint>

<standardEndpoint

automaticFormatSelectionEnabled="true"

helpEnabled="true" />

</webHttpEndpoint>

</standardEndpoints>

<serviceHostingEnvironmentaspNetCompatibilityEnabled="true" />

</system.serviceModel>

wcf webhttp services

WCF WebHTTP Services

http://code.msdn.microsoft.com/WebHTTPAPIKey

demo

canonical rest entity service

Canonical REST Entity Service

http://code.msdn.microsoft.com/cannonicalRESTEntity

demo

talk to us
Talk to us
  • http://facebook.com/AppFabric
  • Twitter: @appfabric, @ronljacobs
  • Email: appfabric@microsoft.com
podcasts
Podcasts
  • http://endpoint.tv
  • Coming soon
    • AppFabric Radio
    • Dialog with us live
    • Twitter
    • Facebook
    • Email
slide33
Q&A
  • New WCF HTTP bits available on CodePlex
  • ASI201-LNC - Windows Workflow Foundation Futures
    • Thursday Lunch 1:20p
  • Stay Informed
    • http://endpoint.tv – our video podcast
    • http://blogs.msdn.com/endpoint - team blog
    • http://blogs.msdn.com/rjacobs - my blog
    • http://msdn.microsoft.com/wcf - WCF Developer Center
    • http://wcf.codeplex.com – WCF on CodePlex
    • @appfabric, @ronljacobs – Twitter / Facebook
session evaluations

Session Evaluations

Tell us what you think, and you could win!

All evaluations submitted are automatically entered into a daily prize draw* 

Sign-in to the Schedule Builder at http://europe.msteched.com/topic/list/

* Details of prize draw rules can be obtained from the Information Desk.

slide35

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