SlideShare ist ein Scribd-Unternehmen logo
1 von 36
RSS, ATOM, JSON, SOAP, RESTWTF? Woody Pewitt Product Manager MindTouch woodyp@mindtouch.com
What is the alphabet soup? RSS Really Simple Syndication ATOM The Atom Syndication Format JSON JavaScript Object Notation SOAP Simple Object Access Protocol REST Representational State Transfer
“Services” Windows Lunix Mainframe HTTP XML RSS SOAP
Proxy Objects
Really Simple Syndication
Really Simple Syndication (RSS) Feeds Format that is used to publish frequently updated information on the Web e.g. blog entries specific channels on news sites ... No single standard RSS 0.91, RSS 1.0 and RSS 2.0 RSS feeds are represented as XML documents
RSS Example <?xmlversion="1.0"encoding="iso-8859-1" ?> <rssversion="2.0">   <channel>     <title>W3Schools Home Page</title>     <link>http://www.w3schools.com</link>     <description>Free web building tutorials</description>     <item>       <title>RSS Tutorial</title>       <link>http://www.w3schools.com/rss</link>       <description>New RSS tutorial on W3Schools</description>     </item>     <item>       <title>XML Tutorial</title>       <link>http://www.w3schools.com/xml</link>       <description>New XML tutorial on W3Schools</description>     </item>     ...   </channel>   ... </rss> many other elements <language>, <copyright>, <pubDate>, ...
ATOM
ATOM Two related standards Atom Syndication Format similar to RSS supports more content formats (e.g. videos) than RSS Atom Publishing Protocol (APP) HTTP-based approach for creating and editing Web resources similar to the RESTful web service example shown earlier
JavaScript Object Notation
JavaScript Object Notation (JSON) Developed as an XML alternative to represent JavaScript objects as strings Easy to produce and faster to parse than XML supports different data types JSON is based on a subset of JavaScript JSON document can be read via the JavaScript eval() function security issues: note that this approach can be dangerous if the source is not trusted since any JavaScript code might be executed most recent browsers offer a JSON parser recognisesonly JSON data types and rejects any scripts Many Web 2.0 Applications offer a JSON interface Flickr, YouTube, Delicious, ...
JSON Data Types
JSON Example { 	"surname": "Signer", 	“forename": "Beat", 	"address": { 		"street": "Pleinlaan 2", 		"city": "Brussels", 		"postalCode": "1050", 		"country": "Belgium" 		}, 	"phoneNumbers": [ 		{ "type": "office", "number": "123 456 789" }, 		{ "type": "fax", "number": "987 654 321" } 		] }
JSON-RPC Simple JSON-encoded remote procedure call protocol that is very similar to XML-RPC { "version": "1.1",  "method": "Math.multiply",  "id": "24034824",  "params": [128.0, 256.0] } { "version": "1.1",  "result": 32768.0,  "error": null,  "id": "24034824" } JSON-RPC Request JSON-RPC Response
Web Services Web-based client-server communication over HTTP Two main types of Web Services Big Web Services Universal Description, Discovery and Integration (UDDI) Web Services Description Language (WSDL) Simple Object Access Protocol (SOAP) RESTful Web Services Better integrated with HTTP and web browsers Making use of PUT, GET and DELETE HTTP methods
Big Web Services
Big Web Services Universal Description, Discovery and Integration (UDDI) yellow pages for WSDL "global" registry describing available business services very complex Microsoft and IBM shut down their public UDDI registries in 2006 Web Service Description Language (WSDL) XML application to describe a Web Service's functionality complex Simple Object Access Protocol (SOAP) defines an envelope for transporting XML messages The Web Service Stack contains many other protocols BPEL, WS-Security, WS-Reliability, WS-Transaction, ...
SOAP
SOAP Successor of XML-RPC Introduced in 1998 as Simple Object Access Protocol Dave Winer, Don Box, Bob Atkinson and Mohsen Al-Ghosein since version 1.2 the name is no longer treated as an acronym XML-based communication protocol A SOAP message consists of an Envelope element which contains an optional <Header> element a <Body> element remote procedure call or response information SOAP requests are often sent via HTTP POST Request
SOAP WS-* services Common in the enterprise Transport neutral XML SOAP (Meta-data) Security, Transactions, Etc. Typically implemented with RPC-based toolkits, feels a lot like COM+
SOAP Message <?xml version="1.0"?> <soap:Header> <…></…> </soap:Header> <soap:Envelope> <soap:Body> <m:GetStockPrice> 	<m:StockName>MSFT</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
SOAP Advantages platform and language independent SOAP over HTTP results in less problems with proxies and firewalls than other remote procedure call solutions There exist a lot of tools and language bindings that automatically create the required client and server-side functionality e.g. Java API for XML Web Services, ASMX, WCF Disadvantages slower than non-verbose protocols Big Web Services are not simple HTTP is reduced to a simple transport protocol for a large amount of XML metadata payload does not make use of the rich functionality offered for HTTP envelopes No mechanism for the caching of results
Representational State Transfer
Representational State Transfer (REST) A REST-style architecture has to conform to the following constraints Separation of concerns between client and server Client and server can be developed and replaced independently Uniform interface identificationof resources (e.g. URIs on the Web) manipulationof resources on the server via representation on the client side self-describing messages (e.g. MIME type on the Web) hypermediafor application state (e.g. hypertext links for related resources) Stateless No client state is stored on the server side Cacheability Responses must explicitly or implicitly define if they are cacheable or not Layering Intermediary servers (proxies) can be transparently added between the client and the server code on demand (optional) The server can send application logic (code) to the client (e.g. Java Applets) A service that conforms at least to the first five constraints is called a RESTful service
REST Common in public facing services Embraces HTTP Services are modeled as “resources” with unique identifiers (URI’s) HTTP defines a uniform service contract: GET, POST, DELETE, HEAD Resources can be represented as XML, RSS, JSON, etc. HTTP provides the necessary features and scalability A successful design pattern used throughout the web today
RESTful Service create or update order #123 PUT http://demo.com/service/order/123 REST Service retrieve order #123 GET http://demo.com/service/order/123 Order #123 delete order #123 DELETE http://demo.com/service/order/123
RESTful Web Service Example POST /users HTTP/1.1 Host: wise.vub.ac.be Content-Type: application/xml <?xml version="1.0"?> <user> <name>Kleinermann</name> </user> GET /users/Kleinermann HTTP/1.1 Host: wise.vub.ac.be Accept: application/xml PUT /users/Kleinermann HTTP/1.1 Host: wise.vub.ac.be Content-Type: application/xml <?xml version="1.0"?> <user> <name>Signer</name> </user> DELETE /users/Signer HTTP/1.1 Host: wise.vub.ac.be Accept: application/xm create read update delete
How Did We Get Here? Libraries Pascal binary API COM DCOM APIs talk
Service-orientation In computing, service-orientation is a design paradigm that specifies the creation of automation logic in the form of services. It is applied as a strategic goal in developing a service-oriented architecture (SOA). Like other design paradigms, service-orientation provides a means of achieving a separation of concerns. http://en.wikipedia.org/wiki/Service-orientation
Microsoft’s First XML SOA Tools ASP.NET Web Services (ASMX) Basic XML Over HTTP (SOAP 1.1/1.2) WEB Services Enhancements (WSE) Support for WS-Security & TCP services
Windows Communication Framework Abstract or Model Transport Message format Message protocols Extensibility Tries to unify all past models and allows for future changes
How to do WCF? Define your data (.NET class) Define service interface (.NET interface) Add WCF attributes Implement service interface (.NET class) Configure endpoints to expose service (.config files)
Endpoints? Endpoint Address Where to send messages Binding How to send messages Contract What messages must contain
How to consume? WCF on the client uses channels to talk to an endpoint Service (waits for messages) Client Channel endpoint endpoint endpoint endpoint endpoint Metadata endpoint endpoint Metadataimport tool
Why use WCF? Developer Productivity Use the same way to communicate all the time Interoperability Flexibility
An Alternative to WCF MindTouch DReAM MindTouch DReAM(Distributed REST Application Manager) is a Web-Oriented Architecture Framework (WOAF) for developing lightweight, highly decoupled web-services.  The framework includes of a REST microserver and classes for web communication, XML processing, and writing highly asynchronous code. Microsoft .NET and Novell Mono http://developer.mindtouch.com/Dream

Weitere ähnliche Inhalte

Was ist angesagt?

PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
Nikhil Jain
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
tutorialsruby
 

Was ist angesagt? (14)

Real-time Ruby for the Real-time Web
Real-time Ruby for the Real-time WebReal-time Ruby for the Real-time Web
Real-time Ruby for the Real-time Web
 
CIS 2015 An Interlude: Token Binding over HTTP - Dirk Balfanz
CIS 2015 An Interlude: Token Binding over HTTP - Dirk BalfanzCIS 2015 An Interlude: Token Binding over HTTP - Dirk Balfanz
CIS 2015 An Interlude: Token Binding over HTTP - Dirk Balfanz
 
Client sidesec 2013 - non js
Client sidesec 2013 - non jsClient sidesec 2013 - non js
Client sidesec 2013 - non js
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Hide email address in sourc...
Hide email address in sourc...Hide email address in sourc...
Hide email address in sourc...
 
Chrome Dev Summit 2020 Extended: Improve Your Web Authentication Security
Chrome Dev Summit 2020 Extended:  Improve Your Web Authentication SecurityChrome Dev Summit 2020 Extended:  Improve Your Web Authentication Security
Chrome Dev Summit 2020 Extended: Improve Your Web Authentication Security
 
Paged Mobile presentation: an easy way of browsing the web
Paged Mobile presentation: an easy way of browsing the webPaged Mobile presentation: an easy way of browsing the web
Paged Mobile presentation: an easy way of browsing the web
 
Kopdar Zimbra-ID , How to use Zimbra SOAP API
Kopdar Zimbra-ID , How to use Zimbra SOAP APIKopdar Zimbra-ID , How to use Zimbra SOAP API
Kopdar Zimbra-ID , How to use Zimbra SOAP API
 
Introduction to Web Technology
Introduction to Web TechnologyIntroduction to Web Technology
Introduction to Web Technology
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 

Ähnlich wie Internet protocalls & WCF/DReAM

Intro to web services
Intro to web servicesIntro to web services
Intro to web services
Neil Ghosh
 
Communication Protocols And Web Services
Communication Protocols And Web ServicesCommunication Protocols And Web Services
Communication Protocols And Web Services
Omer Katz
 
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Mahbubur Rahman
 
Architecting Web Services
Architecting Web ServicesArchitecting Web Services
Architecting Web Services
Lorna Mitchell
 

Ähnlich wie Internet protocalls & WCF/DReAM (20)

Web services - REST and SOAP
Web services - REST and SOAPWeb services - REST and SOAP
Web services - REST and SOAP
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
Communication Protocols And Web Services
Communication Protocols And Web ServicesCommunication Protocols And Web Services
Communication Protocols And Web Services
 
Creating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsCreating Yahoo Mobile Widgets
Creating Yahoo Mobile Widgets
 
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google InfrastructureLiving in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
 
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
 
Internet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian ThilmanyInternet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian Thilmany
 
jkljklj
jkljkljjkljklj
jkljklj
 
SOA and web services
SOA and web servicesSOA and web services
SOA and web services
 
An Introduction to Solr
An Introduction to SolrAn Introduction to Solr
An Introduction to Solr
 
Browser extension
Browser extensionBrowser extension
Browser extension
 
Browser extension
Browser extensionBrowser extension
Browser extension
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
 
SOAP Overview
SOAP OverviewSOAP Overview
SOAP Overview
 
Architecting Web Services
Architecting Web ServicesArchitecting Web Services
Architecting Web Services
 
HTML5 Fundamentals
HTML5 FundamentalsHTML5 Fundamentals
HTML5 Fundamentals
 
Processing XML with Java
Processing XML with JavaProcessing XML with Java
Processing XML with Java
 
.NET Drop 4
.NET Drop 4.NET Drop 4
.NET Drop 4
 

Mehr von Woody Pewitt

Is your C# optimized
Is your C# optimizedIs your C# optimized
Is your C# optimized
Woody Pewitt
 
San Diego Clound Computing Sep 9th
San Diego Clound Computing Sep 9thSan Diego Clound Computing Sep 9th
San Diego Clound Computing Sep 9th
Woody Pewitt
 

Mehr von Woody Pewitt (13)

Developing serverless applications with .NET on AWS
Developing serverless applications with .NET on AWSDeveloping serverless applications with .NET on AWS
Developing serverless applications with .NET on AWS
 
Qcon sf - html5 cross-platform mobile solutions
Qcon sf - html5 cross-platform mobile solutionsQcon sf - html5 cross-platform mobile solutions
Qcon sf - html5 cross-platform mobile solutions
 
Using html5 to build offline applications
Using html5 to build offline applicationsUsing html5 to build offline applications
Using html5 to build offline applications
 
Super quick introduction to html5
Super quick introduction to html5Super quick introduction to html5
Super quick introduction to html5
 
Is your C# optimized
Is your C# optimizedIs your C# optimized
Is your C# optimized
 
Technical debt
Technical debtTechnical debt
Technical debt
 
From port 80 to applications
From port 80 to applicationsFrom port 80 to applications
From port 80 to applications
 
Technical Debt
Technical DebtTechnical Debt
Technical Debt
 
Mobile Web Best Practices
Mobile Web Best PracticesMobile Web Best Practices
Mobile Web Best Practices
 
How To Create Web Sites For Mobile Clients
How To Create Web Sites For Mobile ClientsHow To Create Web Sites For Mobile Clients
How To Create Web Sites For Mobile Clients
 
.Net Garbage Collector 101
.Net Garbage Collector 101.Net Garbage Collector 101
.Net Garbage Collector 101
 
San Diego ASP.NET Meeting Oct 21st
San  Diego  ASP.NET Meeting Oct 21stSan  Diego  ASP.NET Meeting Oct 21st
San Diego ASP.NET Meeting Oct 21st
 
San Diego Clound Computing Sep 9th
San Diego Clound Computing Sep 9thSan Diego Clound Computing Sep 9th
San Diego Clound Computing Sep 9th
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Internet protocalls & WCF/DReAM

  • 1. RSS, ATOM, JSON, SOAP, RESTWTF? Woody Pewitt Product Manager MindTouch woodyp@mindtouch.com
  • 2. What is the alphabet soup? RSS Really Simple Syndication ATOM The Atom Syndication Format JSON JavaScript Object Notation SOAP Simple Object Access Protocol REST Representational State Transfer
  • 3. “Services” Windows Lunix Mainframe HTTP XML RSS SOAP
  • 6. Really Simple Syndication (RSS) Feeds Format that is used to publish frequently updated information on the Web e.g. blog entries specific channels on news sites ... No single standard RSS 0.91, RSS 1.0 and RSS 2.0 RSS feeds are represented as XML documents
  • 7. RSS Example <?xmlversion="1.0"encoding="iso-8859-1" ?> <rssversion="2.0"> <channel> <title>W3Schools Home Page</title> <link>http://www.w3schools.com</link> <description>Free web building tutorials</description> <item> <title>RSS Tutorial</title> <link>http://www.w3schools.com/rss</link> <description>New RSS tutorial on W3Schools</description> </item> <item> <title>XML Tutorial</title> <link>http://www.w3schools.com/xml</link> <description>New XML tutorial on W3Schools</description> </item> ... </channel> ... </rss> many other elements <language>, <copyright>, <pubDate>, ...
  • 9. ATOM Two related standards Atom Syndication Format similar to RSS supports more content formats (e.g. videos) than RSS Atom Publishing Protocol (APP) HTTP-based approach for creating and editing Web resources similar to the RESTful web service example shown earlier
  • 11. JavaScript Object Notation (JSON) Developed as an XML alternative to represent JavaScript objects as strings Easy to produce and faster to parse than XML supports different data types JSON is based on a subset of JavaScript JSON document can be read via the JavaScript eval() function security issues: note that this approach can be dangerous if the source is not trusted since any JavaScript code might be executed most recent browsers offer a JSON parser recognisesonly JSON data types and rejects any scripts Many Web 2.0 Applications offer a JSON interface Flickr, YouTube, Delicious, ...
  • 13. JSON Example { "surname": "Signer", “forename": "Beat", "address": { "street": "Pleinlaan 2", "city": "Brussels", "postalCode": "1050", "country": "Belgium" }, "phoneNumbers": [ { "type": "office", "number": "123 456 789" }, { "type": "fax", "number": "987 654 321" } ] }
  • 14. JSON-RPC Simple JSON-encoded remote procedure call protocol that is very similar to XML-RPC { "version": "1.1", "method": "Math.multiply", "id": "24034824", "params": [128.0, 256.0] } { "version": "1.1", "result": 32768.0, "error": null, "id": "24034824" } JSON-RPC Request JSON-RPC Response
  • 15. Web Services Web-based client-server communication over HTTP Two main types of Web Services Big Web Services Universal Description, Discovery and Integration (UDDI) Web Services Description Language (WSDL) Simple Object Access Protocol (SOAP) RESTful Web Services Better integrated with HTTP and web browsers Making use of PUT, GET and DELETE HTTP methods
  • 17. Big Web Services Universal Description, Discovery and Integration (UDDI) yellow pages for WSDL "global" registry describing available business services very complex Microsoft and IBM shut down their public UDDI registries in 2006 Web Service Description Language (WSDL) XML application to describe a Web Service's functionality complex Simple Object Access Protocol (SOAP) defines an envelope for transporting XML messages The Web Service Stack contains many other protocols BPEL, WS-Security, WS-Reliability, WS-Transaction, ...
  • 18. SOAP
  • 19. SOAP Successor of XML-RPC Introduced in 1998 as Simple Object Access Protocol Dave Winer, Don Box, Bob Atkinson and Mohsen Al-Ghosein since version 1.2 the name is no longer treated as an acronym XML-based communication protocol A SOAP message consists of an Envelope element which contains an optional <Header> element a <Body> element remote procedure call or response information SOAP requests are often sent via HTTP POST Request
  • 20. SOAP WS-* services Common in the enterprise Transport neutral XML SOAP (Meta-data) Security, Transactions, Etc. Typically implemented with RPC-based toolkits, feels a lot like COM+
  • 21. SOAP Message <?xml version="1.0"?> <soap:Header> <…></…> </soap:Header> <soap:Envelope> <soap:Body> <m:GetStockPrice> <m:StockName>MSFT</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
  • 22. SOAP Advantages platform and language independent SOAP over HTTP results in less problems with proxies and firewalls than other remote procedure call solutions There exist a lot of tools and language bindings that automatically create the required client and server-side functionality e.g. Java API for XML Web Services, ASMX, WCF Disadvantages slower than non-verbose protocols Big Web Services are not simple HTTP is reduced to a simple transport protocol for a large amount of XML metadata payload does not make use of the rich functionality offered for HTTP envelopes No mechanism for the caching of results
  • 24. Representational State Transfer (REST) A REST-style architecture has to conform to the following constraints Separation of concerns between client and server Client and server can be developed and replaced independently Uniform interface identificationof resources (e.g. URIs on the Web) manipulationof resources on the server via representation on the client side self-describing messages (e.g. MIME type on the Web) hypermediafor application state (e.g. hypertext links for related resources) Stateless No client state is stored on the server side Cacheability Responses must explicitly or implicitly define if they are cacheable or not Layering Intermediary servers (proxies) can be transparently added between the client and the server code on demand (optional) The server can send application logic (code) to the client (e.g. Java Applets) A service that conforms at least to the first five constraints is called a RESTful service
  • 25. REST Common in public facing services Embraces HTTP Services are modeled as “resources” with unique identifiers (URI’s) HTTP defines a uniform service contract: GET, POST, DELETE, HEAD Resources can be represented as XML, RSS, JSON, etc. HTTP provides the necessary features and scalability A successful design pattern used throughout the web today
  • 26. RESTful Service create or update order #123 PUT http://demo.com/service/order/123 REST Service retrieve order #123 GET http://demo.com/service/order/123 Order #123 delete order #123 DELETE http://demo.com/service/order/123
  • 27. RESTful Web Service Example POST /users HTTP/1.1 Host: wise.vub.ac.be Content-Type: application/xml <?xml version="1.0"?> <user> <name>Kleinermann</name> </user> GET /users/Kleinermann HTTP/1.1 Host: wise.vub.ac.be Accept: application/xml PUT /users/Kleinermann HTTP/1.1 Host: wise.vub.ac.be Content-Type: application/xml <?xml version="1.0"?> <user> <name>Signer</name> </user> DELETE /users/Signer HTTP/1.1 Host: wise.vub.ac.be Accept: application/xm create read update delete
  • 28. How Did We Get Here? Libraries Pascal binary API COM DCOM APIs talk
  • 29. Service-orientation In computing, service-orientation is a design paradigm that specifies the creation of automation logic in the form of services. It is applied as a strategic goal in developing a service-oriented architecture (SOA). Like other design paradigms, service-orientation provides a means of achieving a separation of concerns. http://en.wikipedia.org/wiki/Service-orientation
  • 30. Microsoft’s First XML SOA Tools ASP.NET Web Services (ASMX) Basic XML Over HTTP (SOAP 1.1/1.2) WEB Services Enhancements (WSE) Support for WS-Security & TCP services
  • 31. Windows Communication Framework Abstract or Model Transport Message format Message protocols Extensibility Tries to unify all past models and allows for future changes
  • 32. How to do WCF? Define your data (.NET class) Define service interface (.NET interface) Add WCF attributes Implement service interface (.NET class) Configure endpoints to expose service (.config files)
  • 33. Endpoints? Endpoint Address Where to send messages Binding How to send messages Contract What messages must contain
  • 34. How to consume? WCF on the client uses channels to talk to an endpoint Service (waits for messages) Client Channel endpoint endpoint endpoint endpoint endpoint Metadata endpoint endpoint Metadataimport tool
  • 35. Why use WCF? Developer Productivity Use the same way to communicate all the time Interoperability Flexibility
  • 36. An Alternative to WCF MindTouch DReAM MindTouch DReAM(Distributed REST Application Manager) is a Web-Oriented Architecture Framework (WOAF) for developing lightweight, highly decoupled web-services.  The framework includes of a REST microserver and classes for web communication, XML processing, and writing highly asynchronous code. Microsoft .NET and Novell Mono http://developer.mindtouch.com/Dream