12. Restful Web ServicesRestful Web Services
12 / 44
CLIENT
WebBrowser
PHP
Javascript
RUBY
PYTHON
REST SERVER
/api/user/123
/api/user
/api/user
/api/user/123
/api/user/123
USER DOMAIN
getUserEntity()
getUserCollection()
addUserEntity()
updateUserEntity()
deleteUserEntity()
GET Request
JSON Response
GET Request
JSON Response
POST Request
JSON Response
PUT Request
JSON Response
DELETE Request
JSON Response
Integer
UserEntity
void
UserCollection
Array
Boolean
Integer, Array
Boolean
Integer
Boolean
13. RPC Web ServicesRPC Web Services
13 / 44
Local
CLIENT
javascript
RPC
Client
JSON
Method:getUser
Params:id
USER DOMAIN
getUserEntity()
GET Request
JSON Result
Integer
UserEntity
RPC
Server
/json-rpc.php
Remote Call
JSON Result
javascript
JSON
Method:addUser
Params:name
addUserEntity()
POST Request
JSON Result
Array
Boolean
/json-rpc.php
Remote Call
JSON Result
javascript
XML
Method:getUser
Params:id
getUserEntity()
GET Request
XML Result
Integer
UserEntity
/xml-rpc.php
Remote Call
XML Result
javascript
XML
Method:addUser
Params:name
addUserEntity()
POST Request
XML Result
Array
Boolean
/xml-rpc.php
Remote Call
XML Result
14. VersionierungVersionierung
14 / 44
default Version per URLdefault Version per URL
Version 1 per URLVersion 1 per URL
Version 2 per URLVersion 2 per URL
default Version per Content Negotiationdefault Version per Content Negotiation
Version 1 per Content NegotiationVersion 1 per Content Negotiation
Version 2 per Content NegotiationVersion 2 per Content Negotiation
15. JSON / HAL / ProblemJSON / HAL / Problem
15 / 44
20. UI: DB-connectedUI: DB-connected
Auth AdapterAuth Adapter Datenbank AdapterDatenbank Adapter Neue User APINeue User API
AuthentifizierungAuthentifizierung Profile ServiceProfile Service User ServiceUser Service
#step1 20 / 44
31. UI: Doctrine-connectedUI: Doctrine-connected
Address ServiceAddress Service Customer ServiceCustomer Service Product ServiceProduct Service
Booking ServiceBooking Service Bookingpos. ServiceBookingpos. Service
#step2 31 / 44
43. DANKEDANKE
Für Ihre / Eure Aufmerksamkeit!
Repository: https://github.com/RalfEggert/ipc2015-apigility
43 / 44
44. BildnachweisBildnachweis
[B00] Fotos von Ralf Eggert
[B01] Frontiers 2011 - Day 2 https://www.flickr.com/photos/frontiersofinteraction/5866676276/ von Frontiersofinteraction - CC-BY https://creativecommons.org/licenses/by/2.0/
[B02] Slow poke - bush gardens https://www.flickr.com/photos/hyku/421609299 von Josh Hallett - CC-BY https://creativecommons.org/licenses/by/2.0/
[B03] Thirsty lady bugs https://www.flickr.com/photos/snowpeak/5897430351/ von John Fowler - CC-BY https://creativecommons.org/licenses/by/2.0/
[B04] Still here https://www.flickr.com/photos/thenovys/3784261365 von Abe Novy - CC-BY https://creativecommons.org/licenses/by/2.0/
[B05] Young student https://www.flickr.com/photos/audiolucistore/14159712431/ von www.audio-luci-store.it - CC-BY https://creativecommons.org/licenses/by/2.0/
[B06] My nuts https://www.flickr.com/photos/lucasincas/6517703315/ von Lucas Incas - CC-BY https://creativecommons.org/licenses/by/2.0/
[B07] Fixing the database https://www.flickr.com/photos/dahlstroms/4140461901 von Håkan Dahlström - CC-BY https://creativecommons.org/licenses/by/2.0/
[B08] Monaco 14pt https://www.flickr.com/photos/polarity/3138680190 von Robert Agthe - CC-BY https://creativecommons.org/licenses/by/2.0/
[B09] RSA Securid Token - Credit Card Style https://www.flickr.com/photos/purpleslog/265657780 von Purple Slog - CC-BY https://creativecommons.org/licenses/by/2.0/
[B10] Shelf of Used Books https://www.flickr.com/photos/thedarkthing/5363586197 von William Ross - CC-BY https://creativecommons.org/licenses/by/2.0/
[B11] Ticket validator at Nice train station https://www.flickr.com/photos/traveleden/3797157077 von Simon - CC-BY https://creativecommons.org/licenses/by/2.0/
[B12] Test Lab - Supermicro Storage https://www.flickr.com/photos/jemimus/8533890844 von Robert - CC-BY https://creativecommons.org/licenses/by/2.0/
[B13] Busy Postmen https://www.flickr.com/photos/wheatfields/4253690499 von Christian Guthier - CC-BY https://creativecommons.org/licenses/by/2.0/
[B14] Network switch and cables https://www.flickr.com/photos/nayukim/3827776580 von Nayu Kim - CC-BY https://creativecommons.org/licenses/by/2.0/
[B15] We are all fan of laptops. https://www.flickr.com/photos/scottvanderchijs/4493248747 von Scott & Elaine van der Chijs - CC-BY https://creativecommons.org/licenses/by/2.0/
[B16] Etech05: Audience https://www.flickr.com/photos/oreilly/6648470 von James Duncan Davidson - CC-BY https://creativecommons.org/licenses/by/2.0/
Alle weiteren Screenshots wurden von Ralf Eggert erstellt.
44 / 44