KEMBAR78
MS TechDays 2011 - WCF Web APis There's a URI for That | PDF
SINGAPORE

                  DEVELOPMENT, ADVANCED

                  Alvin Lau
                  Solutions Consultant, Dimension Data / MVP (ASP.Net/IIS)



OData with
WCF Web
APIs: “There’s
a URI for that”
Agenda
What is WCF Web API?
Why WCF Web API?
Understanding WCF Web API
What is WCF Web API?
Set of WCF components
Allows developers to expose apps, data, services
 over HTTP
Targeted to simplify HTTP programming
Handles low level details of HTTP
Exposes HTTP programming model in a natural way


Flexible, Extendable
Why WCF Web API?
From PCs -> Device
Devices
Support MANY clients/devices

If you want to reach your users, you need to
reach their device
BUILDING A WEB API FOR BROWSER
/ JSON CLIENTS
Architecture Overview
           1.   S/R HTTP Requests /
                Responses
           2.   Listens over HTTP for
                incoming message
           3.   Agnostic to hosting
                environment (ASP.NET, IIS,
                self-hosted)
           4.   Routing HTTP request to
                HTTP Service instance,
                Serialisation, Extensibility
                point (MediaTypeFormatter)
           5.   Add custom handing code &
                business logic
Features of WCF Web API

 Preview 5
 First class programming model for HTTP in WCF
 HttpClient
 OOB support for XML, JSON, Odata
 Plug any format / media type
 Iqueryable support
 Designed for separation of concerns and testability
   – IoC container
   – Validation, URI binding etc
 Support for HTTP file upload and MIME based batching
 Integrated Web API test client
ADDING MORE SUPPORT (GET, POST,
PUT AND DELETE)
SUPPORT FORM URL ENCODED DATA
References
WCF Web API -
 http://wcf.codeplex.com/wikipage?title=WCF HTTP
Glenn Block’s blog -
 http://codebetter.com/glennblock/
Pedro Felix’s blog -
 https://pfelix.wordpress.com/tag/wcf-web-api/
Download it -
 http://wcf.codeplex.com/releases/view/73399#Dow
 nloadId=281825
‱ Windows Azure User Group Singapore
‱ Portal
  ‱ http://azureug.sg
‱ Facebook page
  ‱ http://www.facebook.com/MWAPSG
‱ Meeting
  ‱ When: Typically, Last Tuesday of the month
  ‱ Where: Microsoft Singapore Level 21 / 22
  ‱ Subscribe to our portal to receive the meeting invitation
Thank You

MS TechDays 2011 - WCF Web APis There's a URI for That

  • 1.
    SINGAPORE DEVELOPMENT, ADVANCED Alvin Lau Solutions Consultant, Dimension Data / MVP (ASP.Net/IIS) OData with WCF Web APIs: “There’s a URI for that”
  • 2.
    Agenda What is WCFWeb API? Why WCF Web API? Understanding WCF Web API
  • 3.
    What is WCFWeb API? Set of WCF components Allows developers to expose apps, data, services over HTTP Targeted to simplify HTTP programming Handles low level details of HTTP Exposes HTTP programming model in a natural way 
Flexible, Extendable
  • 4.
    Why WCF WebAPI? From PCs -> Device
Devices Support MANY clients/devices If you want to reach your users, you need to reach their device
  • 5.
    BUILDING A WEBAPI FOR BROWSER / JSON CLIENTS
  • 6.
    Architecture Overview 1. S/R HTTP Requests / Responses 2. Listens over HTTP for incoming message 3. Agnostic to hosting environment (ASP.NET, IIS, self-hosted) 4. Routing HTTP request to HTTP Service instance, Serialisation, Extensibility point (MediaTypeFormatter) 5. Add custom handing code & business logic
  • 7.
    Features of WCFWeb API 
 Preview 5  First class programming model for HTTP in WCF  HttpClient  OOB support for XML, JSON, Odata  Plug any format / media type  Iqueryable support  Designed for separation of concerns and testability – IoC container – Validation, URI binding etc  Support for HTTP file upload and MIME based batching  Integrated Web API test client
  • 8.
    ADDING MORE SUPPORT(GET, POST, PUT AND DELETE)
  • 9.
    SUPPORT FORM URLENCODED DATA
  • 10.
    References WCF Web API- http://wcf.codeplex.com/wikipage?title=WCF HTTP Glenn Block’s blog - http://codebetter.com/glennblock/ Pedro Felix’s blog - https://pfelix.wordpress.com/tag/wcf-web-api/ Download it - http://wcf.codeplex.com/releases/view/73399#Dow nloadId=281825
  • 11.
    ‱ Windows AzureUser Group Singapore ‱ Portal ‱ http://azureug.sg ‱ Facebook page ‱ http://www.facebook.com/MWAPSG ‱ Meeting ‱ When: Typically, Last Tuesday of the month ‱ Where: Microsoft Singapore Level 21 / 22 ‱ Subscribe to our portal to receive the meeting invitation
  • 12.