Drupal services and the tasty backbone.js

3,330 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,330
On SlideShare
0
From Embeds
0
Number of Embeds
197
Actions
Shares
0
Downloads
4
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Drupal services and the tasty backbone.js

  1. 1. Drupal Services and the tasty backbone.js Nagailic Sergiu | Nikrowww.wearepropeople.com
  2. 2. Content: 1. Introduction to Web Services. 2. Say Hi to the Services module. 3. More about Services module. Expanding the module (creating resources). 4. Services working example (demo). 5. Say Hi to backbone.js. 6. Friendship between Drupal and backbone.js. 7. Backbone.js working example (demo). 8. Round-up.www.wearepropeople.com
  3. 3. Introduction to Web Services: ● XML-RPC / SOAP based Services ● JavaScript Services (where most of them are either RPC or RESTful) ● RESTful Services ● Otherwww.wearepropeople.com
  4. 4. Why do we need Services?www.wearepropeople.com
  5. 5. Why do we need Services?www.wearepropeople.com
  6. 6. Why do we need Services?www.wearepropeople.com
  7. 7. Why do we need Services?www.wearepropeople.com
  8. 8. Clients…www.wearepropeople.com
  9. 9. Approach 1: XML-RPC... XML-RPC is a remote procedure call which uses XML to encode its calls and HTTP as a transport mechanism. "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol.www.wearepropeople.com
  10. 10. XML Messages:www.wearepropeople.com
  11. 11. www.wearepropeople.com
  12. 12. www.wearepropeople.com
  13. 13. In result our API might look like:www.wearepropeople.com
  14. 14. SOAP: SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. It relies on Extensible Markup Language (XML) for its message format, and usually relies on other Application Layer protocols, most notably Hypertext Transfer Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.www.wearepropeople.com
  15. 15. Basic SOAP Structure:www.wearepropeople.com
  16. 16. www.wearepropeople.com
  17. 17. API approach | Usage:www.wearepropeople.com
  18. 18. API approach | Usage:www.wearepropeople.com
  19. 19. REST / RESTful APIs REpresentational State Transfer (REST) is a style of software architecture for distributed systems such as the World Wide Web. REST has emerged over the past few years as a predominant Web service design model. REST has increasingly displaced other design models such as SOAP and WSDL due to its simpler style.www.wearepropeople.com
  20. 20. REST / RESTful APIswww.wearepropeople.com
  21. 21. REST / RESTful APIswww.wearepropeople.com
  22. 22. REST / RESTful APIswww.wearepropeople.com
  23. 23. REST / RESTful APIswww.wearepropeople.com
  24. 24. Hello Services Module!www.wearepropeople.com
  25. 25. Hello Services Module!www.wearepropeople.com
  26. 26. Expanding the Module. Creating own Resources. Working example. DEMO / LIVEwww.wearepropeople.com
  27. 27. Hello backbone.js! Backbone is a JavaScript framework/API with a RESTful JSON interface, and is loosely based on the model–view–controller (MVC) application design paradigm.www.wearepropeople.com
  28. 28. Tasty Friendship ● Models (ie. Nodes) ● Collections (Views or Index) ● Views (Renders JS to HTML)www.wearepropeople.com
  29. 29. Backbone.js working example. DEMO / LIVEwww.wearepropeople.com
  30. 30. Round-up.www.wearepropeople.com
  31. 31. www.wearepropeople.com
  32. 32. Thanks!www.wearepropeople.com

×