SlideShare une entreprise Scribd logo
1  sur  85
Télécharger pour lire hors ligne
RESTful API-centric Universe 
TIHOMIR OPAČIĆ 
Orange Hill, Beograd
PHIL STURGEON* 
Building APIs 
You Won’t Hate 
https://leanpub.com/build-apis-you-wont-hate 
*founder of PyroCMS, Software Developer at Kapture
GDE SE KORISTI RESTful API? 
Web Facing 
mobile 
aplikacije 
iOS, Android… 
RESTful API-centric Universe
GDE SE KORISTI RESTful API? 
Javscript 
MVVM 
Frameworks Angular JS, 
Ember, Backbone… 
RESTful API-centric Universe
GDE SE KORISTI RESTful API? 
RESTful API-centric Universe 
Google Glass 
API 
https://developers.google.com/glass/v1/reference/
GDE SE KORISTI RESTful API? 
Tesla Model S 
REST API 
http://docs.timdorr.apiary.io/ 
RESTful API-centric Universe
1 2 3 4 5 6 
Code on 
Demand 
ŠTA JE TO REST? 
RESTful API-centric Universe 
REpresentational State Transfer 
Layered 
System 
Arhitekturni model definisan u šest principa: 
Client- 
Stateless Cacheable Server Uniform 
Interface
ŠTA JE TO REST? 
RESTful API-centric Universe 
Uniformni interfejs 
1 Uniform Interface 
Uniformni interfejs definiše client-server 
komunikaciju na način da razdvaja ove dve celine 
(decoupling the architecture). 
Ovo omogućava da se ove dve celine zasebno 
razvijaju.
ŠTA JE TO REST? 
RESTful API-centric Universe 
Nepostojanje stanja 
2 Stateless 
Nepostojanje stanja je osnovna odlika REST 
arhitekture. 
Svaki zahtev i odgovor servera na zahtev su 
jedinstvene nezavisne transakcije.
ŠTA JE TO REST? 
RESTful API-centric Universe 
Mogućnost keširanja 
3 Cacheable 
Klijent je slobodan da kešira podatke koje je 
primio kao odgovor servera, ukoliko server 
explicitno označi podatke da se mogu keširati.
ŠTA JE TO REST? 
RESTful API-centric Universe 
Klijent-Server 
4 Client-Server 
U interakciji klijenta i servera klijent ne vodi 
računa o čuvanju podataka, doke serveri ne vode 
računa o user interfejsu ili stanju klijenta.
ŠTA JE TO REST? 
RESTful API-centric Universe 
Slojeviti sistem 
5 Layered System 
Klijent nema načina da zna da li je povezan 
direktno na krajnji server. Ovaj princip omogućava 
skalabilnost servisa (load balancing, shared 
cache).
ŠTA JE TO REST? 
RESTful API-centric Universe 
Kod na zahtev 
6 Code on Demand 
Server je u mogućnosti da privremeno proširi 
mogućnosti klijenta da obavi određenu 
funkcionalnost tako što će mu preneti kod 
potreban za tu akciju, u vidu apleta ili skripti.
REST MODEL U WEB SERVISIMA 
RESTful API-centric Universe 
Servis koji se kreće u 
granicama REST principa 
naziva se RESTful servisom. 
http://en.wikipedia.org/wiki/Representational_state_transfer
REST MODEL U WEB SERVISIMA 
RESTful API-centric Universe 
Karakteristike 
RESTful API servisa: 
• koristi base URI, npr. http://example.com/resources/ • koristi Internet Media Type za prenos podataka. 
Najčešće JSON (ili XML, Atom, microformats, images...) • koristi HTTP metode (npr. GET, PUT, POST ili DELETE) • koristi hypertext linkove da predstavi stanje (state) • koristi hypertext linkove da predstavi resurse
RESTful API SERVISI - PROBLEMI U PRAKSI 
RESTful API-centric Universe 
• Površni članci i knjige, 
često usmereni ka primeni na samo jednom framework-u • Razvojni principi se često se mešaju sa 
SOAP RPC razvojnim principima • Nedostatak standarda
RESTful API SERVISI - PROBLEMI U PRAKSI 
RESTful API-centric Universe 
REST/SOAP razlike: 
• REST je arhitekturni model, SOAP je protokol 
(Glavni razlog nedostatka standarda)
RESTful API SERVISI - PROBLEMI U PRAKSI 
RESTful API-centric Universe 
REST/SOAP razlike: 
REST koristi sledeće operacije 
HTTP protokola: 
SOAP RPC programer bi 
razvijao ovakve API metode: 
• GET 
• POST 
• PUT 
• DELETE 
• getUsers() 
• getNewUsersSince(SinceDate) 
• saveOrder(CID, PurchaseID)
RESTful API 
PROGRAMIRANJE
BAZA PODATAKA 
RESTful API-centric Universe 
1 Dizajniranje baze podataka 
2 Popunjavanje baze podacima 
(Seeding) 
Zašto je seeding bitan?
SEEDING 
RESTful API-centric Universe 
Seeding 
“The process of creating seeding scripts means you don’t need 
to waste time creating this manually over and over again.” 
• Acceptance testing • Podaci pravih korisnika ostaju poverljivi • Ne kopiramo podatke sa live servera na razvojne platforme
Programiranje 
Seeding skripti 
Ušteda vremena potrebnog 
da se baza podataka popuni test podacima.
SEEDING 
RESTful API-centric Universe 
Faker 
https://github.com/fzaninotto/Faker 
"Faker is a PHP library that generates fake data for you. 
Faker is heavily inspired by Perl's Data::Faker, and by ruby's Faker."
SEEDING 
RESTful API-centric Universe 
Faker 
Primer: 
<? 
$faker = FakerFactory::create(); 
for ($i = 0; $i < Config::get('seeding.users'); $i++) { 
$user = User::create([ 
'name' => $faker->name, 
'email' => $faker->email, 
'active' => $i === 0 ? true : rand(0, 1), 
'gender' => rand(0, 1) ? 'male' : 'female' 
]); 
}
SEEDING 
RESTful API-centric Universe 
Da li koristiti Random 
podatke za svaki 
Seeding proces? 
Da li se Acceptance testovi 
oslanjaju na nepromenljive podatke u bazi?
SEEDING 
RESTful API-centric Universe 
iSeed 
https://github.com/orangehill/iseed 
"Inverse seed generator (iSeed) is a Laravel 4 package 
that provides a method to generate a new seed file 
based on data from the existing database table."
SEEDING 
RESTful API-centric Universe 
iSeed 
Primeri: 
$ php artisan iseed users 
<? 
Iseed::generateSeed('users’); 
Iseed::generateSeed(‘photos’); 
Iseed::generateSeed(‘categories');
ENDPOINTS 
RESTful API-centric Universe 
Endpoints Planning 
Kreiranje spiska CRUD (Create, Read, Update, Delete) 
tačaka (endpoints) za resurse vaše aplikacije
ENDPOINTS 
RESTful API-centric Universe 
Endpoints Planning 
Users 
- Create 
- Read 
- Update 
- Delete 
- List (active, suspended) - Image 
Posts 
- Create 
- Read 
- Update 
- Delete 
- List (approved, disapproved)
Naming Convention 
Best Practices
NAMING CONVENTIONS 
RESTful API-centric Universe 
GET resources 
•GET /users - Lista korisnika sa paginacijom •GET /users/X - Samo korisnik X. ID, hash, slug, username, ili neki 
drugi podatak koji jedinstveno opisuje resurs •GET /users/X,Y,Z - Podaci o tri korisnika 
Sub-resources: 
•GET /users/X/posts - Svi postovi jednog korisnika •GET /users/X/posts/Y - Jedan post jednog korisnika (ili bolje 
GET /posts/Y - Jedan post)
NAMING CONVENTIONS 
RESTful API-centric Universe 
DELETE resources 
•DELETE /posts/X - Briše jedan post •DELETE /posts/X,Y,Z - Briše više postova •DELETE /posts - Briše sve postove - opasan endpoint! •DELETE /posts/X/images - Briše sve slike vezane za jedan post
NAMING CONVENTIONS 
RESTful API-centric Universe 
POST vs PUT War 
Koristite POST ako ne znate tačnu lokaciju resursa. 
Primer: 
POST /articles HTTP/1.1 
HTTP/1.1 201 Created Location: /articles/63636
NAMING CONVENTIONS 
RESTful API-centric Universe 
POST vs PUT War 
Sad kad znate tačnu lokaciju resursa 
koristite PUT da ga ažurirate. 
Primer: 
PUT /article/63636 HTTP/1.1
NAMING CONVENTIONS 
RESTful API-centric Universe 
Idempotencija i sigurnost 
HTTP metoda 
Sigurnim HTTP metodama 
se smatraju one koje ne menjaju resurs. 
Idempotentnim HTTP metodama 
se smatraju one koje mogu da se pozivaju više puta, 
bez da se rezultat, ali ne obavezno i resurs, 
nakon poziva promeni. 
Na primer, možemo pokušati sa postavljanjem slike jednom ili 
više puta, u slučaju da postoji problem sa konekcijom.
NAMING CONVENTIONS 
RESTful API-centric Universe 
Idempotencija i sigurnost 
HTTP metoda
NAMING CONVENTIONS 
RESTful API-centric Universe 
POST vs PUT War 
Zaključak: 
PUT je idempotentna nesigurna metoda, 
dok POST nije ni jedno ni drugo.
ENDPOINTS - PLURAL OR SINGULAR? 
RESTful API-centric Universe 
Endpoints 
Plural or Singular? 
Primer: 
GET /user/1 vraća jednom korisnika sa ID-em 1 
Šta vraća GET /user - jednog ili više korisnika? Nejasno.
ENDPOINTS - PLURAL OR SINGULAR? 
RESTful API-centric Universe 
Endpoints 
Plural or Singular? 
Možda da probamo: 
GET /user/1 odnosno GET /users 
…ali šta je sa nepravilnim množinama engleskog jezika: 
GET /person/1 ili GET /people Zbunjujuće?
ENDPOINTS - PLURAL OR SINGULAR? 
RESTful API-centric Universe 
Endpoints 
Plural or Singular? 
GET /users/1 
GET /users 
GET /users/1/images 
Množina kao rešenje:
KONTROLERI 
RESTful API-centric Universe 
"1 Controller per Resource" 
UsersController 
ImagesController 
PostsController
JSON vs XML Output
JSON VS XML OUTPUT 
RESTful API-centric Universe 
Prednosti JSONa nad XMLom: 
• manja veličina fajla • XML ima problem sa čuvanjem tipa podataka 
Svi moderni API servisi podržavaju JSON output.
JSON VS XML OUTPUT 
RESTful API-centric Universe 
JSON: 
{ 
"user": { 
"id": 1, 
"name": "Tihomir", 
"active": true, 
"image": null, 
"empty_string": "" 
} 
} 
XML: XML sa atributima: 
<users> 
<user> 
<id>1</id> 
<name>Tihomir</name> 
<active>1</active> 
<image /> 
<empty_string /> 
</user> 
</users> 
<users> 
<user id="1" active="1"> 
<name>Tihomir</name> 
<image /> 
<empty_string /> 
</user> 
</users> 
Primeri prikaza tipa podataka:
JSON API
jsonapi.org 
preporuka formata 
JSON API 
RESTful API-centric Universe 
Primer (tražimo jedan podatak): 
{ 
"posts": [{ 
"id": "1", 
"title": "Rails is Omakase" 
}] 
} 
Prednosti: Nedostaci: 
•Konzistentnost • Pojedini frameworci se ne 
snalaze sa ovakvim outputom •Zbunjujuće: Tražio sam jedan 
podatak a dobio kolekciju
JSON API 
RESTful API-centric Universe twitter.com API 
Primer (tražimo jedan podatak): 
{ 
"name": "Tihomir Opacic", 
"id": "500501255" 
} 
Primer (tražimo kolekciju): 
Prednosti: Nedostaci: 
•Minimalizam •Većina frameworka se snalazi 
sa ovakvim outputom 
• Nedostaje prostor 
za paginaciju 
i ostale meta podatke 
{ 
"name": "John Galt", 
"id": "1001" 
}, 
{ 
"name": "Jack Harper", 
"id": "1002" 
}
RESTful API-centric Universe facebook.com API 
JSON API 
Primer (tražimo jedan podatak): 
{ 
"name": "Tihomir Opacic", 
"id": "500501255" 
} 
Primer (tražimo kolekciju): 
Prednosti: Nedostaci: 
•Minimalizam •Većina frameworka se snalazi 
sa ovakvim outputom •Postoji prostor za paginaciju i 
ostale meta podatke 
• Nedostaje prostor 
za meta podatke u primeru 
zahtevanja jednog podatka 
{ 
"data": [ 
{ 
"name": "John Galt", 
"id": "1001" 
}, 
{ 
"name": "Jack Harper", 
"id": "1002" 
} 
] 
}
Namespace 
Everything 
JSON API 
RESTful API-centric Universe 
Primer (tražimo jedan podatak): 
{ 
"data": { 
"name": "Tihomir Opacic", 
"id": "500501255" 
} 
} 
Primer (tražimo kolekciju): 
{ 
"data": [ 
{ 
"name": "John Galt", 
"id": "1001" 
}, 
{ 
"name": "Jack Harper", 
"id": "1002" 
} 
] 
}
Namespace 
Everything 
JSON API 
RESTful API-centric Universe 
Primer (tražimo jedan podatak): 
{ 
"data": { 
"name": "Tihomir Opacic", 
"id": "500501255" 
} 
} 
Primer (tražimo kolekciju): 
{ 
"data": [ 
{ 
"name": "John Galt", 
"id": "1001" 
}, 
{ 
"name": "Jack Harper", 
"id": "1002" 
} 
] 
}
Namespace 
Everything 
JSON API 
RESTful API-centric Universe 
Primer (tražimo podatak o jednom korisniku, sa slikama): 
{ 
"data": { 
"name": "Tihomir" 
"id": 1234, 
"photos": { 
"data": [ 
{ 
"id": 111 
"url": "http://media.example.com/profile_large.jpg" 
} 
] 
} 
} 
}
STATUS CODES 
RESTful API-centric Universe 
HTTP Status Codes 
1xx is all about information (not used at all in APIs) 
2xx is all about success 
3xx is all about redirection 
4xx is all about client errors 
5xx is all about service errors
HTTP Status Codes
STATUS CODES 
RESTful API-centric Universe 
Primer: 
(https://leanpub.com/build-apis-you-wont-hate) 
200 - Generic everything is OK 
201 - Created something OK 
202 - Accepted but is being processed async (encoding a video, resizing image, etc) 
400 - Bad Request (should really be for invalid syntax, but some folks use for validation) 
401 - Unauthorized (no current user and there should be) 
403 - The current user is forbidden from accessing this data 
404 - That URL is not a valid route, or the item resource does not exist 
410 - Data has been deleted, deactivated, suspended, etc 
405 - Method Not Allowed (your framework will probably do this for you) 
500 - Something unexpected happened and it is the APIs fault 
503 - API is not here right now, please try again later
STATUS CODES 
RESTful API-centric Universe 
Primer API greške: 
{ 
"error": { 
"type": "NotLoggedInException", 
"message": "User session has expired at unix time 1385221367." 
} 
}
Typecasting 
"When building an API it is common for people 
to just grab stuff from the database and pass it to json_encode().” 
Laravel: User::find(1)->toJson();
TYPECASTING WITH FRACTAL 
RESTful API-centric Universe 
Često će baza podataka vratiti sve podatke tipa string, 
pa ćemo verovatno imati: 
{ 
"user": { 
"id": "1", 
"name": "Tihomir", 
"active": "1" 
} 
} 
{ 
"user": { 
"id": 1, 
"name": "Tihomir", 
"active": true 
} 
UMESTO 
}
TYPECASTING WITH FRACTAL 
RESTful API-centric Universe 
Fractal 
https://github.com/thephpleague/fractal 
"Fractal provides a presentation and transformation layer for 
complex data output, the like found in RESTful APIs, and works really 
well with JSON.”
Data Relationship 
Overview of Methods
DATA RELATIONSHIPS 
RESTful API-centric Universe 
Sub-Resources 
Za svaki podresurs kreirati endpoint: 
GET /users/X/posts 
Nedostatak: 
Za svaki resurs potrebno je napraviti dodatni API poziv 
da bi dobili podresurs (1 + n).
DATA RELATIONSHIPS 
RESTful API-centric Universe 
Compound Documents 
(Side-Loading) 
Nedostatak: Ovakav API output često ostavlja previše posla 
programerima klijentske strane aplikacije. 
{ 
"users": [ 
{ 
"id": 1, 
"name": "Tihomir Opacic" 
}, 
{ 
"id": 2, 
"name": "John Galt" 
} 
], 
"posts": [ 
{ 
"id": 1, 
"author_id": 1, 
"title": "Some Title", 
}, 
{ 
"id": 2, 
"author_id": 1, 
"title": "Some Title", 
}, 
{ 
"id": 3, 
"author_id": 2, 
"title": "Some Title", 
} 
] 
}
DATA RELATIONSHIPS 
RESTful API-centric Universe 
Embedded Documents 
(Nested-Loading) 
GET /users?embedd=photos,posts 
{ 
"data": { 
"name": "Tihomir" 
"id": 1234, 
"photos": { 
"data": [ 
{ 
"id": 111 
"url": “http://bit.ly/1.jpg" 
} 
] 
} 
"posts": { 
"data": [ 
{ 
"id": 111 
"title": "Post Title" 
} 
] 
} 
} 
} 
Generalno najfunkcionalniji od svih načina prikaza relacionih podataka.
DATA RELATIONSHIPS 
RESTful API-centric Universe 
Embedded Documents 
with Fractal 
https://github.com/thephpleague/fractal 
Fractal je koristan i za kreiranje Nested-Loading API prikaza!
RESTful API Testing
RESTFUL API TESTING 
RESTful API-centric Universe 
Cucumber 
http://cukes.info/ 
Behat (BDD for PHP) 
http://behat.org/ 
Both use Gherkin 
(Domain-Specific Language) 
http://docs.behat.org/guides/1.gherkin.html
RESTFUL API TESTING 
RESTful API-centric Universe 
Gherkin 
Primer API Outputa: 
{ 
"user": { 
"id": 1, 
"name": "Tihomir" 
} 
} 
Primer Gherkin testa: 
Feature:Places 
Scenario:Finding a specific user 
When I request "GET /users/1" 
Then I get a "200" response 
And scope into the "data" property 
And the properties exist: 
""" 
id 
name 
""" 
And the id property is an integer 
And reset scope
RESTful API Debugging
DEBUGGING 
RESTful API-centric Universe 
POSTMAN 
http://www.getpostman.com/ 
A powerful HTTP client to test web services. 
(A Chrome browser plugin)
DEBUGGING 
RESTful API-centric Universe
DEBUGGING 
RESTful API-centric Universe 
Clockwork 
https://github.com/itsgoingd/clockwork-chrome 
"Clockwork is a Chrome extension for PHP development, extending 
Developer Tools with a new panel providing all kinds of information 
useful for debugging and profiling your PHP scripts."
DEBUGGING 
RESTful API-centric Universe
RESTful API Authentication
AUTHENTICATION 
RESTful API-centric Universe 
Standardna web aplikacija 
koristi sesije. 
Restful API ne koristi sesije.
AUTHENTICATION 
RESTful API-centric Universe 
Basic Authentication 
Najlakši ali i najnesigurniji sistem za autentifikacije. 
Header: 
Authorization: Basic dGlob21pcjoxMjMxMjM= 
PHP: 
echo base64_decode(‘dGlob21pcjoxMjMxMjM=‘); // tihomir:123123
AUTHENTICATION 
RESTful API-centric Universe 
Digest Authentication 
Slično Basic autentifikaciji, nešto bezbedniji sistem jer koristi 
MD5 enkripciju, ali i dalje nebezbedan. 
MD5... 4... 3... 2... 1... HACKED!
AUTHENTICATION 
RESTful API-centric Universe 
OAuth 1.0a Authentication 
Sa pojavom OAuth 2 prestao da bude popularan izbor.
AUTHENTICATION 
RESTful API-centric Universe 
OAuth 2.0 Authentication 
Da bi koristili OAuth 2.0 trebaće vam OAuth 2.0 Server 
https://github.com/thephpleague/oauth2-server/ 
Proučite specifikacije OAuth 2.0 protokola: 
http://tools.ietf.org/html/draft-ietf-oauth-v2-23 
Primer jednostavnog i sigurnog poziva: 
GET https://graph.facebook.com/me?access_token=DFGJKHDFGHDIFHG
RESTful API Pagination
PAGINATION 
RESTful API-centric Universe 
{ 
"data": [ 
... 
], 
"pagination": { 
"total": 1000, 
"count": 12, 
"per_page": 12, 
"current_page": 1, 
"total_pages": 84, 
"next_url": "https://api.example.com/users?page=2&number=12" 
} 
} 
Problem #1: SELECT count(*); 
Problem #2: Ako se između dva HTTP zahteva u bazu dodaju novi 
podaci, isti podaci će biti prikazani dva puta.
PAGINATION 
RESTful API-centric Universe 
Offsets and Cursors 
{ 
"data": [ 
... 
], 
"pagination": { 
"cursors": { 
"after": 12, 
"next_url": "https://api.example.com/users?cursor=12&number=12" 
} 
} 
} 
“Daj mi 12 podataka od podatka broj 12.”
RESTful API Dokumentacija
DOKUMENTACIJA 
RESTful API-centric Universe 
Swagger 
https://helloreverb.com/developers/swagger 
"Swagger™ is a specification and complete framework 
implementation for describing, producing, consuming, and 
visualizing RESTful web services.”
DOKUMENTACIJA 
RESTful API-centric Universe
DOKUMENTACIJA 
RESTful API-centric Universe 
API Blueprint 
http://apiary.io/blueprint 
"API Blueprint is a documentation-oriented API description 
language.”
We’re hiring! 
www.orangehilldev.com 
tihomir.opacic@orangehilldev.com 
+381.64.167.7367 
Djordja Stanojevica 9b, 
11000 Belgrade, Serbia

Contenu connexe

Tendances

RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
Combining Django REST framework & Elasticsearch
Combining Django REST framework & ElasticsearchCombining Django REST framework & Elasticsearch
Combining Django REST framework & ElasticsearchYaroslav Muravskyi
 
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜崇之 清水
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchTaylor Lovett
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPressTaylor Lovett
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2
 
RESTful Api practices Rails 3
RESTful Api practices Rails 3RESTful Api practices Rails 3
RESTful Api practices Rails 3Anton Narusberg
 
Beginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_cccBeginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_cccKazuhiro Sera
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practicesAnkita Mahajan
 
Azure Resource Manager (ARM) Template - Beginner's Guide
Azure Resource Manager (ARM) Template - Beginner's GuideAzure Resource Manager (ARM) Template - Beginner's Guide
Azure Resource Manager (ARM) Template - Beginner's GuideJuv Chan
 
ACL in CodeIgniter
ACL in CodeIgniterACL in CodeIgniter
ACL in CodeIgnitermirahman
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 UpdateRyan Cuprak
 
Padrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraPadrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraStoyan Zhekov
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Zhe Li
 
Building Awesome APIs in Grails
Building Awesome APIs in GrailsBuilding Awesome APIs in Grails
Building Awesome APIs in Grailsclatimer
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache CamelFuseSource.com
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 SlidesSuraj Gupta
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...J V
 

Tendances (20)

RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
Combining Django REST framework & Elasticsearch
Combining Django REST framework & ElasticsearchCombining Django REST framework & Elasticsearch
Combining Django REST framework & Elasticsearch
 
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with Elasticsearch
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
WSO2 AppDev platform
WSO2 AppDev platformWSO2 AppDev platform
WSO2 AppDev platform
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
 
RESTful Api practices Rails 3
RESTful Api practices Rails 3RESTful Api practices Rails 3
RESTful Api practices Rails 3
 
Beginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_cccBeginning Scala with Skinny Framework #jjug_ccc
Beginning Scala with Skinny Framework #jjug_ccc
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practices
 
Azure Resource Manager (ARM) Template - Beginner's Guide
Azure Resource Manager (ARM) Template - Beginner's GuideAzure Resource Manager (ARM) Template - Beginner's Guide
Azure Resource Manager (ARM) Template - Beginner's Guide
 
ACL in CodeIgniter
ACL in CodeIgniterACL in CodeIgniter
ACL in CodeIgniter
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter LehtoJavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
 
Padrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraPadrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...
 
Building Awesome APIs in Grails
Building Awesome APIs in GrailsBuilding Awesome APIs in Grails
Building Awesome APIs in Grails
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 Slides
 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
 

En vedette

Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015John Schmidt
 
How we migrated our huge AngularJS app from CoffeeScript to TypeScript
How we migrated our huge AngularJS app from CoffeeScript to TypeScriptHow we migrated our huge AngularJS app from CoffeeScript to TypeScript
How we migrated our huge AngularJS app from CoffeeScript to TypeScriptLuka Zakrajšek
 
The State of Content Management
The State of Content ManagementThe State of Content Management
The State of Content ManagementTihomir Opačić
 
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...Sales Hacker
 
Dynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructureDynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructureUniversity of Hertfordshire
 
Plaquette Commerciale Phone Contact
Plaquette Commerciale Phone ContactPlaquette Commerciale Phone Contact
Plaquette Commerciale Phone Contactphonecontact
 
In sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey fuIn sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey futraceyxfu
 
Structure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey resultsStructure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey resultsGigaom
 
Best Practices for API Adoption
Best Practices for API AdoptionBest Practices for API Adoption
Best Practices for API AdoptionAnyPresence
 
HCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private CloudHCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private CloudHCL Technologies
 
Charity Business Automation
Charity Business AutomationCharity Business Automation
Charity Business AutomationMohamed Shaaban
 
Canada Digital Future 2014
Canada Digital Future 2014Canada Digital Future 2014
Canada Digital Future 2014Counselorauto
 
Education and Training for The Future Workforce
Education and Training for The Future WorkforceEducation and Training for The Future Workforce
Education and Training for The Future WorkforceWISE
 
A RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming TopologiesA RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming TopologiesMasiar Babazadeh
 
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?cyrilpicat
 
USF Mid East and Turkey Pitch
USF Mid East and Turkey PitchUSF Mid East and Turkey Pitch
USF Mid East and Turkey PitchContractor
 

En vedette (20)

Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
Coffeescript: Fad or Useful Tool? Socal Code Camp Fullerton 2015
 
How we migrated our huge AngularJS app from CoffeeScript to TypeScript
How we migrated our huge AngularJS app from CoffeeScript to TypeScriptHow we migrated our huge AngularJS app from CoffeeScript to TypeScript
How we migrated our huge AngularJS app from CoffeeScript to TypeScript
 
The State of Content Management
The State of Content ManagementThe State of Content Management
The State of Content Management
 
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
 
Dynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructureDynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructure
 
Plaquette Commerciale Phone Contact
Plaquette Commerciale Phone ContactPlaquette Commerciale Phone Contact
Plaquette Commerciale Phone Contact
 
In sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey fuIn sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey fu
 
APIs and Innovation
APIs and InnovationAPIs and Innovation
APIs and Innovation
 
Structure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey resultsStructure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey results
 
Best Practices for API Adoption
Best Practices for API AdoptionBest Practices for API Adoption
Best Practices for API Adoption
 
HCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private CloudHCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private Cloud
 
Charity Business Automation
Charity Business AutomationCharity Business Automation
Charity Business Automation
 
Canada Digital Future 2014
Canada Digital Future 2014Canada Digital Future 2014
Canada Digital Future 2014
 
Ripening of a RESTful API
Ripening of a RESTful APIRipening of a RESTful API
Ripening of a RESTful API
 
Education and Training for The Future Workforce
Education and Training for The Future WorkforceEducation and Training for The Future Workforce
Education and Training for The Future Workforce
 
A RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming TopologiesA RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming Topologies
 
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
 
Qy stainless steel self priming gas-liquid mixing pump
Qy stainless steel self priming gas-liquid mixing pumpQy stainless steel self priming gas-liquid mixing pump
Qy stainless steel self priming gas-liquid mixing pump
 
USF Mid East and Turkey Pitch
USF Mid East and Turkey PitchUSF Mid East and Turkey Pitch
USF Mid East and Turkey Pitch
 
China air conditioner market report
China air conditioner market reportChina air conditioner market report
China air conditioner market report
 

Similaire à RESTful API-centric Universe

Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDBMongoDB
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 
Resting on your laurels will get you powned
Resting on your laurels will get you pownedResting on your laurels will get you powned
Resting on your laurels will get you pownedDinis Cruz
 
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...François-Guillaume Ribreau
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST APIstephenbhadran
 
zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restfultom_li
 
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web APISinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web APIRadenko Zec
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIRasan Samarasinghe
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Jackson F. de A. Mafra
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Test in Rest. API testing with the help of Rest Assured.
Test in Rest. API testing with the help of  Rest Assured.Test in Rest. API testing with the help of  Rest Assured.
Test in Rest. API testing with the help of Rest Assured.Artem Korchevyi
 
API testing with the help of Rest Assured
API testing with the help of  Rest Assured API testing with the help of  Rest Assured
API testing with the help of Rest Assured Artem Korchevyi
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)Cisco DevNet
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
DreamFactory Essentials Webinar
DreamFactory Essentials WebinarDreamFactory Essentials Webinar
DreamFactory Essentials WebinarDreamFactory
 

Similaire à RESTful API-centric Universe (20)

Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
 
Building Your First App with MongoDB
Building Your First App with MongoDBBuilding Your First App with MongoDB
Building Your First App with MongoDB
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Resting on your laurels will get you powned
Resting on your laurels will get you pownedResting on your laurels will get you powned
Resting on your laurels will get you powned
 
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
 
zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restful
 
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web APISinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
Sinergija2012 - Developing REST API for Windows Azure with ASP.NET Web API
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
 
Rest with Spring
Rest with SpringRest with Spring
Rest with Spring
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Test in Rest. API testing with the help of Rest Assured.
Test in Rest. API testing with the help of  Rest Assured.Test in Rest. API testing with the help of  Rest Assured.
Test in Rest. API testing with the help of Rest Assured.
 
API testing with the help of Rest Assured
API testing with the help of  Rest Assured API testing with the help of  Rest Assured
API testing with the help of Rest Assured
 
Switch to Backend 2023
Switch to Backend 2023Switch to Backend 2023
Switch to Backend 2023
 
REST APIs
REST APIsREST APIs
REST APIs
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
DreamFactory Essentials Webinar
DreamFactory Essentials WebinarDreamFactory Essentials Webinar
DreamFactory Essentials Webinar
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 

Dernier

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 

Dernier (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

RESTful API-centric Universe

  • 1. RESTful API-centric Universe TIHOMIR OPAČIĆ Orange Hill, Beograd
  • 2. PHIL STURGEON* Building APIs You Won’t Hate https://leanpub.com/build-apis-you-wont-hate *founder of PyroCMS, Software Developer at Kapture
  • 3. GDE SE KORISTI RESTful API? Web Facing mobile aplikacije iOS, Android… RESTful API-centric Universe
  • 4. GDE SE KORISTI RESTful API? Javscript MVVM Frameworks Angular JS, Ember, Backbone… RESTful API-centric Universe
  • 5. GDE SE KORISTI RESTful API? RESTful API-centric Universe Google Glass API https://developers.google.com/glass/v1/reference/
  • 6. GDE SE KORISTI RESTful API? Tesla Model S REST API http://docs.timdorr.apiary.io/ RESTful API-centric Universe
  • 7. 1 2 3 4 5 6 Code on Demand ŠTA JE TO REST? RESTful API-centric Universe REpresentational State Transfer Layered System Arhitekturni model definisan u šest principa: Client- Stateless Cacheable Server Uniform Interface
  • 8. ŠTA JE TO REST? RESTful API-centric Universe Uniformni interfejs 1 Uniform Interface Uniformni interfejs definiše client-server komunikaciju na način da razdvaja ove dve celine (decoupling the architecture). Ovo omogućava da se ove dve celine zasebno razvijaju.
  • 9. ŠTA JE TO REST? RESTful API-centric Universe Nepostojanje stanja 2 Stateless Nepostojanje stanja je osnovna odlika REST arhitekture. Svaki zahtev i odgovor servera na zahtev su jedinstvene nezavisne transakcije.
  • 10. ŠTA JE TO REST? RESTful API-centric Universe Mogućnost keširanja 3 Cacheable Klijent je slobodan da kešira podatke koje je primio kao odgovor servera, ukoliko server explicitno označi podatke da se mogu keširati.
  • 11. ŠTA JE TO REST? RESTful API-centric Universe Klijent-Server 4 Client-Server U interakciji klijenta i servera klijent ne vodi računa o čuvanju podataka, doke serveri ne vode računa o user interfejsu ili stanju klijenta.
  • 12. ŠTA JE TO REST? RESTful API-centric Universe Slojeviti sistem 5 Layered System Klijent nema načina da zna da li je povezan direktno na krajnji server. Ovaj princip omogućava skalabilnost servisa (load balancing, shared cache).
  • 13. ŠTA JE TO REST? RESTful API-centric Universe Kod na zahtev 6 Code on Demand Server je u mogućnosti da privremeno proširi mogućnosti klijenta da obavi određenu funkcionalnost tako što će mu preneti kod potreban za tu akciju, u vidu apleta ili skripti.
  • 14. REST MODEL U WEB SERVISIMA RESTful API-centric Universe Servis koji se kreće u granicama REST principa naziva se RESTful servisom. http://en.wikipedia.org/wiki/Representational_state_transfer
  • 15. REST MODEL U WEB SERVISIMA RESTful API-centric Universe Karakteristike RESTful API servisa: • koristi base URI, npr. http://example.com/resources/ • koristi Internet Media Type za prenos podataka. Najčešće JSON (ili XML, Atom, microformats, images...) • koristi HTTP metode (npr. GET, PUT, POST ili DELETE) • koristi hypertext linkove da predstavi stanje (state) • koristi hypertext linkove da predstavi resurse
  • 16. RESTful API SERVISI - PROBLEMI U PRAKSI RESTful API-centric Universe • Površni članci i knjige, često usmereni ka primeni na samo jednom framework-u • Razvojni principi se često se mešaju sa SOAP RPC razvojnim principima • Nedostatak standarda
  • 17. RESTful API SERVISI - PROBLEMI U PRAKSI RESTful API-centric Universe REST/SOAP razlike: • REST je arhitekturni model, SOAP je protokol (Glavni razlog nedostatka standarda)
  • 18. RESTful API SERVISI - PROBLEMI U PRAKSI RESTful API-centric Universe REST/SOAP razlike: REST koristi sledeće operacije HTTP protokola: SOAP RPC programer bi razvijao ovakve API metode: • GET • POST • PUT • DELETE • getUsers() • getNewUsersSince(SinceDate) • saveOrder(CID, PurchaseID)
  • 20. BAZA PODATAKA RESTful API-centric Universe 1 Dizajniranje baze podataka 2 Popunjavanje baze podacima (Seeding) Zašto je seeding bitan?
  • 21. SEEDING RESTful API-centric Universe Seeding “The process of creating seeding scripts means you don’t need to waste time creating this manually over and over again.” • Acceptance testing • Podaci pravih korisnika ostaju poverljivi • Ne kopiramo podatke sa live servera na razvojne platforme
  • 22. Programiranje Seeding skripti Ušteda vremena potrebnog da se baza podataka popuni test podacima.
  • 23. SEEDING RESTful API-centric Universe Faker https://github.com/fzaninotto/Faker "Faker is a PHP library that generates fake data for you. Faker is heavily inspired by Perl's Data::Faker, and by ruby's Faker."
  • 24. SEEDING RESTful API-centric Universe Faker Primer: <? $faker = FakerFactory::create(); for ($i = 0; $i < Config::get('seeding.users'); $i++) { $user = User::create([ 'name' => $faker->name, 'email' => $faker->email, 'active' => $i === 0 ? true : rand(0, 1), 'gender' => rand(0, 1) ? 'male' : 'female' ]); }
  • 25. SEEDING RESTful API-centric Universe Da li koristiti Random podatke za svaki Seeding proces? Da li se Acceptance testovi oslanjaju na nepromenljive podatke u bazi?
  • 26. SEEDING RESTful API-centric Universe iSeed https://github.com/orangehill/iseed "Inverse seed generator (iSeed) is a Laravel 4 package that provides a method to generate a new seed file based on data from the existing database table."
  • 27. SEEDING RESTful API-centric Universe iSeed Primeri: $ php artisan iseed users <? Iseed::generateSeed('users’); Iseed::generateSeed(‘photos’); Iseed::generateSeed(‘categories');
  • 28. ENDPOINTS RESTful API-centric Universe Endpoints Planning Kreiranje spiska CRUD (Create, Read, Update, Delete) tačaka (endpoints) za resurse vaše aplikacije
  • 29. ENDPOINTS RESTful API-centric Universe Endpoints Planning Users - Create - Read - Update - Delete - List (active, suspended) - Image Posts - Create - Read - Update - Delete - List (approved, disapproved)
  • 31. NAMING CONVENTIONS RESTful API-centric Universe GET resources •GET /users - Lista korisnika sa paginacijom •GET /users/X - Samo korisnik X. ID, hash, slug, username, ili neki drugi podatak koji jedinstveno opisuje resurs •GET /users/X,Y,Z - Podaci o tri korisnika Sub-resources: •GET /users/X/posts - Svi postovi jednog korisnika •GET /users/X/posts/Y - Jedan post jednog korisnika (ili bolje GET /posts/Y - Jedan post)
  • 32. NAMING CONVENTIONS RESTful API-centric Universe DELETE resources •DELETE /posts/X - Briše jedan post •DELETE /posts/X,Y,Z - Briše više postova •DELETE /posts - Briše sve postove - opasan endpoint! •DELETE /posts/X/images - Briše sve slike vezane za jedan post
  • 33. NAMING CONVENTIONS RESTful API-centric Universe POST vs PUT War Koristite POST ako ne znate tačnu lokaciju resursa. Primer: POST /articles HTTP/1.1 HTTP/1.1 201 Created Location: /articles/63636
  • 34. NAMING CONVENTIONS RESTful API-centric Universe POST vs PUT War Sad kad znate tačnu lokaciju resursa koristite PUT da ga ažurirate. Primer: PUT /article/63636 HTTP/1.1
  • 35. NAMING CONVENTIONS RESTful API-centric Universe Idempotencija i sigurnost HTTP metoda Sigurnim HTTP metodama se smatraju one koje ne menjaju resurs. Idempotentnim HTTP metodama se smatraju one koje mogu da se pozivaju više puta, bez da se rezultat, ali ne obavezno i resurs, nakon poziva promeni. Na primer, možemo pokušati sa postavljanjem slike jednom ili više puta, u slučaju da postoji problem sa konekcijom.
  • 36. NAMING CONVENTIONS RESTful API-centric Universe Idempotencija i sigurnost HTTP metoda
  • 37. NAMING CONVENTIONS RESTful API-centric Universe POST vs PUT War Zaključak: PUT je idempotentna nesigurna metoda, dok POST nije ni jedno ni drugo.
  • 38. ENDPOINTS - PLURAL OR SINGULAR? RESTful API-centric Universe Endpoints Plural or Singular? Primer: GET /user/1 vraća jednom korisnika sa ID-em 1 Šta vraća GET /user - jednog ili više korisnika? Nejasno.
  • 39. ENDPOINTS - PLURAL OR SINGULAR? RESTful API-centric Universe Endpoints Plural or Singular? Možda da probamo: GET /user/1 odnosno GET /users …ali šta je sa nepravilnim množinama engleskog jezika: GET /person/1 ili GET /people Zbunjujuće?
  • 40. ENDPOINTS - PLURAL OR SINGULAR? RESTful API-centric Universe Endpoints Plural or Singular? GET /users/1 GET /users GET /users/1/images Množina kao rešenje:
  • 41. KONTROLERI RESTful API-centric Universe "1 Controller per Resource" UsersController ImagesController PostsController
  • 42. JSON vs XML Output
  • 43. JSON VS XML OUTPUT RESTful API-centric Universe Prednosti JSONa nad XMLom: • manja veličina fajla • XML ima problem sa čuvanjem tipa podataka Svi moderni API servisi podržavaju JSON output.
  • 44. JSON VS XML OUTPUT RESTful API-centric Universe JSON: { "user": { "id": 1, "name": "Tihomir", "active": true, "image": null, "empty_string": "" } } XML: XML sa atributima: <users> <user> <id>1</id> <name>Tihomir</name> <active>1</active> <image /> <empty_string /> </user> </users> <users> <user id="1" active="1"> <name>Tihomir</name> <image /> <empty_string /> </user> </users> Primeri prikaza tipa podataka:
  • 46. jsonapi.org preporuka formata JSON API RESTful API-centric Universe Primer (tražimo jedan podatak): { "posts": [{ "id": "1", "title": "Rails is Omakase" }] } Prednosti: Nedostaci: •Konzistentnost • Pojedini frameworci se ne snalaze sa ovakvim outputom •Zbunjujuće: Tražio sam jedan podatak a dobio kolekciju
  • 47. JSON API RESTful API-centric Universe twitter.com API Primer (tražimo jedan podatak): { "name": "Tihomir Opacic", "id": "500501255" } Primer (tražimo kolekciju): Prednosti: Nedostaci: •Minimalizam •Većina frameworka se snalazi sa ovakvim outputom • Nedostaje prostor za paginaciju i ostale meta podatke { "name": "John Galt", "id": "1001" }, { "name": "Jack Harper", "id": "1002" }
  • 48. RESTful API-centric Universe facebook.com API JSON API Primer (tražimo jedan podatak): { "name": "Tihomir Opacic", "id": "500501255" } Primer (tražimo kolekciju): Prednosti: Nedostaci: •Minimalizam •Većina frameworka se snalazi sa ovakvim outputom •Postoji prostor za paginaciju i ostale meta podatke • Nedostaje prostor za meta podatke u primeru zahtevanja jednog podatka { "data": [ { "name": "John Galt", "id": "1001" }, { "name": "Jack Harper", "id": "1002" } ] }
  • 49. Namespace Everything JSON API RESTful API-centric Universe Primer (tražimo jedan podatak): { "data": { "name": "Tihomir Opacic", "id": "500501255" } } Primer (tražimo kolekciju): { "data": [ { "name": "John Galt", "id": "1001" }, { "name": "Jack Harper", "id": "1002" } ] }
  • 50. Namespace Everything JSON API RESTful API-centric Universe Primer (tražimo jedan podatak): { "data": { "name": "Tihomir Opacic", "id": "500501255" } } Primer (tražimo kolekciju): { "data": [ { "name": "John Galt", "id": "1001" }, { "name": "Jack Harper", "id": "1002" } ] }
  • 51. Namespace Everything JSON API RESTful API-centric Universe Primer (tražimo podatak o jednom korisniku, sa slikama): { "data": { "name": "Tihomir" "id": 1234, "photos": { "data": [ { "id": 111 "url": "http://media.example.com/profile_large.jpg" } ] } } }
  • 52. STATUS CODES RESTful API-centric Universe HTTP Status Codes 1xx is all about information (not used at all in APIs) 2xx is all about success 3xx is all about redirection 4xx is all about client errors 5xx is all about service errors
  • 54. STATUS CODES RESTful API-centric Universe Primer: (https://leanpub.com/build-apis-you-wont-hate) 200 - Generic everything is OK 201 - Created something OK 202 - Accepted but is being processed async (encoding a video, resizing image, etc) 400 - Bad Request (should really be for invalid syntax, but some folks use for validation) 401 - Unauthorized (no current user and there should be) 403 - The current user is forbidden from accessing this data 404 - That URL is not a valid route, or the item resource does not exist 410 - Data has been deleted, deactivated, suspended, etc 405 - Method Not Allowed (your framework will probably do this for you) 500 - Something unexpected happened and it is the APIs fault 503 - API is not here right now, please try again later
  • 55. STATUS CODES RESTful API-centric Universe Primer API greške: { "error": { "type": "NotLoggedInException", "message": "User session has expired at unix time 1385221367." } }
  • 56. Typecasting "When building an API it is common for people to just grab stuff from the database and pass it to json_encode().” Laravel: User::find(1)->toJson();
  • 57. TYPECASTING WITH FRACTAL RESTful API-centric Universe Često će baza podataka vratiti sve podatke tipa string, pa ćemo verovatno imati: { "user": { "id": "1", "name": "Tihomir", "active": "1" } } { "user": { "id": 1, "name": "Tihomir", "active": true } UMESTO }
  • 58. TYPECASTING WITH FRACTAL RESTful API-centric Universe Fractal https://github.com/thephpleague/fractal "Fractal provides a presentation and transformation layer for complex data output, the like found in RESTful APIs, and works really well with JSON.”
  • 60. DATA RELATIONSHIPS RESTful API-centric Universe Sub-Resources Za svaki podresurs kreirati endpoint: GET /users/X/posts Nedostatak: Za svaki resurs potrebno je napraviti dodatni API poziv da bi dobili podresurs (1 + n).
  • 61. DATA RELATIONSHIPS RESTful API-centric Universe Compound Documents (Side-Loading) Nedostatak: Ovakav API output često ostavlja previše posla programerima klijentske strane aplikacije. { "users": [ { "id": 1, "name": "Tihomir Opacic" }, { "id": 2, "name": "John Galt" } ], "posts": [ { "id": 1, "author_id": 1, "title": "Some Title", }, { "id": 2, "author_id": 1, "title": "Some Title", }, { "id": 3, "author_id": 2, "title": "Some Title", } ] }
  • 62. DATA RELATIONSHIPS RESTful API-centric Universe Embedded Documents (Nested-Loading) GET /users?embedd=photos,posts { "data": { "name": "Tihomir" "id": 1234, "photos": { "data": [ { "id": 111 "url": “http://bit.ly/1.jpg" } ] } "posts": { "data": [ { "id": 111 "title": "Post Title" } ] } } } Generalno najfunkcionalniji od svih načina prikaza relacionih podataka.
  • 63. DATA RELATIONSHIPS RESTful API-centric Universe Embedded Documents with Fractal https://github.com/thephpleague/fractal Fractal je koristan i za kreiranje Nested-Loading API prikaza!
  • 65. RESTFUL API TESTING RESTful API-centric Universe Cucumber http://cukes.info/ Behat (BDD for PHP) http://behat.org/ Both use Gherkin (Domain-Specific Language) http://docs.behat.org/guides/1.gherkin.html
  • 66. RESTFUL API TESTING RESTful API-centric Universe Gherkin Primer API Outputa: { "user": { "id": 1, "name": "Tihomir" } } Primer Gherkin testa: Feature:Places Scenario:Finding a specific user When I request "GET /users/1" Then I get a "200" response And scope into the "data" property And the properties exist: """ id name """ And the id property is an integer And reset scope
  • 68. DEBUGGING RESTful API-centric Universe POSTMAN http://www.getpostman.com/ A powerful HTTP client to test web services. (A Chrome browser plugin)
  • 70. DEBUGGING RESTful API-centric Universe Clockwork https://github.com/itsgoingd/clockwork-chrome "Clockwork is a Chrome extension for PHP development, extending Developer Tools with a new panel providing all kinds of information useful for debugging and profiling your PHP scripts."
  • 73. AUTHENTICATION RESTful API-centric Universe Standardna web aplikacija koristi sesije. Restful API ne koristi sesije.
  • 74. AUTHENTICATION RESTful API-centric Universe Basic Authentication Najlakši ali i najnesigurniji sistem za autentifikacije. Header: Authorization: Basic dGlob21pcjoxMjMxMjM= PHP: echo base64_decode(‘dGlob21pcjoxMjMxMjM=‘); // tihomir:123123
  • 75. AUTHENTICATION RESTful API-centric Universe Digest Authentication Slično Basic autentifikaciji, nešto bezbedniji sistem jer koristi MD5 enkripciju, ali i dalje nebezbedan. MD5... 4... 3... 2... 1... HACKED!
  • 76. AUTHENTICATION RESTful API-centric Universe OAuth 1.0a Authentication Sa pojavom OAuth 2 prestao da bude popularan izbor.
  • 77. AUTHENTICATION RESTful API-centric Universe OAuth 2.0 Authentication Da bi koristili OAuth 2.0 trebaće vam OAuth 2.0 Server https://github.com/thephpleague/oauth2-server/ Proučite specifikacije OAuth 2.0 protokola: http://tools.ietf.org/html/draft-ietf-oauth-v2-23 Primer jednostavnog i sigurnog poziva: GET https://graph.facebook.com/me?access_token=DFGJKHDFGHDIFHG
  • 79. PAGINATION RESTful API-centric Universe { "data": [ ... ], "pagination": { "total": 1000, "count": 12, "per_page": 12, "current_page": 1, "total_pages": 84, "next_url": "https://api.example.com/users?page=2&number=12" } } Problem #1: SELECT count(*); Problem #2: Ako se između dva HTTP zahteva u bazu dodaju novi podaci, isti podaci će biti prikazani dva puta.
  • 80. PAGINATION RESTful API-centric Universe Offsets and Cursors { "data": [ ... ], "pagination": { "cursors": { "after": 12, "next_url": "https://api.example.com/users?cursor=12&number=12" } } } “Daj mi 12 podataka od podatka broj 12.”
  • 82. DOKUMENTACIJA RESTful API-centric Universe Swagger https://helloreverb.com/developers/swagger "Swagger™ is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services.”
  • 84. DOKUMENTACIJA RESTful API-centric Universe API Blueprint http://apiary.io/blueprint "API Blueprint is a documentation-oriented API description language.”
  • 85. We’re hiring! www.orangehilldev.com tihomir.opacic@orangehilldev.com +381.64.167.7367 Djordja Stanojevica 9b, 11000 Belgrade, Serbia