SlideShare a Scribd company logo
1 of 43
Download to read offline
Gran Sasso Science Institute
Ivano Malavolta
REST
Roadmap
The REST Architectural Style
Resources
Representations
Actions
REST
It stands for
REpresentational
State Transfer
Proposed by Roy Fieldings
in his PhD dissertation in 2000
REST rules the architectureof
the World Wide Web (HTTP)
Major players
REST Architectural Style
REST is neither a technology nor a framework
REST is an ArchitecturalStyle
à a set of principles + constraints
Those constraints help us in developing applicationsthatare
“easy” to maintainand extend
REST Main Constraints
A RESTful system
• is client-server
• is stateless
– there should be no need for the service to keep users’
sessions
– each request should be independent of others
• has to support a caching system
• has to be uniformlyaccessible
– each resource must have a unique address and a validpoint
of access
The (static) Web as a RESTful system
1. you type a URL into your browser to reach a specific HTML
page
2. the browser gets and displays the elements of the HTML page
à the browser is getting a representationof the currentstate
of that resource
REST Main Actors
These are the abstractionsthatmake a RESTful system:
• Resources
• Representations
• Actions
Roadmap
The REST Architectural Style
Resources
Representations
Actions
Resources
A resource is “everything”the service can provide
Statesand functions of a remote applicationarealso considered
as resources
Example of resources:
• titleof a movie from IMDb
• a Flash movie from YouTube
• images from Flickr
• order info from eBay
• etc.
Resources
In general, a RESTful resource is anythingthat is addressable
over the Web
Addressable = anythingthatcan be accessed and transferred
between client and server
à a resource must have a unique address overthe Web
Under HTTP these are URIs
URIs
UniformResource Identifier
in a RESTful web service is a hyperlinkto a resource
It is the only means forclients and servers to exchange
representationsof resources
ex.
.../orderinfo?id=123
URIs
The URI is not meant to change over time
à it is the only means to identify a specific resource
URIs are also used to negotiaterepresentations of a given
resource
In the URI you give certainparameters thatdefine which
informationyou wantthe server to returnto you (just like
giving GET variablesto a page)
The server will respond with a resource representation
containingthe information you’veasked
Roadmap
The REST Architectural Style
Resources
Representations
Actions
Representations
The representationof resources is whatis sent back and forth
between clients and servers
So, we neversend or receive resources, only theirrepresentations
URL
UniformResource Locator
A URL is a specializationof URI that defines the networklocation
of a specific resource
Unlike a URI, the URL defines how the resource can be obtained
es.
http://some.domain.com/orderinfo?id=123
URL
URIs and URLs are also used to link resources together
ex.
Representations
The formatof the representationis determined by the content-
type
The interactionof the representationon the resource is
determined by the action (GET, SET,etc.)
Content-types
Since we are using HTTP to communicate,we can transferany
kind of informationthatcan be passed between clients and
servers
ex. text files, PDF documents, images, videos, etc.
In anycase, the data is streamed over TCP/IPand the browser
knows how to interpretthe binary streams because of the
HTTP protocolresponse header Content-Type
Representation Formats
Different clients are able to consume differentrepresentations
of the same resource
A representationcan take various forms, such as:
• image
• a text file
• an XML stream
• a JSON stream
but its resource has to be availablethroughthe same URI
Representation Formats
For human-generated requests through a web browser, a
representationis typicallyinthe form of an HTML page
For automatedrequests from other web services, readabilityis
not as importantand a more efficient representationcan be
used such as XML or JSON
Roadmap
The REST Architectural Style
Resources
Representations
Actions
Actions
Actions are used to operate on resources
For example, they can be usedfor
– getting info about a movie
– addinga photo to Flickr
– deleting a file from a folder
The datatransmitted to and from the resource is a representation
of it
HTTP-based Actions
Under HTTP, actions are standardHTTP request:
GET
POST
PUT
DELETE
They make up the uniform interfaceused for client/serverdata
transfers
HTTP-based Actions
RESTful web services can also execute logic at the server level,
but remember thatevery result must be a resource
representation
HTTP as Uniform Interface
In RESTful systems we focus on resource names, whereas in
traditionalweb systems we focussed on the actions to be
performed on resources
à In RESTful systems we have fourspecific actionsthat we can
take upon resources — Create,Retrieve, Update,and Delete
(CRUD)
In traditionalweb applications,we could have countless actions
with no naming or implementationstandards
The Classroom Example
Artificialexample of a web service handling students in some
classroom
Locationof the service = http://restfuljava.com/
Resources are represented as XML streams
The Classroom Example: URIs
Student (identified by name):
http://restfuljava.com/students/{name}
List of students:
http://restfuljava.com/students
The Classroom Example: Representations
Student:
<student>
<name>Jane</name>
<age>10</age>
<link>/students/Jane</link>
</student>
The Classroom Example: Representations
Students List:
<students>
<student>
<name>Jane</name>
<age>10</age>
<link>/students/Jane</link>
</student>
<student>
<name>John</name>
<age>11</age>
<link>/students/John</link>
</student>
</students>
GET
The method GET is used to RETRIEVE resources
It cannot have side-effects
àit can be done repeatedly withoutchanging the state of the
resource
It can also returnonly parts of the resource
à it can act as both a read operation and a query operation
GET Example
POST
The method POST is used to CREATE resources
Usually,the resource identity/URLis not known at creationtime
à The URL of the newly createdresource is usually created
automaticallybythe server
POST Example
PUT
The method PUT is used to UPDATE resources
Recurrent PUT workflow:
1. we firstGET the representationof the resource we need to
update
2. in the client we update the resource with the new value(s)
3. we update the resource using a PUT request togetherwith
the representationas its payload
PUT Example
The initial GET
is omitted here
DELETE
The method DELETE is used to DELETE resources
SimilarlytoPUT, also in this case we need the URI of the resource
being deleted
DELETE Example
A note on PUT and DELETE
PUT and DELETE apply to the entire resource
à when doinga PUT or DELETE operation,
the entire resource is replaced/deleted
The PUT and DELETE operations are atomic
à if two PUT/DELETE operations occur simultaneously,
one of them will win and determine the final state of
the resource
HTTP Status Codes
RESTful services use these codes to return informationaboutthe
response of the requests
1xx informationalmessage
2xx success message
3xx redirectsthe client to another URL
4xx client-side error
5xx server-side error
LAB
Extend the app of the previous labs so that products and
producers are real data coming from the Loveitaly VM
Another example of Rest API: http://www.nestoria.co.uk/help/api
http://api.nestoria.it/api?place_name=laquila&encoding=json&pretty=1&listing_type=buy&country=it&action=search_listings
References
http://bit.ly/JA1UPT
CordovaFacebook plugin:
http://goo.gl/7qY54
Facebook login withoutplugin:
http://github.com/ccoenraets/OpenFB
Contact
Ivano Malavolta |
Gran Sasso Science Institute
iivanoo
ivano.malavolta@gssi.infn.it
www.ivanomalavolta.com

More Related Content

What's hot

MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Reviewnetc2012
 
Session 36 - JSP - Part 1
Session 36 - JSP - Part 1Session 36 - JSP - Part 1
Session 36 - JSP - Part 1PawanMM
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design PatternsPawanMM
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate pptAneega
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsSagara Gunathunga
 
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivityVaishali Modi
 
Java spring framework
Java spring frameworkJava spring framework
Java spring frameworkRajiv Gupta
 
JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup Sagara Gunathunga
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsPawanMM
 
Connecting to external_application
Connecting to external_applicationConnecting to external_application
Connecting to external_applicationRajarajan Sadhasivam
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationIMC Institute
 

What's hot (20)

Dataweave
DataweaveDataweave
Dataweave
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
Session 36 - JSP - Part 1
Session 36 - JSP - Part 1Session 36 - JSP - Part 1
Session 36 - JSP - Part 1
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate ppt
 
Struts course material
Struts course materialStruts course material
Struts course material
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rs
 
Mvc4
Mvc4Mvc4
Mvc4
 
Hibernate 3
Hibernate 3Hibernate 3
Hibernate 3
 
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivity
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
 
Spring mvc 2.0
Spring mvc 2.0Spring mvc 2.0
Spring mvc 2.0
 
JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup JavaEE and RESTful development - WSO2 Colombo Meetup
JavaEE and RESTful development - WSO2 Colombo Meetup
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
 
Connecting to external_application
Connecting to external_applicationConnecting to external_application
Connecting to external_application
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web Application
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
MVC
MVCMVC
MVC
 

Viewers also liked

[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JSIvano Malavolta
 
[2015/2016] Apache Cordova APIs
[2015/2016] Apache Cordova APIs[2015/2016] Apache Cordova APIs
[2015/2016] Apache Cordova APIsIvano Malavolta
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
[2015/2016] Mobile thinking
[2015/2016] Mobile thinking[2015/2016] Mobile thinking
[2015/2016] Mobile thinkingIvano Malavolta
 
[2015/2016] User-centred design
[2015/2016] User-centred design[2015/2016] User-centred design
[2015/2016] User-centred designIvano Malavolta
 
[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mapping[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mappingIvano Malavolta
 
The road ahead for architectural languages [ACVI 2016]
The road ahead for architectural languages [ACVI 2016]The road ahead for architectural languages [ACVI 2016]
The road ahead for architectural languages [ACVI 2016]Ivano Malavolta
 
[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile appsIvano Malavolta
 
[2015/2016] Modern development paradigms
[2015/2016] Modern development paradigms[2015/2016] Modern development paradigms
[2015/2016] Modern development paradigmsIvano Malavolta
 
[2015/2016] AADL (Architecture Analysis and Design Language)
[2015/2016] AADL (Architecture Analysis and Design Language)[2015/2016] AADL (Architecture Analysis and Design Language)
[2015/2016] AADL (Architecture Analysis and Design Language)Ivano Malavolta
 
[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architecture[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architectureIvano Malavolta
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 RefresherIvano Malavolta
 
Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...
Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...
Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...Ivano Malavolta
 
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...Ivano Malavolta
 
[2015/2016] User experience design of mobil apps
[2015/2016] User experience design of mobil apps[2015/2016] User experience design of mobil apps
[2015/2016] User experience design of mobil appsIvano Malavolta
 
Design patterns for mobile apps
Design patterns for mobile appsDesign patterns for mobile apps
Design patterns for mobile appsIvano Malavolta
 
Mission planning of autonomous quadrotors
Mission planning of autonomous quadrotorsMission planning of autonomous quadrotors
Mission planning of autonomous quadrotorsIvano Malavolta
 
Beyond Native Apps: Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...
Beyond Native Apps:  Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...Beyond Native Apps:  Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...
Beyond Native Apps: Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...Ivano Malavolta
 

Viewers also liked (20)

[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS
 
[2015/2016] Apache Cordova APIs
[2015/2016] Apache Cordova APIs[2015/2016] Apache Cordova APIs
[2015/2016] Apache Cordova APIs
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
[2015/2016] Mobile thinking
[2015/2016] Mobile thinking[2015/2016] Mobile thinking
[2015/2016] Mobile thinking
 
[2015/2016] Backbone JS
[2015/2016] Backbone JS[2015/2016] Backbone JS
[2015/2016] Backbone JS
 
[2015/2016] User-centred design
[2015/2016] User-centred design[2015/2016] User-centred design
[2015/2016] User-centred design
 
[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mapping[2015/2016] Geolocation and mapping
[2015/2016] Geolocation and mapping
 
[2015/2016] JavaScript
[2015/2016] JavaScript[2015/2016] JavaScript
[2015/2016] JavaScript
 
The road ahead for architectural languages [ACVI 2016]
The road ahead for architectural languages [ACVI 2016]The road ahead for architectural languages [ACVI 2016]
The road ahead for architectural languages [ACVI 2016]
 
[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps[2015/2016] Local data storage for web-based mobile apps
[2015/2016] Local data storage for web-based mobile apps
 
[2015/2016] Modern development paradigms
[2015/2016] Modern development paradigms[2015/2016] Modern development paradigms
[2015/2016] Modern development paradigms
 
[2015/2016] AADL (Architecture Analysis and Design Language)
[2015/2016] AADL (Architecture Analysis and Design Language)[2015/2016] AADL (Architecture Analysis and Design Language)
[2015/2016] AADL (Architecture Analysis and Design Language)
 
[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architecture[2015/2016] Introduction to software architecture
[2015/2016] Introduction to software architecture
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher
 
Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...
Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...
Web-based Hybrid Mobile Apps: State of the Practice and Research opportunitie...
 
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...
Leveraging Web Analytics for Automatically Generating Mobile Navigation Model...
 
[2015/2016] User experience design of mobil apps
[2015/2016] User experience design of mobil apps[2015/2016] User experience design of mobil apps
[2015/2016] User experience design of mobil apps
 
Design patterns for mobile apps
Design patterns for mobile appsDesign patterns for mobile apps
Design patterns for mobile apps
 
Mission planning of autonomous quadrotors
Mission planning of autonomous quadrotorsMission planning of autonomous quadrotors
Mission planning of autonomous quadrotors
 
Beyond Native Apps: Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...
Beyond Native Apps:  Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...Beyond Native Apps:  Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...
Beyond Native Apps: Web Technologies to the Rescue! [SPLASH 2016 - Mobile! k...
 

Similar to [2015/2016] The REST architectural style

Restful Fundamentals
Restful FundamentalsRestful Fundamentals
Restful FundamentalsSuresh Madhra
 
Restful Fundamentals
Restful FundamentalsRestful Fundamentals
Restful FundamentalsSuresh Madhra
 
RESTFul WebApp Concept
RESTFul WebApp ConceptRESTFul WebApp Concept
RESTFul WebApp ConceptDian Aditya
 
RESTFul WebApp Concept
RESTFul WebApp ConceptRESTFul WebApp Concept
RESTFul WebApp ConceptDian Aditya
 
Network Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyNetwork Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyPayal Jain
 
Rest and beyond
Rest and beyondRest and beyond
Rest and beyondMing Yuan
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
 
JAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJerry Kurian
 
The Rest Architectural Style
The Rest Architectural StyleThe Rest Architectural Style
The Rest Architectural StyleRobert Wilson
 
Creating Restful Web Services with restish
Creating Restful Web Services with restishCreating Restful Web Services with restish
Creating Restful Web Services with restishGrig Gheorghiu
 

Similar to [2015/2016] The REST architectural style (20)

Rest
Rest Rest
Rest
 
REST Basics
REST BasicsREST Basics
REST Basics
 
Restful Fundamentals
Restful FundamentalsRestful Fundamentals
Restful Fundamentals
 
Restful Fundamentals
Restful FundamentalsRestful Fundamentals
Restful Fundamentals
 
ROA.ppt
ROA.pptROA.ppt
ROA.ppt
 
RESTFul WebApp Concept
RESTFul WebApp ConceptRESTFul WebApp Concept
RESTFul WebApp Concept
 
RESTFul WebApp Concept
RESTFul WebApp ConceptRESTFul WebApp Concept
RESTFul WebApp Concept
 
ReSTful API Final
ReSTful API FinalReSTful API Final
ReSTful API Final
 
Network Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyNetwork Device Database Management with REST using Jersey
Network Device Database Management with REST using Jersey
 
Rest and beyond
Rest and beyondRest and beyond
Rest and beyond
 
Rest introduction
Rest introductionRest introduction
Rest introduction
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful Services
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
Salesforce REST API
Salesforce  REST API Salesforce  REST API
Salesforce REST API
 
JAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with Java
 
Rest Webservice
Rest WebserviceRest Webservice
Rest Webservice
 
Rest and Rails
Rest and RailsRest and Rails
Rest and Rails
 
The Rest Architectural Style
The Rest Architectural StyleThe Rest Architectural Style
The Rest Architectural Style
 
Creating Restful Web Services with restish
Creating Restful Web Services with restishCreating Restful Web Services with restish
Creating Restful Web Services with restish
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 

More from Ivano Malavolta

Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...Ivano Malavolta
 
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)
The Green Lab - Research cocktail  @Vrije Universiteit Amsterdam (October 2020)The Green Lab - Research cocktail  @Vrije Universiteit Amsterdam (October 2020)
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)Ivano Malavolta
 
Software sustainability and Green IT
Software sustainability and Green ITSoftware sustainability and Green IT
Software sustainability and Green ITIvano Malavolta
 
Navigation-aware and Personalized Prefetching of Network Requests in Android ...
Navigation-aware and Personalized Prefetching of Network Requests in Android ...Navigation-aware and Personalized Prefetching of Network Requests in Android ...
Navigation-aware and Personalized Prefetching of Network Requests in Android ...Ivano Malavolta
 
How Maintainability Issues of Android Apps Evolve [ICSME 2018]
How Maintainability Issues of Android Apps Evolve [ICSME 2018]How Maintainability Issues of Android Apps Evolve [ICSME 2018]
How Maintainability Issues of Android Apps Evolve [ICSME 2018]Ivano Malavolta
 
Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...Ivano Malavolta
 
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...Ivano Malavolta
 
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...Ivano Malavolta
 
Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...Ivano Malavolta
 
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...Ivano Malavolta
 
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...Ivano Malavolta
 
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Ivano Malavolta
 
Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...Ivano Malavolta
 
[2017/2018] Agile development
[2017/2018] Agile development[2017/2018] Agile development
[2017/2018] Agile developmentIvano Malavolta
 
Reconstructing microservice-based architectures
Reconstructing microservice-based architecturesReconstructing microservice-based architectures
Reconstructing microservice-based architecturesIvano Malavolta
 
[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design Language[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design LanguageIvano Malavolta
 
[2017/2018] Architectural languages
[2017/2018] Architectural languages[2017/2018] Architectural languages
[2017/2018] Architectural languagesIvano Malavolta
 
[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software Architecture[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software ArchitectureIvano Malavolta
 
[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineeringIvano Malavolta
 

More from Ivano Malavolta (20)

Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
 
The H2020 experience
The H2020 experienceThe H2020 experience
The H2020 experience
 
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)
The Green Lab - Research cocktail  @Vrije Universiteit Amsterdam (October 2020)The Green Lab - Research cocktail  @Vrije Universiteit Amsterdam (October 2020)
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)
 
Software sustainability and Green IT
Software sustainability and Green ITSoftware sustainability and Green IT
Software sustainability and Green IT
 
Navigation-aware and Personalized Prefetching of Network Requests in Android ...
Navigation-aware and Personalized Prefetching of Network Requests in Android ...Navigation-aware and Personalized Prefetching of Network Requests in Android ...
Navigation-aware and Personalized Prefetching of Network Requests in Android ...
 
How Maintainability Issues of Android Apps Evolve [ICSME 2018]
How Maintainability Issues of Android Apps Evolve [ICSME 2018]How Maintainability Issues of Android Apps Evolve [ICSME 2018]
How Maintainability Issues of Android Apps Evolve [ICSME 2018]
 
Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...
 
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...
 
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
 
Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...
 
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
 
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
 
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
 
Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...
 
[2017/2018] Agile development
[2017/2018] Agile development[2017/2018] Agile development
[2017/2018] Agile development
 
Reconstructing microservice-based architectures
Reconstructing microservice-based architecturesReconstructing microservice-based architectures
Reconstructing microservice-based architectures
 
[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design Language[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design Language
 
[2017/2018] Architectural languages
[2017/2018] Architectural languages[2017/2018] Architectural languages
[2017/2018] Architectural languages
 
[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software Architecture[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software Architecture
 
[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering
 

Recently uploaded

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 2024Results
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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 slidevu2urc
 
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?Antenna Manufacturer Coco
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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.pptxMalak Abu Hammad
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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...Martijn de Jong
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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)wesley chun
 
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 MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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.pptxKatpro Technologies
 
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...Drew Madelung
 

Recently uploaded (20)

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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
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?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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)
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
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...
 

[2015/2016] The REST architectural style

  • 1. Gran Sasso Science Institute Ivano Malavolta REST
  • 2. Roadmap The REST Architectural Style Resources Representations Actions
  • 3. REST It stands for REpresentational State Transfer Proposed by Roy Fieldings in his PhD dissertation in 2000 REST rules the architectureof the World Wide Web (HTTP)
  • 5. REST Architectural Style REST is neither a technology nor a framework REST is an ArchitecturalStyle à a set of principles + constraints Those constraints help us in developing applicationsthatare “easy” to maintainand extend
  • 6. REST Main Constraints A RESTful system • is client-server • is stateless – there should be no need for the service to keep users’ sessions – each request should be independent of others • has to support a caching system • has to be uniformlyaccessible – each resource must have a unique address and a validpoint of access
  • 7. The (static) Web as a RESTful system 1. you type a URL into your browser to reach a specific HTML page 2. the browser gets and displays the elements of the HTML page à the browser is getting a representationof the currentstate of that resource
  • 8. REST Main Actors These are the abstractionsthatmake a RESTful system: • Resources • Representations • Actions
  • 9. Roadmap The REST Architectural Style Resources Representations Actions
  • 10. Resources A resource is “everything”the service can provide Statesand functions of a remote applicationarealso considered as resources Example of resources: • titleof a movie from IMDb • a Flash movie from YouTube • images from Flickr • order info from eBay • etc.
  • 11. Resources In general, a RESTful resource is anythingthat is addressable over the Web Addressable = anythingthatcan be accessed and transferred between client and server à a resource must have a unique address overthe Web Under HTTP these are URIs
  • 12. URIs UniformResource Identifier in a RESTful web service is a hyperlinkto a resource It is the only means forclients and servers to exchange representationsof resources ex. .../orderinfo?id=123
  • 13. URIs The URI is not meant to change over time à it is the only means to identify a specific resource URIs are also used to negotiaterepresentations of a given resource In the URI you give certainparameters thatdefine which informationyou wantthe server to returnto you (just like giving GET variablesto a page) The server will respond with a resource representation containingthe information you’veasked
  • 14. Roadmap The REST Architectural Style Resources Representations Actions
  • 15. Representations The representationof resources is whatis sent back and forth between clients and servers So, we neversend or receive resources, only theirrepresentations
  • 16. URL UniformResource Locator A URL is a specializationof URI that defines the networklocation of a specific resource Unlike a URI, the URL defines how the resource can be obtained es. http://some.domain.com/orderinfo?id=123
  • 17. URL URIs and URLs are also used to link resources together ex.
  • 18. Representations The formatof the representationis determined by the content- type The interactionof the representationon the resource is determined by the action (GET, SET,etc.)
  • 19. Content-types Since we are using HTTP to communicate,we can transferany kind of informationthatcan be passed between clients and servers ex. text files, PDF documents, images, videos, etc. In anycase, the data is streamed over TCP/IPand the browser knows how to interpretthe binary streams because of the HTTP protocolresponse header Content-Type
  • 20. Representation Formats Different clients are able to consume differentrepresentations of the same resource A representationcan take various forms, such as: • image • a text file • an XML stream • a JSON stream but its resource has to be availablethroughthe same URI
  • 21. Representation Formats For human-generated requests through a web browser, a representationis typicallyinthe form of an HTML page For automatedrequests from other web services, readabilityis not as importantand a more efficient representationcan be used such as XML or JSON
  • 22. Roadmap The REST Architectural Style Resources Representations Actions
  • 23. Actions Actions are used to operate on resources For example, they can be usedfor – getting info about a movie – addinga photo to Flickr – deleting a file from a folder The datatransmitted to and from the resource is a representation of it
  • 24. HTTP-based Actions Under HTTP, actions are standardHTTP request: GET POST PUT DELETE They make up the uniform interfaceused for client/serverdata transfers
  • 25. HTTP-based Actions RESTful web services can also execute logic at the server level, but remember thatevery result must be a resource representation
  • 26. HTTP as Uniform Interface In RESTful systems we focus on resource names, whereas in traditionalweb systems we focussed on the actions to be performed on resources à In RESTful systems we have fourspecific actionsthat we can take upon resources — Create,Retrieve, Update,and Delete (CRUD) In traditionalweb applications,we could have countless actions with no naming or implementationstandards
  • 27. The Classroom Example Artificialexample of a web service handling students in some classroom Locationof the service = http://restfuljava.com/ Resources are represented as XML streams
  • 28. The Classroom Example: URIs Student (identified by name): http://restfuljava.com/students/{name} List of students: http://restfuljava.com/students
  • 29. The Classroom Example: Representations Student: <student> <name>Jane</name> <age>10</age> <link>/students/Jane</link> </student>
  • 30. The Classroom Example: Representations Students List: <students> <student> <name>Jane</name> <age>10</age> <link>/students/Jane</link> </student> <student> <name>John</name> <age>11</age> <link>/students/John</link> </student> </students>
  • 31. GET The method GET is used to RETRIEVE resources It cannot have side-effects àit can be done repeatedly withoutchanging the state of the resource It can also returnonly parts of the resource à it can act as both a read operation and a query operation
  • 33. POST The method POST is used to CREATE resources Usually,the resource identity/URLis not known at creationtime à The URL of the newly createdresource is usually created automaticallybythe server
  • 35. PUT The method PUT is used to UPDATE resources Recurrent PUT workflow: 1. we firstGET the representationof the resource we need to update 2. in the client we update the resource with the new value(s) 3. we update the resource using a PUT request togetherwith the representationas its payload
  • 36. PUT Example The initial GET is omitted here
  • 37. DELETE The method DELETE is used to DELETE resources SimilarlytoPUT, also in this case we need the URI of the resource being deleted
  • 39. A note on PUT and DELETE PUT and DELETE apply to the entire resource à when doinga PUT or DELETE operation, the entire resource is replaced/deleted The PUT and DELETE operations are atomic à if two PUT/DELETE operations occur simultaneously, one of them will win and determine the final state of the resource
  • 40. HTTP Status Codes RESTful services use these codes to return informationaboutthe response of the requests 1xx informationalmessage 2xx success message 3xx redirectsthe client to another URL 4xx client-side error 5xx server-side error
  • 41. LAB Extend the app of the previous labs so that products and producers are real data coming from the Loveitaly VM Another example of Rest API: http://www.nestoria.co.uk/help/api http://api.nestoria.it/api?place_name=laquila&encoding=json&pretty=1&listing_type=buy&country=it&action=search_listings
  • 43. Contact Ivano Malavolta | Gran Sasso Science Institute iivanoo ivano.malavolta@gssi.infn.it www.ivanomalavolta.com