SlideShare une entreprise Scribd logo
1  sur  36
Drupal as a Web
Services Platform
   Do It With Drupal 2011
  Greg Dunlap - @heyrocker
       B.J. Wilson -- @
Who Am I?
What do we mean by Web
   Services Platform?
Mobile app
Legacy
Mobile app
             integration
Legacy
Mobile app
             integration




 Partners
Legacy
Mobile app
              integration




 Partners    SSO/LDAP/etc
Legacy
Mobile app
              integration




 Partners    SSO/LDAP/etc
What are web
services exactly?
Request




Response




           http://oreilly.com/catalog/progwebsoap/chapter/ch03.html
Request
 http://example.com/hello

Response
  {"response":"OHAI!"}
Request
  http://example.com/user/heyrocker

Response
  {
      uid: "2"
      name: "heyrocker"
      mail: "heyrocker@example.com"
      created: "1315079427"
      login: "0"
      status: "1"
      timezone: "Europe/Stockholm"
      language: ""
      picture: "4"
      roles: {
        2: "authenticated user"
        3: "administrator"
      }
  }
Request
  http://example.com/user/heyrocker

Response
  {
      uid: "4"
      name: "pontus"
      image: "http://example.com/sites/default/files/pontus-small.png"
  }
  {
      uid: "5"
      name: "bahador"
      image: "http://example.com/sites/default/files/bahador-small.png"
  }
  {
      uid: "6"
      name: "simon"
      image: ""
  }
http://flickr.com/photos/heyrocker
http://flickr.com/tags/ozu
http://flickr.com/photos/heyrocker/tags/ozu
http://flickr.com/photos/jeffeaton/tags/maddie
OK what does this
  mean to me?
http://drupal.org/project/services
1) Add a new endpoint
2) Enable resources
2) Enable resources
3) Configure formatters
That’s It!
Let’s see it in action!
http://pantsquare.me
Tips and tricks
Version Your APIs
http://pantsquare.me/api/v1/node/23
Consider
performance
Check permissions
    carefully
Don’t sweat dev
 environments
Don’t build a public
API, just build an API
Additional Resources
Services
http://drupal.org/node/736522
http://groups.drupal.org/services
#drupal-services on freenode.net IRC

Frameworks
https://github.com/workhabitinc/drupal-ios-
sdk
https://github.com/skyred/DrupalCloud
Code (Coming Soon)
https://github.com/heyrocker/Pantsquare-App
https://github.com/heyrocker/Pantsquare

Sumit Kataria’s talk after lunch
Q/A

Contenu connexe

Dernier

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Dernier (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Drupal as a Web Services Platform

Notes de l'éditeur

  1. \n
  2. Introductions, where I work, pimp the book, talk about the initiative (configuration management and content deployment.) Talk about work with Deploy module and how that got me interested in the web services arena.\n
  3. So what do we mean by Web Services Plaform? It sounds like a lot of marketing buzzword hoohah to me.\n
  4. In the modern age, a website isn’t just for browsers. In fact, focusing on a web-only view of the world is very limiting because there are many other ways in which the data in your CMS can be used. and lets not forget the plethora of social media systems that appear and disappear on a seemingly daily basis - each with their own APIs and ways of getting data in and out. You want your system to be able to handle these needs without having to remake your data for each one. Web services are the way to do this.\n
  5. In the modern age, a website isn’t just for browsers. In fact, focusing on a web-only view of the world is very limiting because there are many other ways in which the data in your CMS can be used. and lets not forget the plethora of social media systems that appear and disappear on a seemingly daily basis - each with their own APIs and ways of getting data in and out. You want your system to be able to handle these needs without having to remake your data for each one. Web services are the way to do this.\n
  6. In the modern age, a website isn’t just for browsers. In fact, focusing on a web-only view of the world is very limiting because there are many other ways in which the data in your CMS can be used. and lets not forget the plethora of social media systems that appear and disappear on a seemingly daily basis - each with their own APIs and ways of getting data in and out. You want your system to be able to handle these needs without having to remake your data for each one. Web services are the way to do this.\n
  7. In the modern age, a website isn’t just for browsers. In fact, focusing on a web-only view of the world is very limiting because there are many other ways in which the data in your CMS can be used. and lets not forget the plethora of social media systems that appear and disappear on a seemingly daily basis - each with their own APIs and ways of getting data in and out. You want your system to be able to handle these needs without having to remake your data for each one. Web services are the way to do this.\n
  8. In the modern age, a website isn’t just for browsers. In fact, focusing on a web-only view of the world is very limiting because there are many other ways in which the data in your CMS can be used. and lets not forget the plethora of social media systems that appear and disappear on a seemingly daily basis - each with their own APIs and ways of getting data in and out. You want your system to be able to handle these needs without having to remake your data for each one. Web services are the way to do this.\n
  9. Web services provide a standardized and documented way for other applications retrieve and save data into your CMS that is machine-readable - code can read it and rely on it being a certain way. The collection of all the services you provide is called an API - Application Programming Interface. \n
  10. Traditionally, these have tended towards complex XML standards that, while highly detailed, were difficult to parse and read. These systems were designed very procedurally, just like code - you defined a function that took very specific inputs, and you returned very specific data. Most of all it doesn’t work how the web works. This made sense for engineers who are used to this kind of interface, but the learning curve was steep and it wasn’t very easy to read responses on the face of it. This, for example, is an example of implementing Hello World in SOAP. Indicate where the actual data is. \n
  11. In the modern age, web services are turning more and more towards REST which I could go into a lot of detail about, but it is really just a fancy way of saying ‘Put some very simple and easy to read data at a URL.’ This URL should be unique and it should identify the data being retrieved, and ideally it should be meaningful when you read it. This is an example of how you might write the Hello World app as a REST web service. Look how much simpler this is. \n
  12. Here is a slightly more concrete example. This is a call to the url user/heyrocker that retrieves some information from Drupal about... the user named heyrocker. This is on the face of it understandable and you can largely figure out what you are looking at. There’s my user id, name, email, date my account was created, you can even nest more detailed information like what roles I am assigned to. This is really great, its simple to use and most of all it works how the web works, its not hacking a solution on around existing technologies.\n
  13. Now in the next example you can see we are calling user/heyrocker/friends.json - we are asking for the friends of the user named heyrocker. URLs can be associated with not just a single piece of data but a collection of data, and you can see here how we are starting to craft the URLs to represent a hierarchy or set of relationships between the data being returned. This is a common concept in the design of REST APIs. \nThere is a lot of theory behind structured REST designs, but once you start paying attention you will start noticing these relationships in the URL design of popular websites, especially forward thinking modern sites like Flickr and Twitter. One reason this is nice is because your URLs become predictable, your users can easily get to the data they want by knowing how your URLs are designed. Flickr is my favorite example of this.\n
  14. Here’s the flickr page that is the index for all my photos. Note the url.\n
  15. Here is a page showing all the photos tagged ‘ozu’. Now a lot of what you’ll find here are photos related to the Japanese film director Yasujiro Ozu, like that book at the top left. However Ozu also happens to be the name of my cat, and while he is named after the director that’s not necessarily what I’m looking for.\n
  16. However by appending tags/ozu onto my index page, it filters the content down to photos that are mine AND tagged Ozu, and now you have lots of cute photos of my cat. It makes so much sense, and it makes finding stuff on your site so much easier.\n
  17. For instance, Jeff Eaton has the cutest cat Maddie and I often use her photo in presentations because, I mean, who doesn’t like a gorgeous cat right? I could bookmark this URL so I can access it again and again, but I don’t have to, I know what it is because Flickr uses a predictable URL architecture. I instantly have pretty much their entire database at my fingertips. Not only is it good for users, but it also vastly improves SEO because Google can do the same thing and Google loves predictable data. URL design is information architecture at its most base level, and it is also key to designing useful web services. I’m getting a little off track so lets say REST is good. It is just as useful as the old methods because it is much simpler and it works how the web works. \n
  18. What this means to you is that you want a system that can manage your data in a modern format that application programmers are used to dealing with so that you can integrate with all these systems that you need to. Guess what? Drupal is an system for doing this! While there are several ways to go about implementing this, I’m going to talk about a module called Services which was created for exactly this use case. (I also maintain it along with a dedicated group of highly talented and awesome developers.)\n
  19. Services provides a standard and extensible way to provide the data on your Drupal site through a web services interface. These interfaces are pluggable, you can choose the one you want to use, but the default it ships with in the current version is REST. Out of the box, Services provides access to core Drupal objects like nodes, users, and taxonomy, and you can write your own resources to expose custom functionality that is specific to your business. Finally, Services also provides a pluggable authentication mechanism. By default it uses standard Drupal logins but it can also use custom token systems or other mechanisms like oAuth. Used on 12,000+ sites including FCC, Warner Brothers, IKEA. Go-to answer for mobile apps. \n
  20. \n
  21. Next you enable the resources you want. This is the standard set of resources that come with Services and provide functionality for Drupal core. Note that on the left you can alias where any of these resources live. For instance, you can change all the node resources to live under content instead to make your urls more readable and friendly.\n
  22. Clicking on one of the areas opens a list of the individual functions that are available. This is the list of all the functions available for comments. Note that in addition to the usual CRUD functions, there are also custom functions to count the number of comments on a node, or count the number of new comments since a given timestamp. You can enable none or all of these in each given area.\n
  23. Services also features pluggable formatters for responses and requests, so when the wacky new hotness comes along you can easily install or write it. By default it includes all sorts of stuff as well.\n
  24. At this point, you can access the URLs and start pulling and submitting data. Now, there is still some understanding to be had around this, especially when it comes to formatting data for submission to Drupal, but on the Drupal side that is really all you have to do.\n
  25. So lets do a demo. So when I was thinking about this I knew I wanted to make a Drupal site and an iPhone app and release the code for people to take away with them. I was trying to come up with an idea and I was talking to James Walker, a former Lullabot who often did demos for module development. He told me about the pants module. \n\nHigh points: Tell story about its conceptualization. Login and authentication. Searching for and adding friends. Note lack of privacy controls “Information (about your pants) wants to be free!”\n
  26. This module was used to track whether or not the user in question was in fact wearing pants at any given time. It was a really great demo because while it was silly it also surprisingly lent itself to demonstrating a lot of core Drupal concepts really well. So after talking to James I thought it was time to bring the pants module into the modern age, and since there is a long history of fantasy/parody sites in the Drupal community I came up with the idea for...\n
  27. Pantsquare! The newest social networking phenomenon! Use your mobile device to check in with whether or not you are wearing pants! Connect with your friends and see whether or not they are wearing pants either! Share pants-related information! Pantsquare is an app built in Titanium for iPhone and Android by myself and my co-worker BJ Wilson. It demonstrates a lot of useful Services functionality like managing authentication, writing your own services, and submitting data. \n
  28. Versioning your APIs\nThink about performance impact (in many ways same as other requests because of boostrap)\nWhat dev environment to use?\nPoint people to Sumit’s talk later where he will get more dirty into the nerd stuff\n
  29. Versioning your APIs\nThink about performance impact (in many ways same as other requests because of boostrap)\nWhat dev environment to use?\nPoint people to Sumit’s talk later where he will get more dirty into the nerd stuff\n
  30. A lot of people have a tendency to ignore web services traffic but this can be a mistake. As time goes on, mobile and other traffic is going to take up a greater and greater percentage of your site traffic, and with Drupal each of these requests carries the same overhead in memory and other resources as any other request (due to bootstrap architecture, being fixed in Drupal 8)\n
  31. This is a similar point to the last slide. Services exposes the same data to users that Drupal does, but if you implement your own services you have to make sure and implement that yourself. We didn’t do this on Pantsquare - everyone can see the status of everyone’s pants. Because of course information about pants wants to be free. (no actually we just ran out of time.) However this may not be your use case. Test thoroughly because these kinds of problems are the ones that will really bite you on the Twittersphere.\n
  32. A lot of the time you will get into long discussions about what to develop apps in or pros and cons of technical decisions that in the end don’t really matter all that much. Use what you have competence in, focus on UX and Features and stuff.\n
  33. There’s a post running all over the internet right now from a Google and former Amazon engineer that talks about how the one thing Amazon has done right is they built an API for users but they also use it themselves for EVERYTHING. There are no personal internal-only services, there is no direct linking between teams, there is only the APIs that everyone else has. They eat their own dogfood. This is huge because it forces you to build the best thing you can because you need it as much as anyone else does. This is what building a platform is all about. Start with a platform and use it for everything.\n
  34. \n
  35. \n