SlideShare a Scribd company logo
1
 Anton Bogdan 
◦ Architect in Softengi company 
◦ Enviance team 
 29 years old 
2
Representational 
State 
Transfer 
3 
is a software 
architectural style
2000 by Roy Fielding in his doctoral 
dissertation at UC Irvine 
4
 Client–server 
 Stateless 
 Cacheable 
 Layered system 
5
 Uniform interface 
◦ Identification of resources (URI) 
◦ Manipulation of resources through these 
representations 
◦ Self-descriptive messages 
◦ Hypermedia as the engine of application 
state (A.K.A. HATEOAS) 
6
Then you will get: 
Performance, scalability, simplicity, 
modifiability, visibility, portability, and 
reliability. 
7
8
9
 POST /appointmentService.asmx 
◦ <openSlotRequest date = "2010-01-04" doctor = 
"mjones"/> 
 HTTP/1.1 200 OK 
◦ <openSlotList> 
◦ <slot start = "1400" end = "1450“ status=“open”> 
◦ <doctor id = "mjones"/> 
◦ </slot> 
◦ <slot start = "1600" end = "1650“ status=“booked”> 
◦ <doctor id = "mjones"/> 
◦ </slot> 
◦ </openSlotList> 
10
 POST /doctors/mjones/appointments/ 
◦ <openSlotRequest date = "2010-01-04“/> 
 HTTP/1.1 200 OK 
◦ <openSlotList> 
◦ <slot start = "1400" end = "1450“ status=“open”/> 
◦ <slot start = "1600" end = "1650“ status=“booked”/> 
◦ </openSlotList> 
11
 GET /doctors/mjones/appointments/?date=20100104 
 HTTP/1.1 200 OK 
◦ <openSlotList> 
◦ <slot start = "1400" end = "1450“ status=“open”/> 
◦ <slot start = "1600" end = "1650“ status=“booked”/> 
◦ </openSlotList> 
12
 GET /doctors/mjones/appointments/?date=20100104 
 HTTP/1.1 200 OK 
<openSlotList> 
<slot start = "1400" end = "1450“ status=“open”> 
<link rel=“slots/book” uri=“1400”/> 
<slot/> 
<slot start = "1600" end = "1650“ status=“booked”> 
<link rel=“slots/move” uri=“1600”/> 
<link rel=“slots/cancel” uri=“1600”/> 
<slot/> 
</openSlotList> 
13
 It’s very hard to be fully REST-style 
compatible. 
 Most of modern REST API implementations 
(Flickr api, Twitter api, Google calendar api) 
are just Level 1 and Level 2. 
 Specs based on REST: 
◦ WebDav protocol 
◦ Odata protocol (designed for Entity Framework) 
14
15
◦ /workflows/ 
◦ /workflows/<workflow Id>/ - bad 
◦ /workflows/<workflow Id>-<workflow Name>/ - good 
◦ /workflows/<workflow Name>/ - okay 
16
 Permanent. Should not be changed with time. 
 No special chars or file extensions (.php, 
.aspx) if they are not meaningful. 
 Context friendly. 
◦ /users/current/details 
 vs. /users/user-anton/details 
◦ /forecasts/cambridge/today 
 may redirects to, say, /forecasts/cambridge/2009-04-26 
17
 URI should be human readable and easily guessed. 
 Each part should be meaningful. All URI parts together should be 
good nested, and help visualize the site structure. 
◦ /cars/alfa-romeos/gt 
 Nouns, not verbs. 
 Resource Names: prefer to use lower-case and hyphen instead of 
spaces. 
◦ /tasks/by-a-new-car 
 Resource IDs: prefer to use additional meaning prefix. 
◦ /tasks/task-17 
◦ /conversations/conversation-{id}/todo-list-{id}/todo-{id} 
18
 /workflows/ 
◦ GET – Get a list (?) 
◦ POST - Create 
 201 (Created), Location:<new url> 
 /workflows/SomeItem 
◦ GET - Read 
◦ PUT - Update 
◦ DELETE - Delete 
◦ PATCH – Partial update 
19
You should introduce your own WEB-Methods. 
Examples: 
 /workflows/SomeItem 
 <OPERATION> - Non-standard operations 
 BOOK 
 BUY 
 CALCULATE 
 LOCK 
 RENT 
 … .etc 
from WebDav: 
 /workflows/SomeItem 
 MOVE 
 Destination: <new url> 
 COPY 
 Destination: <new url> 
20
 /workflows/SomeItem/<operation> 
 POST - Non-standard operations 
21
 Less Db identifiers 
 More names and URLs 
 Human readable 
 No .Net/Java specifics: 
◦ type: “MyNamespace.Workflow” 
 URL for hierarchies 
 WebDav - for file systems. 
◦ 
22
 No complex inner structures : 
◦ “name”: “Object name” 
◦ “userfields”: [ 
 { 
 Id:17, 
 name: “Permissions” 
 type: “list of checkboxes” 
 Value: [ 
 {“id”:24, “value” “Open allowed” } 
 {“id”:28, “value” “Close allowed” } 
 ] 
 } 
◦ ] 
 Keep all simple and human readable: 
◦ “name”: “Object name” 
◦ “Permissions”: [“Open allowed”, “Close allowed”] (! manual serialization may be required) 
23
24
 Option #1: URL 
/workflows/?name=My&date=2007 
25
 Option #2: Advanced URI 
/workflows/ 
?date=[MORE]2007 (?date=<2007) 
?name=[LIKE]Jo 
?name=[LIST]Jo,Mary,Anton, 
?type.name=Lab1 
?[order]=name,date 
?[fields]=id,name 
26
 Odata 
◦ service.svc/Posts?$filter=OwnerUserId eq 209 
◦ service.svc/Users?$filter=substringof('SQL',Title) or substringof('sql-server', 
Tags)&$format=json 
 Mongo 
◦ db/collections/?filter_type=cluster&filter_id=1&limit=-10 
 Gdata 
◦ /feeds?fields=link,entry(@gd:etag,id,updated,link[@rel='edit'])) 
 restSQL 
◦ /restsql/res/Actor?first_name=JULIANNE&last_name=DENCH&_limit=10&_offset=0 
27
 Option #3: SQL 
◦ Separate functionality 
◦ Require of supporting public schema & security! 
◦/sql?q=SELECT * FROM 
workflows WHERE name=My 
AND type=system AND date < 
2007&page=1&pagesize=20 
28
/sql?q=SELECT … 
SELECT * 
FROM workflows 
WHERE name=My AND type=system AND date < 2007 
Parsing 
Validating 
Transforming 
Paging 
SELECT TOP 20 w.id, w.name, w.type, cfv.[Field1] 
FROM workflows w 
INNER JOIN permissions p 
ON p.id = p.objectId AND p.userId= <userId> 
INNER JOIN customfieldvalue cfv 
ON p.id = cfv.objectId AND cfv.name = “Field1” 
WHERE name=My AND type=system AND date < 2007 
29
 Send user-password with each request (like 
Basic authentication) 
◦ REST-way style 
◦ Not always practical 
 Session ID in header (implemented) 
◦ Authorization: RESTAPI realm=“<Session ID>” 
 Auth. Cookie (implemented) 
 Auth. Cookie of main Web UI (implemented) 
30
 By URL 
◦ api/ver1/* 
 By header 
◦ X-Rest-Api-Version: 1 
 By mime-type 
◦ Accept: application/vnd.restapiv1+json; 
◦ Accept: application/vnd.restapi+json; version=1; 
31
 Error Codes 
◦ 400 – Bad request (wrong json, ValidationException) 
◦ 401 – Unauthorized (no Session ID) 
◦ 404 – Not Found - ObjectDoesNotExistException 
◦ 409 – Conflict - ObjectAlreadyExistException 
◦ 500 – Unexpected, unknown error 
◦ 503 – Service Unavailable 
 SQL timeout 
 Request limit 
 Retry-After: <seconds> 
 Error Meta: 
error:{ 
errorNumber: 500 
message: “” 
stacktrace: “<for dev only>” 
} 
32
33
 SOAP 
 /Auth.asmx 
 /Workflows.asmx 
 /Tasks.asmx 
 REST 
 /sessions/ 
 /processes/workflows/ 
 /processes/tasks/ 
34
 Well defined standard 
 Complex format 
 Meta Describer: WSDL 
 Not intended to be human readable 
 Excellent support in most IDEs (stub 
generation) 
 Hard to call from JavaScript 
 Each service – separate and independent item 
◦ Auth.asmx 
◦ Workflow.asmx 
35
 Not standardized - is a style 
 Conforms to REST style 
 Lead to design human readable API: 
◦ URL, names, serialized types 
 Bad support in most IDEs (problems with subs 
generation) 
 Easy to call from JavaScript 
 Popular 
 Each service are not separate – solid api: 
◦ /sessions/ 
◦ /processes/workflows/ 
◦ /processes/tasks/ 
36
 REST – it’s not spec, it’s architectural style 
◦ It’s an art! 
 Leverage HTTP! 
 URL, Headers, Mime, Accepts 
 Human readable URLs, XML and JSON ! 
37
38
 http://xpinjection.com/2012/06/14/rest-in-uadevclub-july-5/ 
 http://video.yandex.ua/users/xpinjection/view/192/ 
 http://video.yandex.ua/users/xpinjection/view/193/ 
 http://video.yandex.ua/users/xpinjection/view/194/ 
 http://martinfowler.com/articles/richardsonMaturityModel.html 
 http://www.iana.org/time-zones 
 http://www.w3.org/TR/cors/ 
 https://developers.google.com/gdata/docs/2.0/reference#Partia 
lResponse 
 http://www.mongodb.org/display/DOCS/Advanced+Queries 
 http://restsql.org/doc/ref/index.html 
 http://www.hanselman.com/blog/CreatingAnODataAPIForStackO 
verflowIncludingXMLAndJSONIn30Minutes.aspx 
 Libs: 
◦ http://easyxdm.net/wp/ 
◦ https://github.com/bigeasy/timezone 
39

More Related Content

What's hot

Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
TheCreativedev Blog
 
Express js
Express jsExpress js
Express js
Manav Prasad
 
Managing JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSManaging JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJS
Den Odell
 
Intro to Node
Intro to NodeIntro to Node
Intro to Node
Aaron Stannard
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface
 
Expressjs
ExpressjsExpressjs
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Alive Kuo
 
Spring Framework - Web Flow
Spring Framework - Web FlowSpring Framework - Web Flow
Spring Framework - Web Flow
Dzmitry Naskou
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
Oscar Merida
 
the 5 layers of web accessibility - Open Web Camp II
the 5 layers of web accessibility - Open Web Camp IIthe 5 layers of web accessibility - Open Web Camp II
the 5 layers of web accessibility - Open Web Camp II
Dirk Ginader
 
Asynchronous Interfaces
Asynchronous InterfacesAsynchronous Interfaces
Asynchronous Interfaces
maccman
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/Servlet
Sunil OS
 
Stratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration PresentationStratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration PresentationJeremy Przygode
 
Make your gui shine with ajax solr
Make your gui shine with ajax solrMake your gui shine with ajax solr
Make your gui shine with ajax solrlucenerevolution
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js Platform
Naresh Chintalcheru
 
Box connector Mule ESB Integration
Box connector Mule ESB IntegrationBox connector Mule ESB Integration
Box connector Mule ESB Integration
AnilKumar Etagowni
 
Spout - Building a RESTful web app with Angular.js and BEAR.Sunday
Spout - Building a RESTful web app with Angular.js and BEAR.SundaySpout - Building a RESTful web app with Angular.js and BEAR.Sunday
Spout - Building a RESTful web app with Angular.js and BEAR.Sunday
Richard McIntyre
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
Caldera Labs
 
Zk doc1
Zk doc1Zk doc1
Zk doc1
Rupalli Das
 

What's hot (20)

Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
Express js
Express jsExpress js
Express js
 
Managing JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSManaging JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJS
 
Intro to Node
Intro to NodeIntro to Node
Intro to Node
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
 
Expressjs
ExpressjsExpressjs
Expressjs
 
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
Uniface Lectures Webinar - Application & Infrastructure Security - Hardening ...
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Spring Framework - Web Flow
Spring Framework - Web FlowSpring Framework - Web Flow
Spring Framework - Web Flow
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
the 5 layers of web accessibility - Open Web Camp II
the 5 layers of web accessibility - Open Web Camp IIthe 5 layers of web accessibility - Open Web Camp II
the 5 layers of web accessibility - Open Web Camp II
 
Asynchronous Interfaces
Asynchronous InterfacesAsynchronous Interfaces
Asynchronous Interfaces
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/Servlet
 
Stratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration PresentationStratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration Presentation
 
Make your gui shine with ajax solr
Make your gui shine with ajax solrMake your gui shine with ajax solr
Make your gui shine with ajax solr
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js Platform
 
Box connector Mule ESB Integration
Box connector Mule ESB IntegrationBox connector Mule ESB Integration
Box connector Mule ESB Integration
 
Spout - Building a RESTful web app with Angular.js and BEAR.Sunday
Spout - Building a RESTful web app with Angular.js and BEAR.SundaySpout - Building a RESTful web app with Angular.js and BEAR.Sunday
Spout - Building a RESTful web app with Angular.js and BEAR.Sunday
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
 
Zk doc1
Zk doc1Zk doc1
Zk doc1
 

Viewers also liked

Архитектурные семинары Softengi - инфографика
Архитектурные семинары Softengi - инфографикаАрхитектурные семинары Softengi - инфографика
Архитектурные семинары Softengi - инфографика
Softengi
 
Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...
Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...
Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...
Softengi
 
Nola defragmentatu disko gogorra
Nola defragmentatu disko gogorraNola defragmentatu disko gogorra
Nola defragmentatu disko gogorra
salmanefana
 
power point name of days
power point name of dayspower point name of days
power point name of daysevinasalim
 
AutoTest Refactoring. Архитектурные семинары Softengi
AutoTest Refactoring. Архитектурные семинары SoftengiAutoTest Refactoring. Архитектурные семинары Softengi
AutoTest Refactoring. Архитектурные семинары Softengi
Softengi
 
Localize your business - Software Localization Services LocServ
Localize your business - Software Localization Services LocServLocalize your business - Software Localization Services LocServ
Localize your business - Software Localization Services LocServ
Softengi
 
Mf def fç estr din 28.08.14
Mf def fç estr din   28.08.14Mf def fç estr din   28.08.14
Mf def fç estr din 28.08.14Inaiara Bragante
 
Carteiradeserviços
CarteiradeserviçosCarteiradeserviços
Carteiradeserviços
Inaiara Bragante
 
Curriculo baseado em competencias(1)
Curriculo baseado em competencias(1)Curriculo baseado em competencias(1)
Curriculo baseado em competencias(1)Inaiara Bragante
 
Разработка Web-приложений на Angular JS. Архитектурные семинары Softengi
Разработка Web-приложений на Angular JS. Архитектурные семинары SoftengiРазработка Web-приложений на Angular JS. Архитектурные семинары Softengi
Разработка Web-приложений на Angular JS. Архитектурные семинары Softengi
Softengi
 

Viewers also liked (15)

Архитектурные семинары Softengi - инфографика
Архитектурные семинары Softengi - инфографикаАрхитектурные семинары Softengi - инфографика
Архитектурные семинары Softengi - инфографика
 
Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...
Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...
Softengi's 9 Ways To Fail Your IT Project In The Outsourcing Journal Special ...
 
Nola defragmentatu disko gogorra
Nola defragmentatu disko gogorraNola defragmentatu disko gogorra
Nola defragmentatu disko gogorra
 
power point name of days
power point name of dayspower point name of days
power point name of days
 
AutoTest Refactoring. Архитектурные семинары Softengi
AutoTest Refactoring. Архитектурные семинары SoftengiAutoTest Refactoring. Архитектурные семинары Softengi
AutoTest Refactoring. Архитектурные семинары Softengi
 
Crises ciclo de_vida (1)
Crises ciclo de_vida (1)Crises ciclo de_vida (1)
Crises ciclo de_vida (1)
 
Broti Portfolio
Broti PortfolioBroti Portfolio
Broti Portfolio
 
Localize your business - Software Localization Services LocServ
Localize your business - Software Localization Services LocServLocalize your business - Software Localization Services LocServ
Localize your business - Software Localization Services LocServ
 
Mf def fç estr din 28.08.14
Mf def fç estr din   28.08.14Mf def fç estr din   28.08.14
Mf def fç estr din 28.08.14
 
Icd 11 phc draft
Icd 11 phc draftIcd 11 phc draft
Icd 11 phc draft
 
Aula screening abril2014
Aula screening abril2014Aula screening abril2014
Aula screening abril2014
 
Cap 10 duncan
Cap 10 duncanCap 10 duncan
Cap 10 duncan
 
Carteiradeserviços
CarteiradeserviçosCarteiradeserviços
Carteiradeserviços
 
Curriculo baseado em competencias(1)
Curriculo baseado em competencias(1)Curriculo baseado em competencias(1)
Curriculo baseado em competencias(1)
 
Разработка Web-приложений на Angular JS. Архитектурные семинары Softengi
Разработка Web-приложений на Angular JS. Архитектурные семинары SoftengiРазработка Web-приложений на Angular JS. Архитектурные семинары Softengi
Разработка Web-приложений на Angular JS. Архитектурные семинары Softengi
 

Similar to About REST. Архитектурные семинары Softengi

Our practice of designing and implementing REST-service API for existing system
Our practice of designing and implementing REST-service API for existing systemOur practice of designing and implementing REST-service API for existing system
Our practice of designing and implementing REST-service API for existing system
z-tech
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
ejlp12
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jerseyb_kathir
 
SQL for Web APIs - Simplifying Data Access for API Consumers
SQL for Web APIs - Simplifying Data Access for API ConsumersSQL for Web APIs - Simplifying Data Access for API Consumers
SQL for Web APIs - Simplifying Data Access for API Consumers
Jerod Johnson
 
Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsCarol McDonald
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
CellarTracker
 
distributing over the web
distributing over the webdistributing over the web
distributing over the web
Nicola Baldi
 
Java Web services
Java Web servicesJava Web services
Java Web servicesvpulec
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
Visual Engineering
 
6 tips for improving ruby performance
6 tips for improving ruby performance6 tips for improving ruby performance
6 tips for improving ruby performance
Engine Yard
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
Pat Patterson
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to TornadoGavin Roy
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and Kubernetes
Sreenivas Makam
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
Ivanti
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
Android networking-2
Android networking-2Android networking-2
Android networking-2
Aravindharamanan S
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
Aman Kohli
 

Similar to About REST. Архитектурные семинары Softengi (20)

Our practice of designing and implementing REST-service API for existing system
Our practice of designing and implementing REST-service API for existing systemOur practice of designing and implementing REST-service API for existing system
Our practice of designing and implementing REST-service API for existing system
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
ASP.NET WEB API
ASP.NET WEB APIASP.NET WEB API
ASP.NET WEB API
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jersey
 
SQL for Web APIs - Simplifying Data Access for API Consumers
SQL for Web APIs - Simplifying Data Access for API ConsumersSQL for Web APIs - Simplifying Data Access for API Consumers
SQL for Web APIs - Simplifying Data Access for API Consumers
 
Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.js
 
Rest
RestRest
Rest
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
 
distributing over the web
distributing over the webdistributing over the web
distributing over the web
 
Java Web services
Java Web servicesJava Web services
Java Web services
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
6 tips for improving ruby performance
6 tips for improving ruby performance6 tips for improving ruby performance
6 tips for improving ruby performance
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
 
Rails Security
Rails SecurityRails Security
Rails Security
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and Kubernetes
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Android networking-2
Android networking-2Android networking-2
Android networking-2
 
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
DSLing your System For Scalability Testing Using Gatling - Dublin Scala User ...
 

More from Softengi

Extended Reality Solutions for Digital Marketing
Extended Reality Solutions for Digital MarketingExtended Reality Solutions for Digital Marketing
Extended Reality Solutions for Digital Marketing
Softengi
 
Intecracy Group Presentation
Intecracy Group PresentationIntecracy Group Presentation
Intecracy Group Presentation
Softengi
 
Softengi - Inspired Software Engineering
Softengi - Inspired Software EngineeringSoftengi - Inspired Software Engineering
Softengi - Inspired Software Engineering
Softengi
 
Infographic of Softengi's 2014
Infographic of Softengi's 2014Infographic of Softengi's 2014
Infographic of Softengi's 2014
Softengi
 
Основы OLAP. Вебинар Workaround в Softengi
Основы OLAP. Вебинар Workaround в SoftengiОсновы OLAP. Вебинар Workaround в Softengi
Основы OLAP. Вебинар Workaround в Softengi
Softengi
 
Как оценить Тестировщика. Александра Ковалева, Testing Consultant в Softengi
Как оценить Тестировщика. Александра Ковалева, Testing Consultant в SoftengiКак оценить Тестировщика. Александра Ковалева, Testing Consultant в Softengi
Как оценить Тестировщика. Александра Ковалева, Testing Consultant в Softengi
Softengi
 
Как оценить время на тестирование. Александр Зиновьев, Test Lead Softengi
Как оценить время на тестирование. Александр Зиновьев, Test Lead SoftengiКак оценить время на тестирование. Александр Зиновьев, Test Lead Softengi
Как оценить время на тестирование. Александр Зиновьев, Test Lead Softengi
Softengi
 
Автоматизированный подход к локализации корпоративных приложений
Автоматизированный подход к локализации корпоративных приложенийАвтоматизированный подход к локализации корпоративных приложений
Автоматизированный подход к локализации корпоративных приложений
Softengi
 
Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...
Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...
Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...
Softengi
 
Enviance Environmental ERP
Enviance Environmental ERPEnviance Environmental ERP
Enviance Environmental ERP
Softengi
 
Corporate Social Responsibility at Softengi
Corporate Social Responsibility at SoftengiCorporate Social Responsibility at Softengi
Corporate Social Responsibility at SoftengiSoftengi
 
Тестирование web-приложений на iPad
Тестирование web-приложений на iPadТестирование web-приложений на iPad
Тестирование web-приложений на iPad
Softengi
 
Постановка и улучшение Scrum процесса для группы проектов в компании
Постановка и улучшение Scrum процесса для группы проектов в компанииПостановка и улучшение Scrum процесса для группы проектов в компании
Постановка и улучшение Scrum процесса для группы проектов в компании
Softengi
 
Softengi Software Development Company Profile
Softengi Software Development Company ProfileSoftengi Software Development Company Profile
Softengi Software Development Company Profile
Softengi
 
Путь к трассировке требований: от идеи к инструменту. SQA-Days 15
Путь к трассировке требований: от идеи к инструменту. SQA-Days 15Путь к трассировке требований: от идеи к инструменту. SQA-Days 15
Путь к трассировке требований: от идеи к инструменту. SQA-Days 15
Softengi
 
Планирование трудозатрат на тестирование
Планирование трудозатрат на тестированиеПланирование трудозатрат на тестирование
Планирование трудозатрат на тестирование
Softengi
 
Softengi - Business Process Automation based on Microsoft SharePoint Platform
Softengi - Business Process Automation based on Microsoft SharePoint PlatformSoftengi - Business Process Automation based on Microsoft SharePoint Platform
Softengi - Business Process Automation based on Microsoft SharePoint Platform
Softengi
 
4 Reasons to Outsource IT to Ukraine
4 Reasons to Outsource IT to Ukraine4 Reasons to Outsource IT to Ukraine
4 Reasons to Outsource IT to Ukraine
Softengi
 

More from Softengi (18)

Extended Reality Solutions for Digital Marketing
Extended Reality Solutions for Digital MarketingExtended Reality Solutions for Digital Marketing
Extended Reality Solutions for Digital Marketing
 
Intecracy Group Presentation
Intecracy Group PresentationIntecracy Group Presentation
Intecracy Group Presentation
 
Softengi - Inspired Software Engineering
Softengi - Inspired Software EngineeringSoftengi - Inspired Software Engineering
Softengi - Inspired Software Engineering
 
Infographic of Softengi's 2014
Infographic of Softengi's 2014Infographic of Softengi's 2014
Infographic of Softengi's 2014
 
Основы OLAP. Вебинар Workaround в Softengi
Основы OLAP. Вебинар Workaround в SoftengiОсновы OLAP. Вебинар Workaround в Softengi
Основы OLAP. Вебинар Workaround в Softengi
 
Как оценить Тестировщика. Александра Ковалева, Testing Consultant в Softengi
Как оценить Тестировщика. Александра Ковалева, Testing Consultant в SoftengiКак оценить Тестировщика. Александра Ковалева, Testing Consultant в Softengi
Как оценить Тестировщика. Александра Ковалева, Testing Consultant в Softengi
 
Как оценить время на тестирование. Александр Зиновьев, Test Lead Softengi
Как оценить время на тестирование. Александр Зиновьев, Test Lead SoftengiКак оценить время на тестирование. Александр Зиновьев, Test Lead Softengi
Как оценить время на тестирование. Александр Зиновьев, Test Lead Softengi
 
Автоматизированный подход к локализации корпоративных приложений
Автоматизированный подход к локализации корпоративных приложенийАвтоматизированный подход к локализации корпоративных приложений
Автоматизированный подход к локализации корпоративных приложений
 
Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...
Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...
Scrum и пустота. Доклад Анатолия Кота, менеджера проектов Softengi, на Междун...
 
Enviance Environmental ERP
Enviance Environmental ERPEnviance Environmental ERP
Enviance Environmental ERP
 
Corporate Social Responsibility at Softengi
Corporate Social Responsibility at SoftengiCorporate Social Responsibility at Softengi
Corporate Social Responsibility at Softengi
 
Тестирование web-приложений на iPad
Тестирование web-приложений на iPadТестирование web-приложений на iPad
Тестирование web-приложений на iPad
 
Постановка и улучшение Scrum процесса для группы проектов в компании
Постановка и улучшение Scrum процесса для группы проектов в компанииПостановка и улучшение Scrum процесса для группы проектов в компании
Постановка и улучшение Scrum процесса для группы проектов в компании
 
Softengi Software Development Company Profile
Softengi Software Development Company ProfileSoftengi Software Development Company Profile
Softengi Software Development Company Profile
 
Путь к трассировке требований: от идеи к инструменту. SQA-Days 15
Путь к трассировке требований: от идеи к инструменту. SQA-Days 15Путь к трассировке требований: от идеи к инструменту. SQA-Days 15
Путь к трассировке требований: от идеи к инструменту. SQA-Days 15
 
Планирование трудозатрат на тестирование
Планирование трудозатрат на тестированиеПланирование трудозатрат на тестирование
Планирование трудозатрат на тестирование
 
Softengi - Business Process Automation based on Microsoft SharePoint Platform
Softengi - Business Process Automation based on Microsoft SharePoint PlatformSoftengi - Business Process Automation based on Microsoft SharePoint Platform
Softengi - Business Process Automation based on Microsoft SharePoint Platform
 
4 Reasons to Outsource IT to Ukraine
4 Reasons to Outsource IT to Ukraine4 Reasons to Outsource IT to Ukraine
4 Reasons to Outsource IT to Ukraine
 

Recently uploaded

Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 

Recently uploaded (20)

Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 

About REST. Архитектурные семинары Softengi

  • 1. 1
  • 2.  Anton Bogdan ◦ Architect in Softengi company ◦ Enviance team  29 years old 2
  • 3. Representational State Transfer 3 is a software architectural style
  • 4. 2000 by Roy Fielding in his doctoral dissertation at UC Irvine 4
  • 5.  Client–server  Stateless  Cacheable  Layered system 5
  • 6.  Uniform interface ◦ Identification of resources (URI) ◦ Manipulation of resources through these representations ◦ Self-descriptive messages ◦ Hypermedia as the engine of application state (A.K.A. HATEOAS) 6
  • 7. Then you will get: Performance, scalability, simplicity, modifiability, visibility, portability, and reliability. 7
  • 8. 8
  • 9. 9
  • 10.  POST /appointmentService.asmx ◦ <openSlotRequest date = "2010-01-04" doctor = "mjones"/>  HTTP/1.1 200 OK ◦ <openSlotList> ◦ <slot start = "1400" end = "1450“ status=“open”> ◦ <doctor id = "mjones"/> ◦ </slot> ◦ <slot start = "1600" end = "1650“ status=“booked”> ◦ <doctor id = "mjones"/> ◦ </slot> ◦ </openSlotList> 10
  • 11.  POST /doctors/mjones/appointments/ ◦ <openSlotRequest date = "2010-01-04“/>  HTTP/1.1 200 OK ◦ <openSlotList> ◦ <slot start = "1400" end = "1450“ status=“open”/> ◦ <slot start = "1600" end = "1650“ status=“booked”/> ◦ </openSlotList> 11
  • 12.  GET /doctors/mjones/appointments/?date=20100104  HTTP/1.1 200 OK ◦ <openSlotList> ◦ <slot start = "1400" end = "1450“ status=“open”/> ◦ <slot start = "1600" end = "1650“ status=“booked”/> ◦ </openSlotList> 12
  • 13.  GET /doctors/mjones/appointments/?date=20100104  HTTP/1.1 200 OK <openSlotList> <slot start = "1400" end = "1450“ status=“open”> <link rel=“slots/book” uri=“1400”/> <slot/> <slot start = "1600" end = "1650“ status=“booked”> <link rel=“slots/move” uri=“1600”/> <link rel=“slots/cancel” uri=“1600”/> <slot/> </openSlotList> 13
  • 14.  It’s very hard to be fully REST-style compatible.  Most of modern REST API implementations (Flickr api, Twitter api, Google calendar api) are just Level 1 and Level 2.  Specs based on REST: ◦ WebDav protocol ◦ Odata protocol (designed for Entity Framework) 14
  • 15. 15
  • 16. ◦ /workflows/ ◦ /workflows/<workflow Id>/ - bad ◦ /workflows/<workflow Id>-<workflow Name>/ - good ◦ /workflows/<workflow Name>/ - okay 16
  • 17.  Permanent. Should not be changed with time.  No special chars or file extensions (.php, .aspx) if they are not meaningful.  Context friendly. ◦ /users/current/details  vs. /users/user-anton/details ◦ /forecasts/cambridge/today  may redirects to, say, /forecasts/cambridge/2009-04-26 17
  • 18.  URI should be human readable and easily guessed.  Each part should be meaningful. All URI parts together should be good nested, and help visualize the site structure. ◦ /cars/alfa-romeos/gt  Nouns, not verbs.  Resource Names: prefer to use lower-case and hyphen instead of spaces. ◦ /tasks/by-a-new-car  Resource IDs: prefer to use additional meaning prefix. ◦ /tasks/task-17 ◦ /conversations/conversation-{id}/todo-list-{id}/todo-{id} 18
  • 19.  /workflows/ ◦ GET – Get a list (?) ◦ POST - Create  201 (Created), Location:<new url>  /workflows/SomeItem ◦ GET - Read ◦ PUT - Update ◦ DELETE - Delete ◦ PATCH – Partial update 19
  • 20. You should introduce your own WEB-Methods. Examples:  /workflows/SomeItem  <OPERATION> - Non-standard operations  BOOK  BUY  CALCULATE  LOCK  RENT  … .etc from WebDav:  /workflows/SomeItem  MOVE  Destination: <new url>  COPY  Destination: <new url> 20
  • 21.  /workflows/SomeItem/<operation>  POST - Non-standard operations 21
  • 22.  Less Db identifiers  More names and URLs  Human readable  No .Net/Java specifics: ◦ type: “MyNamespace.Workflow”  URL for hierarchies  WebDav - for file systems. ◦ 22
  • 23.  No complex inner structures : ◦ “name”: “Object name” ◦ “userfields”: [  {  Id:17,  name: “Permissions”  type: “list of checkboxes”  Value: [  {“id”:24, “value” “Open allowed” }  {“id”:28, “value” “Close allowed” }  ]  } ◦ ]  Keep all simple and human readable: ◦ “name”: “Object name” ◦ “Permissions”: [“Open allowed”, “Close allowed”] (! manual serialization may be required) 23
  • 24. 24
  • 25.  Option #1: URL /workflows/?name=My&date=2007 25
  • 26.  Option #2: Advanced URI /workflows/ ?date=[MORE]2007 (?date=<2007) ?name=[LIKE]Jo ?name=[LIST]Jo,Mary,Anton, ?type.name=Lab1 ?[order]=name,date ?[fields]=id,name 26
  • 27.  Odata ◦ service.svc/Posts?$filter=OwnerUserId eq 209 ◦ service.svc/Users?$filter=substringof('SQL',Title) or substringof('sql-server', Tags)&$format=json  Mongo ◦ db/collections/?filter_type=cluster&filter_id=1&limit=-10  Gdata ◦ /feeds?fields=link,entry(@gd:etag,id,updated,link[@rel='edit']))  restSQL ◦ /restsql/res/Actor?first_name=JULIANNE&last_name=DENCH&_limit=10&_offset=0 27
  • 28.  Option #3: SQL ◦ Separate functionality ◦ Require of supporting public schema & security! ◦/sql?q=SELECT * FROM workflows WHERE name=My AND type=system AND date < 2007&page=1&pagesize=20 28
  • 29. /sql?q=SELECT … SELECT * FROM workflows WHERE name=My AND type=system AND date < 2007 Parsing Validating Transforming Paging SELECT TOP 20 w.id, w.name, w.type, cfv.[Field1] FROM workflows w INNER JOIN permissions p ON p.id = p.objectId AND p.userId= <userId> INNER JOIN customfieldvalue cfv ON p.id = cfv.objectId AND cfv.name = “Field1” WHERE name=My AND type=system AND date < 2007 29
  • 30.  Send user-password with each request (like Basic authentication) ◦ REST-way style ◦ Not always practical  Session ID in header (implemented) ◦ Authorization: RESTAPI realm=“<Session ID>”  Auth. Cookie (implemented)  Auth. Cookie of main Web UI (implemented) 30
  • 31.  By URL ◦ api/ver1/*  By header ◦ X-Rest-Api-Version: 1  By mime-type ◦ Accept: application/vnd.restapiv1+json; ◦ Accept: application/vnd.restapi+json; version=1; 31
  • 32.  Error Codes ◦ 400 – Bad request (wrong json, ValidationException) ◦ 401 – Unauthorized (no Session ID) ◦ 404 – Not Found - ObjectDoesNotExistException ◦ 409 – Conflict - ObjectAlreadyExistException ◦ 500 – Unexpected, unknown error ◦ 503 – Service Unavailable  SQL timeout  Request limit  Retry-After: <seconds>  Error Meta: error:{ errorNumber: 500 message: “” stacktrace: “<for dev only>” } 32
  • 33. 33
  • 34.  SOAP  /Auth.asmx  /Workflows.asmx  /Tasks.asmx  REST  /sessions/  /processes/workflows/  /processes/tasks/ 34
  • 35.  Well defined standard  Complex format  Meta Describer: WSDL  Not intended to be human readable  Excellent support in most IDEs (stub generation)  Hard to call from JavaScript  Each service – separate and independent item ◦ Auth.asmx ◦ Workflow.asmx 35
  • 36.  Not standardized - is a style  Conforms to REST style  Lead to design human readable API: ◦ URL, names, serialized types  Bad support in most IDEs (problems with subs generation)  Easy to call from JavaScript  Popular  Each service are not separate – solid api: ◦ /sessions/ ◦ /processes/workflows/ ◦ /processes/tasks/ 36
  • 37.  REST – it’s not spec, it’s architectural style ◦ It’s an art!  Leverage HTTP!  URL, Headers, Mime, Accepts  Human readable URLs, XML and JSON ! 37
  • 38. 38
  • 39.  http://xpinjection.com/2012/06/14/rest-in-uadevclub-july-5/  http://video.yandex.ua/users/xpinjection/view/192/  http://video.yandex.ua/users/xpinjection/view/193/  http://video.yandex.ua/users/xpinjection/view/194/  http://martinfowler.com/articles/richardsonMaturityModel.html  http://www.iana.org/time-zones  http://www.w3.org/TR/cors/  https://developers.google.com/gdata/docs/2.0/reference#Partia lResponse  http://www.mongodb.org/display/DOCS/Advanced+Queries  http://restsql.org/doc/ref/index.html  http://www.hanselman.com/blog/CreatingAnODataAPIForStackO verflowIncludingXMLAndJSONIn30Minutes.aspx  Libs: ◦ http://easyxdm.net/wp/ ◦ https://github.com/bigeasy/timezone 39

Editor's Notes

  1. Кто не слышал про REST? Кто не только слышал но и знает что такое рест?
  2. Может для кого-то это будет сюрпризом - REST это не вебсерсисы, это не спецификация - это архитектурный стиль распределенных систем.
  3. Понятие REST ввел Рой Филдинг в своей докторской диссертации. Он является одним из авторов HTTP и URI. Он выделил определенный стиль или подход распределенной системы WWW, и назвал его REST.
  4. Если распределенная система хочет хочет следовать REST стилю - то она должна выполяться следующие требования.
  5. Взамен выполнения таких требований - общая стоимость системы понизиться. Также, у такой системы легко достичь следующих важных качеств: Быстродействие, маштабирование, расширяемость, доступность, отказоустойчивость, гипкость.
  6. Сейчас давайте перейдем к практическому примеру применения REST - в Web Services. До этого мы говорили что WWW уже следует rest стилю. Web Sevices обычно базируються на WWW, так в чем же отличие? Отличие заключаеться в том что распределенная система может использовать элементы WWW (HTTP) как, к примеру, транспорт и при этом НЕ следовать REST. Так делают SOAP WebServices. Потому, для выявления уровня соответсвия системы REST стилю - существует так называемая "Модель Зрелости Ричардсона".
  7. Вот она на илюстрации. Зачастую её используют для определения соответствия Web-Services REST стилю. Тоесть далее мы будем илюстрировать примеры на уровне HTTP протокола.
  8. На нулевом уровне - мы используем HTTP как транспорт. Так обычно поступает SOAP, также он может использовать и другой транспорт - smpt, даже UPD тд. На примере не показано но даже в самом XML сообщении есть и место для хедеров, HTTP хедеры не используються.
  9. Здесь мы вводим адресацию, использую URL.
  10. Здесь мы начинаем использовать HTTP Methods - например, GET - для Readonly и POST для остальных. Это уже дает возможно кеширования на уровне сервера, прокси-сервера или клиента.
  11. Здесь мы добавляем hyper-text. В данном случае - для избавления клиента от необходимости строить URL, перемещая логику на сервер.
  12. Большинство существующих вебсервисов имеет 1 или 2 уровень. Хорошими примерами успешного примения REST стиля в Webservices можно считать спецификации WebDav. и к примеру ODATA. О них по -позже.