Presentation is loading. Please wait.

Presentation is loading. Please wait.

What are Web Services? How to use them? Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer

Similar presentations


Presentation on theme: "What are Web Services? How to use them? Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer"— Presentation transcript:

1 What are Web Services? How to use them? Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer http://www.minkov.it

2 Web Services Web Services RESTful Web Services RESTful Web Services XML, JSON, RSS XML, JSON, RSS

3

4 Web service is Web service is Method of communication between two electronic devices over the web Method of communication between two electronic devices over the web Software system designed to support interoperable m Software system designed to support interoperable m Mostly web services are SOAP-based Mostly web services are SOAP-based Send/receive messages through HTTP web protocol Send/receive messages through HTTP web protocol

5 Two major types of web services Two major types of web services REST Web services REST Web services The primary purpose of the service is to manipulate XML/JSON representations of Web resources using a uniform set of "stateless" operations The primary purpose of the service is to manipulate XML/JSON representations of Web resources using a uniform set of "stateless" operations Arbitrary Web services Arbitrary Web services The service may expose an arbitrary set of operations The service may expose an arbitrary set of operations

6 Lightweight Architecture for Web Services

7 "Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web." http://en.wikipedia.org/wiki/Representational_State_Transfer Application state and functionality are resources Application state and functionality are resources Every resource has an URI Every resource has an URI All resources share a uniform interface All resources share a uniform interface This natively maps to the HTTP protocol This natively maps to the HTTP protocol

8 One URI for a resource, multiple operations One URI for a resource, multiple operations Add a new document "RestTalk" in category "Code" Add a new document "RestTalk" in category "Code" PUT http://mysite.com/docs/Code/RestTalk PUT http://mysite.com/docs/Code/RestTalkhttp://mysite.com/docs/Code/RestTalk Get the document / some page Get the document / some page GET http://mysite.com/docs/Code/RestTalk GET http://mysite.com/docs/Code/RestTalkhttp://mysite.com/docs/Code/RestTalk GET http://mysite.com/docs/Code/RestTalk/pages/3 GET http://mysite.com/docs/Code/RestTalk/pages/3http://mysite.com/docs/Code/RestTalk/pages/3 Remove the document Remove the document DELETE http://mysite.com/docs/Code/RestTalk DELETE http://mysite.com/docs/Code/RestTalkhttp://mysite.com/docs/Code/RestTalk Retrieve metadata Retrieve metadata HEAD http://mysite.com/docs/Code/RestTalk HEAD http://mysite.com/docs/Code/RestTalkhttp://mysite.com/docs/Code/RestTalk 8

9 Comparing the Common Service Data Formats

10 XML is markup-language for encoding documents in machine-readable form XML is markup-language for encoding documents in machine-readable form Text-based format Text-based format Consists of tags, attributes and content Consists of tags, attributes and content Provide data and meta-data in the same time Provide data and meta-data in the same time 10 HTML 5 Bay Ivan HTML 5 Bay Ivan WPF 4 Microsoft WPF 4 Microsoft WCF 4 Kaka Mara WCF 4 Kaka Mara UML 2.0 Bay Ali UML 2.0 Bay Ali

11 JSON (JavaScript Object Notation) JSON (JavaScript Object Notation) Standard for representing simple data structures and associative arrays Standard for representing simple data structures and associative arrays Lightweight text-based open standard Lightweight text-based open standard Derived from the JavaScript language Derived from the JavaScript language 11 { "firstName": "John", "lastName": "Smith", "age": 25, "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "33 Alex. Malinov Blvd.", "address": { "streetAddress": "33 Alex. Malinov Blvd.", "city": "Sofia", "postalCode": "10021" }, "city": "Sofia", "postalCode": "10021" }, "phoneNumber": [{ "type": "home", "number": "212 555-1234"}, "phoneNumber": [{ "type": "home", "number": "212 555-1234"}, { "type": "fax", "number": "646 555-4567" }] { "type": "fax", "number": "646 555-4567" }]}, { "firstName": "Bay", "lastName": "Ivan", "age": 79 }

12 RSS (Really Simple Syndication) RSS (Really Simple Syndication) Family of Web feed formats for publishing frequently updated works Family of Web feed formats for publishing frequently updated works E.g. blog entries, news headlines, videos, etc. E.g. blog entries, news headlines, videos, etc. Based on XML, with standardized XSD schema Based on XML, with standardized XSD schema RSS documents (feeds) are list of items RSS documents (feeds) are list of items Each containing title, author, publish date, summarized text, and metadata Each containing title, author, publish date, summarized text, and metadata Atom protocol aimed to enhance / replace RSS Atom protocol aimed to enhance / replace RSS 12

13 13 W3Schools Home Page W3Schools Home Page http://www.w3schools.com http://www.w3schools.com Free web building tutorials Free web building tutorials RSS Tutorial RSS Tutorial http://www.w3schools.com/rss http://www.w3schools.com/rss New RSS tutorial on W3Schools New RSS tutorial on W3Schools XML Tutorial XML Tutorial http://www.w3schools.com/xml http://www.w3schools.com/xml New XML tutorial on W3Schools New XML tutorial on W3Schools

14 Questions?


Download ppt "What are Web Services? How to use them? Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer"

Similar presentations


Ads by Google