WCF from the web developer

  • 748 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
748
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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

Transcript

  • 1. WCF for the web developer
    Florin Cardașim, caf@rms.ro
    twitter: @cardasim, @CodeCampIasi
    RomSoft, www.rms.ro
    Iași, 8th of May 2010
  • 2. Agenda
    WCF today: an overview
    WCF Services for the WEB 2.0
    SOAP & REST
    WCF Data Services
  • 3. WCF Today
    Programming Model
    SOAP Services
    WEB HTTP
    Services
    Data Services
    RIA Services
    Workflow Services
    Service Model
    Data Contract
    Service Contract
    Service Behavior
    Channel Model
    Formats
    (XML, JSON, Atom…)
    Transports
    (HTTP, TCP, IPC, MSMQ…)
    Protocols
    (SOAP, HTTP, Open Data Protocol,…)
  • 4. WCF Architecture - Channels
    WCF
    Service
    WCF
    Client
    Channel A
    Channel A
    Channel B
    Channel B
    Channel C
    Channel C
    Transport Channel
    Transport Channel
    HTTP, TCP, MSMQ, etc.
  • 5. WCF Architecture - Bindings
    WCF Service
    [ServiceContract]
    interface IExampleB
    { . . .}
    [ServiceContract]
    interface IExampleA
    { . . .}
    Binding 3
    Binding 1
    Binding 2
    Transactions
    Transactions
    RM
    Security
    Security
    Transport HTTP
    Transport HTTP
    Transport TCP
  • 6. Demo: WCF Services for the WEB 2.0
  • 7. What is SOAP
    SOAP = Simple(?!!) ObjectAccessProtocol
    =protocol, =standards
    advanced features: security, reliable messaging, transactions
    transport neutrality (http, tcp, ipc, msmq …)
    uses POST when used over HTTP
    roots in enterprise applications
  • 8. SOAP-HTTP bindings
    wsHttpBinding
    SOAP 1.2
    Transaction Flow
    Reliable Session
    basicHttpBinding
    SOAP 1.1
    Symmetric Security
    HTTP Transport (Text Message Encoding)
    HTTP Transport (Text Message Encoding)
  • 9. SOAP & WS-*
    MEX
    Policy
    WSDL
    SEC:
    Kerberos, Username, X.509, SAML
    Secure Conversation, Federation, Trust
    RM:
    Reliability, Reliable Messaging
    TRAN:
    BussinessAct,
    Atomic,
    Coordination
    Messaging: SOAP, Addressing, MTOM, Transfer, Discovery…
    XML: XML, XSD, Digital Signature, Encryption
    Transport: HTTP/S, TCP, SMTP, UDP…
  • 10. A SOAP request
    WCF
    Client
    WCF
    Service
    POST /AccountAccess/Accounts.svc
    Host: www.quickbank.com
    SOAPAction: GetBalance

    <soap:Envelopexmlns:soap= …
    <soap:Body>
    <GetBalancexmlns= …
    <Account>2</Account>
    </GetBalance>
    </soap:Body>
    </soap:Envelope>
    Account 1
    Account 2
    Account 3
  • 11. What is REST
    REST = REpresentationalState Transfer
    ! protocol, ! format, ! standard
    = architectural style
    everything is a resource: Account, Balance …
    address: www.quickbank.com/Accounts/2
    uniform interface: HTTP GET, POST, PUT, DELETE
    roots in WEB facing services (for example Google Search)
  • 12. A REST request
    WCF
    Client
    WCF
    Service
    GET www.quickbank.com/Accounts/2
    Account 1
    Account 2
    Account 3
  • 13. Demo: Twitter REST Service
    Formats:
    XML, JSON
    RSS, ATOM
    webHttpBinding
    HTTP Transport (Web Message Encoding)
  • 14. SOAP & REST
  • 15. When to SOAP? When to REST?
    Exposing data OR operations?
    Need for WS-*?
    Who will be using your service?
    What are you/your developers comfortable with?
    REST seems to be preferred in the clouds:
    Amazon S3
    Windows Azure
    Google

  • 16. OData: WCF Data Services
    Open Data Protocol
    REST-based protocol for CRUD-style operations
    Based on AtomPub
    Formats: Atom, Xml, JSON
    DEMO
  • 17. OData: Existing clients and servers
    Clients
    Browser
    .NET 3.5, 4.0
    Java Script
    Java Restlet 2.0
    PHP
    ASP.NET AJAX
    Excel 2010 Power Pivot
    LINQPad
  • Resources
    Aaron Skonnard, www.pluralsight.com
    David Chappel, www.davidchappel.com
    http://wildermuth.com
    Michele Bustamante, www.thatindigogirl.com
    MSDN REST Starter Kit
  • 23. Please fill the evaluation formThank you very much!
    Florin Cardașim, caf@rms.ro
    twitter: @cardasim, @CodeCampIasi
    RomSoft, www.rms.ro
    Iași, 8th of May 2010
  • 24. Demo: REST in .NET 4.0
    Caching
    Automatic format selection
    REST Starter Kit:
    Client API
    Paste as Xml