KEMBAR78
Wcf for the web developer | PPTX
WCF for the web developerFlorin Cardașim, caf@rms.rotwitter: @cardasim, @CodeCampIasiRomSoft, www.rms.roIași, 8th of May 2010
AgendaWCF today: an overviewWCF Services for the WEB 2.0SOAP & RESTWCF Data Services
WCF TodayProgramming ModelSOAP ServicesWEB HTTPServicesData ServicesRIA ServicesWorkflow ServicesService ModelData ContractService ContractService  BehaviorChannel ModelFormats(XML, JSON, Atom…)Transports(HTTP, TCP, IPC, MSMQ…)Protocols(SOAP, HTTP, Open Data Protocol,…)
WCF Architecture - ChannelsWCF ServiceWCF ClientChannel A Channel A Channel B Channel B Channel C Channel C Transport Channel Transport Channel HTTP, TCP, MSMQ, etc.
WCF Architecture - BindingsWCF Service[ServiceContract]interface IExampleB{ . . .}[ServiceContract]interface IExampleA{ . . .}Binding 3Binding 1Binding 2TransactionsTransactionsRMSecuritySecurityTransport HTTPTransport HTTPTransport TCP
Demo: WCF Services for the WEB 2.0
What is SOAPSOAP = Simple(?!!) ObjectAccessProtocol=protocol, =standardsadvanced features: security, reliable messaging, transactionstransport neutrality (http, tcp, ipc, msmq …)uses POST when used over HTTProots in enterprise applications
SOAP-HTTP bindingswsHttpBindingSOAP 1.2Transaction FlowReliable SessionbasicHttpBindingSOAP 1.1Symmetric SecurityHTTP Transport (Text Message Encoding)HTTP Transport (Text Message Encoding)
SOAP & WS-*MEXPolicyWSDLSEC: Kerberos, Username, X.509, SAMLSecure Conversation, Federation, TrustRM:Reliability, Reliable MessagingTRAN:BussinessAct,Atomic,CoordinationMessaging: SOAP, Addressing, MTOM, Transfer, Discovery…XML: XML, XSD, Digital Signature, EncryptionTransport: HTTP/S, TCP, SMTP, UDP…
A SOAP requestWCF ClientWCF ServicePOST /AccountAccess/Accounts.svcHost: www.quickbank.comSOAPAction: GetBalance…<soap:Envelopexmlns:soap= …  <soap:Body>    <GetBalancexmlns= …      <Account>2</Account>    </GetBalance>  </soap:Body></soap:Envelope>Account 1Account 2Account 3
What is RESTREST = REpresentationalState Transfer! protocol, ! format, ! standard= architectural styleeverything is a resource: Account, Balance …address: www.quickbank.com/Accounts/2uniform interface: HTTP GET, POST, PUT, DELETEroots in WEB facing services (for example Google Search)
A REST requestWCF ClientWCF ServiceGET www.quickbank.com/Accounts/2Account 1Account 2Account 3
Demo: Twitter REST ServiceFormats:XML, JSONRSS, ATOMwebHttpBindingHTTP Transport (Web Message Encoding)
SOAP & REST
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 S3Windows AzureGoogle…
OData: WCF Data ServicesOpen Data ProtocolREST-based protocol for CRUD-style operationsBased on AtomPubFormats: Atom, Xml, JSONDEMO
OData: Existing clients and serversClientsBrowser.NET 3.5, 4.0Java ScriptJava Restlet 2.0PHPASP.NET AJAXExcel 2010 Power PivotLINQPadServers
SQL Azure
SharePoint 2010
SQL Reporting Services

Wcf for the web developer

  • 1.
    WCF for theweb developerFlorin Cardașim, caf@rms.rotwitter: @cardasim, @CodeCampIasiRomSoft, www.rms.roIași, 8th of May 2010
  • 2.
    AgendaWCF today: anoverviewWCF Services for the WEB 2.0SOAP & RESTWCF Data Services
  • 3.
    WCF TodayProgramming ModelSOAPServicesWEB HTTPServicesData ServicesRIA ServicesWorkflow ServicesService ModelData ContractService ContractService BehaviorChannel ModelFormats(XML, JSON, Atom…)Transports(HTTP, TCP, IPC, MSMQ…)Protocols(SOAP, HTTP, Open Data Protocol,…)
  • 4.
    WCF Architecture -ChannelsWCF ServiceWCF ClientChannel A Channel A Channel B Channel B Channel C Channel C Transport Channel Transport Channel HTTP, TCP, MSMQ, etc.
  • 5.
    WCF Architecture -BindingsWCF Service[ServiceContract]interface IExampleB{ . . .}[ServiceContract]interface IExampleA{ . . .}Binding 3Binding 1Binding 2TransactionsTransactionsRMSecuritySecurityTransport HTTPTransport HTTPTransport TCP
  • 6.
    Demo: WCF Servicesfor the WEB 2.0
  • 7.
    What is SOAPSOAP= Simple(?!!) ObjectAccessProtocol=protocol, =standardsadvanced features: security, reliable messaging, transactionstransport neutrality (http, tcp, ipc, msmq …)uses POST when used over HTTProots in enterprise applications
  • 8.
    SOAP-HTTP bindingswsHttpBindingSOAP 1.2TransactionFlowReliable SessionbasicHttpBindingSOAP 1.1Symmetric SecurityHTTP Transport (Text Message Encoding)HTTP Transport (Text Message Encoding)
  • 9.
    SOAP & WS-*MEXPolicyWSDLSEC:Kerberos, Username, X.509, SAMLSecure Conversation, Federation, TrustRM:Reliability, Reliable MessagingTRAN:BussinessAct,Atomic,CoordinationMessaging: SOAP, Addressing, MTOM, Transfer, Discovery…XML: XML, XSD, Digital Signature, EncryptionTransport: HTTP/S, TCP, SMTP, UDP…
  • 10.
    A SOAP requestWCFClientWCF ServicePOST /AccountAccess/Accounts.svcHost: www.quickbank.comSOAPAction: GetBalance…<soap:Envelopexmlns:soap= … <soap:Body> <GetBalancexmlns= … <Account>2</Account> </GetBalance> </soap:Body></soap:Envelope>Account 1Account 2Account 3
  • 11.
    What is RESTREST= REpresentationalState Transfer! protocol, ! format, ! standard= architectural styleeverything is a resource: Account, Balance …address: www.quickbank.com/Accounts/2uniform interface: HTTP GET, POST, PUT, DELETEroots in WEB facing services (for example Google Search)
  • 12.
    A REST requestWCFClientWCF ServiceGET www.quickbank.com/Accounts/2Account 1Account 2Account 3
  • 13.
    Demo: Twitter RESTServiceFormats:XML, JSONRSS, ATOMwebHttpBindingHTTP Transport (Web Message Encoding)
  • 14.
  • 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 S3Windows AzureGoogle…
  • 16.
    OData: WCF DataServicesOpen Data ProtocolREST-based protocol for CRUD-style operationsBased on AtomPubFormats: Atom, Xml, JSONDEMO
  • 17.
    OData: Existing clientsand serversClientsBrowser.NET 3.5, 4.0Java ScriptJava Restlet 2.0PHPASP.NET AJAXExcel 2010 Power PivotLINQPadServers
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
    Your WCF DataServiceResourcesAaron Skonnard, www.pluralsight.comDavid Chappel, www.davidchappel.comhttp://wildermuth.comMichele Bustamante, www.thatindigogirl.comMSDN REST Starter Kit
  • 23.
    Please fill theevaluation formThank you very much!Florin Cardașim, caf@rms.rotwitter: @cardasim, @CodeCampIasiRomSoft, www.rms.roIași, 8th of May 2010
  • 24.
    Demo: REST in.NET 4.0CachingAutomatic format selectionREST Starter Kit:Client APIPaste as Xml

Editor's Notes

  • #3 SOAP (basic-profile, ws-*)REST (xml, json, atom/rss)Why SOAP? Why REST?
  • #4 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
  • #5 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!!!!)
  • #6 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!!!!)
  • #8 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!!!!)
  • #9 Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &amp;client using wcf 4.0
  • #11 Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &amp;client using wcf 4.0
  • #12 Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &amp;client using wcf 4.0
  • #13 Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &amp;client using wcf 4.0
  • #14 Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &amp;client using wcf 4.0
  • #21 Demo:Simple REST service using wcf 4.0 (help page, etc – veziwcf 4.0)Simple ATOM feed service &amp;client using wcf 4.0