Drupal Services
Gold Sponsor ofDrupalCamp Kyiv 2011
Silver Sponsors ofDrupalCamp Kyiv 2011
Presentation plan
What is Services for? Resources out-of-box. Services API Building REST interface with Services Future of Services
Architechture
Services 3.x
resource oriented (CRUD = create, retrieve, update, delete, index)
different formatters (php, json, jsonp, xml, ...) separate endpoints (exportable to features)
Services 3.x resources
Node resource Taxonomy vocabulary resource (getTree) Taxonomy term resource (selectNodes) User resource (login, logout, register) Comment resource (loadNodeComments,
countAll, countNew) System resource (no CRUD) (connect,
get_variable, set_variable)
Services 3.x resources
File resource (CRUD) (nodeFiles)
Services 3.x hook_services_resources
Services 3.x hook_services_resources
Services 3.x REST server formatters
http://<your_domain>/<your_endpoint_path>/<your_resource_path>.<formatter>
Standard: php, json, jsonp, xml, yaml, bencode (see RESTServerViewBuiltIn)
Build REST interface
Implement CRUD functionality. Use actions, relationships
resource/node/X/comments Use aliases if needed. Write unit tests (TDD)
Future of Services
Context objects Entities Views Core
Tools & Resources
Poster https://addons.mozilla.org/en-US/firefox/addon/2691
Services Handbook http://drupal.org/handbook/modules/services
Tests A future for Services. http://goodold.se/blog/tech/future-
services-3x
Groups http://groups.drupal.org/services
Questions
Ваша фотка email: [email protected]
twitter: ygerasimov
skype: yuriy_gerasimov
d.o.: http://drupal.org/user/257311
Recommended