IDU0075 Sissejuhatus veebiteenustesse

Slides:



Advertisements
Similar presentations
Pierre-Johan CHARTRE Java EE - JAX-RS - Pierre-Johan CHARTRE
Advertisements

Give it a REST already Arnon Rotem-Gal-Oz VP R&D xsights
System Wide Information Management (SWIM)
Representational State Transfer (REST) Paul Townend 8 th February 2007.
REST - Representational State Transfer
Representational State Transfer (REST): Representing Information in Web 2.0 Applications this is the presentation Emilio F Zegarra CS 2650.
REST Vs. SOAP.
REST Introduction 吴海生 博克软件(杭州)有限公司.
Building and using REST information services Rion Dooley.
Introduction to Web Services
CIS* Service-Oriented Computing
Server Access The REST of the Story David Cleary
REST (Representational State Transfer)
Web Service Testing RESTful Web Services Snejina Lazarova Dimo Mitev
IDU0075 Sissejuhatus veebiteenustesse Tarvo Treier
CS 4720 RESTfulness CS 4720 – Web & Mobile Systems.
Programming Web Services: RPC via SOAP and REST. 2Service-Oriented Computing RPC via SOAP A Web service is typically invoked by sending a SOAP message.
31242/32549 Advanced Internet Programming Advanced Java Programming
Web Services Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
Building RESTful Interfaces
1 Understanding Web Services Presented By: Woodas Lai.
Introduction to Web Services and Web API’s Richard Holowczak Baruch College December, 2014.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
SOAP Quang Vinh Pham Simon De Baets Université Libre de Bruxelles1.
IDU0075 Veebiteenused Tarvo Treier
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
CS 415 N-Tier Application Development By Umair Ashraf July 6,2013 National University of Computer and Emerging Sciences Lecture # 9 Introduction to Web.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
Web Architecture & Services (2) Representational State Transfer (REST)
REST.  REST is an acronym standing for Representational State Transfer  A software architecture style for building scalable web services  Typically,
REST vs SOAP for Web Services Applications and Services in Internet Benjamin Hilaire – 81747L
Wyatt Pearsall November  HyperText Transfer Protocol.
Web Services XML-RPC, SOAP, REST Advanced Web-based Systems | Misbhauddin.
Lecture 15 Introduction to Web Services Web Service Applications.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
IDU0075 Sissejuhatus veebiteenustesse Tarvo Treier
REST - Introduction Based on material from InfoQ.com (Stefan Tilkov) And slides from MindTouch.com (Steve Bjorg) 1.
RESTful Web Service 2014 년 12 월 한연희
1 Seminar on Service Oriented Architecture Principles of REST.
Web Architecture update for WSAWG/WSDL TAG published Principles of the Web Contents: –Identifiers Most of the work –Formats Not much –Protocols Summary.
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Advanced Web Technologies Lecture #4 By: Faraz Ahmed.
Representational State Transfer (REST). What is REST? Network Architectural style Overview: –Resources are defined and addressed –Transmits domain-specific.
RESTful Web Services What is RESTful?
Web Services An Introduction Copyright © Curt Hill.
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
Feeling RESTful? Well, first we’ll define a Web Service –A web page meant to be consumed by a computer via an autonomous program as opposed to a web browser.
Representational State Transfer COMP6017 Topics on Web Services Dr Nicholas Gibbins –
Using Retrofit framework in implementation of Android REST client David Ante Macan*, Zlatko Stapić, Milan Pavlović* University of Zagreb Faculty of Organization.
REST API Design. Application API API = Application Programming Interface APIs expose functionality of an application or service that exists independently.
Java Web Services Orca Knowledge Center – Web Service key concepts.
Tarvo Treier IDU0075 Veebiteenused Tarvo Treier
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
REST: Web Services Abel Sanchez.
REST- Representational State Transfer Enn Õunapuu
Cosc 5/4730 REST services.
Unit – 5 JAVA Web Services
Advanced Web-based Systems | Misbhauddin
WEB API.
Middleware, Services, etc.
REST APIs Maxwell Furman Department of MIS Fox School of Business
Introduction to Web Services and SOA
Week 05 Node.js Week 05
Chengyu Sun California State University, Los Angeles
Presentation transcript:

IDU0075 Sissejuhatus veebiteenustesse Tarvo Treier Tarvo.treier@gmail.com

Tarvo Treier tarvo.treier@gmail.com Täna kavas REST-i tutvustus 5-minuti näide REST-i põhimõtted Twitter-i näide Selle nädala praktumi ülesannete tutvustus Tarvo Treier tarvo.treier@gmail.com

Representational State Transfer (REST) REST is an architecture style for designing networked applications. The idea is that, rather than using complex mechanisms such as CORBA, RPC or SOAP to connect between machines, simple HTTP is used to make calls between machines. Allikas: http://rest.elkstein.org/ Tarvo Treier tarvo.treier@gmail.com 3

Tarvo Treier tarvo.treier@gmail.com Spetsifikatsioon SOAP is a specification. WSDL is a specification. XML Schema is a specification. SOA and REST have no specifications. Tarvo Treier tarvo.treier@gmail.com 4

5-minutiline REST-i sissejuhatus www.xfront.com/5-minute-intro-to-REST.ppt

Tekkelugu REST-i defineeris 2000 aastal oma doktoritöös Roy T. Fielding. Roy T. Fielding on HTTP ja URI standardite kaasautor.

REST ja Web REST doesn’t build on the principles of the Web—the Web was built based on RESTful principles. They just weren’t so named until a few years later. The idea of REST is essentially a reverse-engineering of how the Web works. HTTP itself, and URIs themselves, are written with REST principles.

REST vs SOAP Much like Web Services, a REST service is: Platform-independent (you don't care if the server is Unix, the client is a Mac, or anything else), Language-independent (C# can talk to Java, etc.), Standards-based (runs on top of HTTP). With REST, a simple network connection is all you need. You can even test the API directly, using your browser. Postkaart vs Ümbrikuga kirja saatmine

SOAP (querying a phonebook) <?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:body pb="http://www.acme.com/phonebook"> <pb:GetUserDetails> <pb:UserID>12345</pb:UserID> </pb:GetUserDetails> </soap:Body> </soap:Envelope>

REST (querying a phonebook) http://www.acme.com/phonebook/UserDetails/12345

REST-i põhimõtted REST services are stateless no cookies; Cache-ability is important too, especially for GETs. REST services have a uniform interface There is no WSDL in REST. Interface is provided by the standard HTTP methods (PUT, GET,POST, DELETE). Resources are manipulated through representations The components in the system exchange data (usually XML documents) that represents the resource. XML XHTML JPEG image

Soovituslikud põhimõtted 1 Do not use "physical" URLs. A physical URL points at something physical. Physical: http://www.acme.com/inventory/product003.xml. Logical: http://www.acme.com/inventory/product/003

Soovituslikud põhimõtted 2 Queries should not return an overload of data. If needed, provide a paging mechanism. For example, a "product list" GET request should return the first n products (e.g., the first 10), with next/prev links.

Soovituslikud põhimõtted 3 Even though the REST response can be anything, make sure it's well documented, and do not change the output format lightly (since it will break existing clients). Remember, even if the output is human-readable, your clients aren't human users. If the output is in XML, make sure you document it with a schema.

Soovituslikud põhimõtted 4 Rather than letting clients construct URLs for additional actions, include the actual URLs with REST responses. For example, a "product list" request could return an ID per product, and the specification says that you should use http://www.acme.com/product/PRODUCT_ID to get additional details. That's bad design. Rather, the response should include the actual URL with each item: http://www.acme.com/product/001263, etc. Yes, this means that the output is larger. But it also means that you can easily direct clients to new URLs as needed, without requiring a change in client code.

Soovituslikud põhimõtted 5 GET access requests should never cause a state change. Anything that changes the server state should be a POST request (or other HTTP verbs, such as DELETE) Mis võib juhtuda, kui panete veebi lingi, millega on võimalik näiteks andmebaasist rida kustutada?

Resurss Resources are the key abstractions in REST. They are the remote accessible objects of the application. A resource is a unit of identification. Everything that might be accessed or be manipulated remotely could be a resource. http://soacookbook.com/customers http://soacookbook.com/customers/1234 http://soacookbook.com/orders/456/customer

Twitteri näide http://search.twitter.com/search.atom?q=eesti&count=10 https://dev.twitter.com/docs/api http://search.twitter.com/search.atom?q=eesti&count=10

Kasulikke viiteid http://rest.elkstein.org/ http://www.infoq.com/articles/designing-restful-http-apps-roth