Wcf for the web developer

2,287 views

Published on

Wcf for the web developer
Florin Cardasim, www.rms.ro
twitter: @cardasim

1 Comment
1 Like
Statistics
Notes
  • always good stuff
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
2,287
On SlideShare
0
From Embeds
0
Number of Embeds
33
Actions
Shares
0
Downloads
127
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
  • SOAP (basic-profile, ws-*)REST (xml, json, atom/rss)Why SOAP? Why REST?
  • Core Services: SOAP over any transport channelOperation-centric servicesWS-* standardsWeb HTTP Services: REST over HTTPWEB Facing services over HTTPXml/JSON/ATOM/RSSWCF Data Services (ADO.Net Data Services)Exposing data over Open Data Protocol (REST interface)WCF RIA Services (.NET RIA Services)Building end-to-end Silverlight applicationWCF Workflow ServicesLong running, durable operations or where the specification and enforcement of operation sequencing is important
  • Start with an example showing a service with the following endpoints:SOAP (basicHttp or wsHttp)REST POX (xml)REST JsonREST ATOMClients consuming these endpoints:?????What is SOAP? small demo, explain basic principlesWhat is REST? small demo, explain basic principlesMain differences between SOAP and RESThttp://www.devx.com/DevX/Article/8155 (beton!!!!)
  • Start with an example showing a service with the following endpoints:SOAP (basicHttp or wsHttp)REST POX (xml)REST JsonREST ATOMClients consuming these endpoints:?????What is SOAP? small demo, explain basic principlesWhat is REST? small demo, explain basic principlesMain differences between SOAP and RESThttp://www.devx.com/DevX/Article/8155 (beton!!!!)
  • Start with an example showing a service with the following endpoints:SOAP (basicHttp or wsHttp)REST POX (xml)REST JsonREST ATOMClients consuming these endpoints:?????What is SOAP? small demo, explain basic principlesWhat is REST? small demo, explain basic principlesMain differences between SOAP and RESThttp://www.devx.com/DevX/Article/8155 (beton!!!!)
  • Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &client using wcf 4.0
  • Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &client using wcf 4.0
  • Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &client using wcf 4.0
  • Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &client using wcf 4.0
  • Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &client using wcf 4.0
  • Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &client using wcf 4.0
  • Wcf for the web developer

    1. 1. WCF for the web developer<br />Florin Cardașim, caf@rms.ro<br />twitter: @cardasim, @CodeCampIasi<br />RomSoft, www.rms.ro<br />Iași, 8th of May 2010<br />
    2. 2. Agenda<br />WCF today: an overview<br />WCF Services for the WEB 2.0<br />SOAP & REST<br />WCF Data Services<br />
    3. 3. WCF Today<br />Programming Model<br />SOAP Services<br />WEB HTTP<br />Services<br />Data Services<br />RIA Services<br />Workflow Services<br />Service Model<br />Data Contract<br />Service Contract<br />Service Behavior<br />Channel Model<br />Formats<br />(XML, JSON, Atom…)<br />Transports<br />(HTTP, TCP, IPC, MSMQ…)<br />Protocols<br />(SOAP, HTTP, Open Data Protocol,…)<br />
    4. 4. WCF Architecture - Channels<br />WCF <br />Service<br />WCF <br />Client<br />Channel A <br />Channel A <br />Channel B <br />Channel B <br />Channel C <br />Channel C <br />Transport Channel <br />Transport Channel <br />HTTP, TCP, MSMQ, etc.<br />
    5. 5. WCF Architecture - Bindings<br />WCF Service<br />[ServiceContract]<br />interface IExampleB<br />{ . . .}<br />[ServiceContract]<br />interface IExampleA<br />{ . . .}<br />Binding 3<br />Binding 1<br />Binding 2<br />Transactions<br />Transactions<br />RM<br />Security<br />Security<br />Transport HTTP<br />Transport HTTP<br />Transport TCP<br />
    6. 6. Demo: WCF Services for the WEB 2.0<br />
    7. 7. What is SOAP<br />SOAP = Simple(?!!) ObjectAccessProtocol<br />=protocol, =standards<br />advanced features: security, reliable messaging, transactions<br />transport neutrality (http, tcp, ipc, msmq …)<br />uses POST when used over HTTP<br />roots in enterprise applications<br />
    8. 8. SOAP-HTTP bindings<br />wsHttpBinding<br />SOAP 1.2<br />Transaction Flow<br />Reliable Session<br />basicHttpBinding<br />SOAP 1.1<br />Symmetric Security<br />HTTP Transport (Text Message Encoding)<br />HTTP Transport (Text Message Encoding)<br />
    9. 9. SOAP & WS-*<br />MEX<br />Policy<br />WSDL<br />SEC: <br />Kerberos, Username, X.509, SAML<br />Secure Conversation, Federation, Trust<br />RM:<br />Reliability, Reliable Messaging<br />TRAN:<br />BussinessAct,<br />Atomic,<br />Coordination<br />Messaging: SOAP, Addressing, MTOM, Transfer, Discovery…<br />XML: XML, XSD, Digital Signature, Encryption<br />Transport: HTTP/S, TCP, SMTP, UDP…<br />
    10. 10. A SOAP request<br />WCF <br />Client<br />WCF <br />Service<br />POST /AccountAccess/Accounts.svc<br />Host: www.quickbank.com<br />SOAPAction: GetBalance<br />…<br /><soap:Envelopexmlns:soap= …<br /> <soap:Body><br /> <GetBalancexmlns= …<br /> <Account>2</Account><br /> </GetBalance><br /> </soap:Body><br /></soap:Envelope><br />Account 1<br />Account 2<br />Account 3<br />
    11. 11. What is REST<br />REST = REpresentationalState Transfer<br />! protocol, ! format, ! standard<br />= architectural style<br />everything is a resource: Account, Balance …<br />address: www.quickbank.com/Accounts/2<br />uniform interface: HTTP GET, POST, PUT, DELETE<br />roots in WEB facing services (for example Google Search)<br />
    12. 12. A REST request<br />WCF <br />Client<br />WCF <br />Service<br />GET www.quickbank.com/Accounts/2<br />Account 1<br />Account 2<br />Account 3<br />
    13. 13. Demo: Twitter REST Service<br />Formats:<br />XML, JSON<br />RSS, ATOM<br />webHttpBinding<br />HTTP Transport (Web Message Encoding)<br />
    14. 14. SOAP & REST<br />
    15. 15. When to SOAP? When to REST?<br />Exposing data OR operations?<br />Need for WS-*?<br />Who will be using your service?<br />What are you/your developers comfortable with?<br />REST seems to be preferred in the clouds: <br />Amazon S3<br />Windows Azure<br />Google<br />…<br />
    16. 16. OData: WCF Data Services<br />Open Data Protocol<br />REST-based protocol for CRUD-style operations<br />Based on AtomPub<br />Formats: Atom, Xml, JSON<br />DEMO<br />
    17. 17. OData: Existing clients and servers<br />Clients<br />Browser<br />.NET 3.5, 4.0<br />Java Script<br />Java Restlet 2.0<br />PHP<br />ASP.NET AJAX<br />Excel 2010 Power Pivot<br />LINQPad<br /><ul><li>Servers
    18. 18. SQL Azure
    19. 19. SharePoint 2010
    20. 20. SQL Reporting Services
    21. 21. IBM WebSphere
    22. 22. Your WCF Data Service</li></li></ul><li>Resources<br />Aaron Skonnard, www.pluralsight.com<br />David Chappel, www.davidchappel.com<br />http://wildermuth.com<br />Michele Bustamante, www.thatindigogirl.com<br />MSDN REST Starter Kit<br />
    23. 23. Please fill the evaluation formThank you very much!<br />Florin Cardașim, caf@rms.ro<br />twitter: @cardasim, @CodeCampIasi<br />RomSoft, www.rms.ro<br />Iași, 8th of May 2010<br />
    24. 24. Demo: REST in .NET 4.0<br />Caching<br />Automatic format selection<br />REST Starter Kit:<br />Client API<br />Paste as Xml<br />

    ×