Developing RESTful Web Services and APIs training in Los Angeles on November 3, 4 & 5, 2011

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
oseldman's picture
Start: 
2011-11-03 09:30 - 2011-11-05 17:30 America/Los_Angeles
Organizers: 
Event type: 
Training (free or commercial)

Developing RESTful Web Services and APIs is a 2-day training on November 3 & 4, 2011, with an optional third day of additional hands-on support for those developers seeking accelerated understanding of exploiting Services 3.0 to its fullest.

During this training, the experts at Exaltation of Larks cover the fundamentals of using the Drupal Services module to create, test and support use of your own web API. This training covers Services 3.0 for both Drupal 6 and Drupal 7.

This is the training you need if you're using Drupal to create a backend for iPad, iPhone or Android applications. Developing your own web API is essential to entering the SaaS (Software as a Service) business model and this training gets you there.

    Sign up today at http://www.larks.la/training  

Days

3 days: This training is from 9:30am-5:30pm each day and begins at 9:30am sharp.

Day 1
Attendees will receive an initial day of lecture describing the various aspects of RESTful development, and that within the Services 3.0 framework for both Drupal 6 and Drupal 7. At the end of the day, a series of "starter" modules will be distributed in which attendees can begin creating their own APIs.

Day 2
The second day begins with a walkthrough of the starter modules, quickly launching into examples of varying levels of complexity, and finishes with hands-on guidance as attendees begin working on their APIs. Time permitting, a brief show & tell ends the training for those attending the first two day version.

Day 3 (optional)
An optional third day of training is available where the experts at Exaltation of Larks support attendees' progress and individual projects, and completes with a brief show and tell among the attendees.

Prerequisites

You must have some experience creating Drupal modules and have your own Drupal 6 or Drupal 7 development environment that you can access (either locally or hosted elsewhere). This is an advanced developers' workshop and familiarity with PHP and Drupal fundamentals is strongly encouraged.

Attendees of Drupal Module Development trainings by Exaltation of Larks, Chapter Three, Lullabot or Acquia already meet this criteria.

Training outline

This training is focused on RESTful implementations and the goal is to get you developing your own API ASAP. Example code for both Drupal 6 and Drupal 7 will be provided:

Minimal API module for use as an API start:

  • Example simple & complex custom access implementations
  • Example resource CRUD (Create, Retrieve, Update, Delete & Index) operation implementations
  • Example Targeted Action implementation
  • Example Relationship implementations

JavaScript / jQuery throw-away testing UI module:

  • Examples of executing all CRUD (Create, Retrieve, Update, Delete & Index) operations

Talking to an external RESTful API:

  • via the Drupal API
  • via CURL

Lots of assorted useful tips and D6 & D7 code samples:

  • Protecting images via an Image Content Type Relationship
  • Walk thru of logic supporting Ubercart custom digital product compiler, remotely hosted in cloud server

What to bring

Bring your laptop, a power adapter and any other cables you usually use. You must have your own Drupal 6 or Drupal 7 development environment that you can access (either locally or hosted elsewhere).

This training is being held at Droplabs, a Drupal coworking and event space in Downtown Los Angeles. There is plenty of free parking in our parking lot.

Lunch is included and you will be provided with WiFi, starter modules with example code, and a fun 3 days!

Other trainings

Are you interested in more introductory trainings? Try Drupal Fundamentals on October 31, 2011, and Drupal Architecture (Custom Content, Fields and Lists) on November 1 & 2, 2011.

We're also offering Drupal Scalability and Performance on October 31, 2011.

Comments

why use RESTful?

joyseeker's picture

Is RESTful web better for connecting Drupal to an app than phonegap or titanium or just a different method?

Titanium and PhoneGap require

kylebrowning's picture

Titanium and PhoneGap require RESTFul interfaces to pull information out of Drupal.

So do things like the Drupal iOS SDK.

thanks, kyle

joyseeker's picture

Now the pieces make sense!

Different things altogether

akalsey's picture

Phonegap and Titanium are products you use to build a mobile app. You write HTML and then compile them into an iOS or Android app (or other platforms, but who uses those?). It's an alternative to writing C or Java code and creating an app that way.

Web services are something else altogether -- a way to pass data over http. As Kyle mentions, if you needed to connect your application to an online app, you might use REST in your Phonegap or your native app. Say you were building a game, and you wanted to maintain a list of high scores across all people that play the game. Your app could call a REST service to send the score to the web site, and use a REST service to pull down a list of all the top scores from around the world.

RESTful is...

bsenftner's picture

RESTful is the native API of web browsers. When you put some website's address into a browser, that's an implied REST expression called a "GET" of the resource at that address. In response to that GET request, the web server on the other end returns a web page. However, REST is much more than requesting the resource (data) at some address. Just like using any web site, one is able to Create things, Retrieve them afterwards, perform Updates to them, and eventually Delete them. That Create -> Retrieve -> Update -> Delete cycle is called "doing CRUD" (really), and that in a nutshell is what creating and using a RESTful system is all about.

"In the early days" of the Internet, when someone wanted to make a printer or some other machine programmatically communicate over the Internet, more complex systems with names like SOAP, XMLRPC and AMF were used to handle that communication. Then, around the year 2000, a smart guy named Roy Fielding pointed out that the web itself was an API and these complex systems were not only a bother to create and work through, but needless because what they were offering was already built into the web itself.

Now Drupal is a content management framework whose essential purpose is to create a web site of some sort. You are probably familiar with some web sites including information from other web sites, such as a Twitter feed or Facebook friend status. This including of other web site's information can be accomplished "the old, hard way" via scraping the page that normally shows this data, via SOAP/XMLRPC or that communicating of information can be accomplished "the new, shiny RESTful way" which takes less effort and by it's nature is universally supported.

This is essentially machine to machine communications, and is how an iPhone/iPad/Android/game console/printer or virtually any other device communicates on the Internet. This is using REST.

The topic of this tutorial is how to use the new Services 3.0 module. Services 3.0 provides an API for Drupal module developers to create a REST API of their own design. Using Services it's most basic level, one can install and enable a set of built in APIs that will allow remote programmatic administration of that web site (thru secured authentication of course!) What I'll be detailing is the more ambitious creation of a series of programmatic resources, demonstrating how to create a useful API of the type that could support anything capable of programmatic control.

For example, you could have a site where you provide users "alerts" when items the users have shown interest become available. Additionally, those alerts can be seen on Facebook and in an iPhone app. Your Drupal site providing these alerts can use a custom module and Services to publish a "yourSite.com/alerts/userid" API the Facebook and iPhone apps use to manipulate that information. Using REST for this communication is more lightweight on your web server because the Facebook and iPhone app logic is able to request that information specifically, rather than an entire web page where they would scrape off the data they want, or get that information through the more complex SOAP or XMLRPC methods.

This is also how one could have a mobile and/or console game's universal high scores and user community forums present in-game as well as simultaneously on the web. One could have a Drupal site using Services to publish an API for "doing CRUD" with high scores and interacting on the community forum. For the Drupal site, business as usual, but for the mobile and/or console game they are getting that data via a RESTful communication with the Drupal site. For the mobile and console game developers, this type of communication is easy. And through Services, it's also easy for the Drupal developer.

Further, I use Services to create "custom on-demand digital products" at a Drupal/Ubercart store, with that on-demand creation taking place on a remote cloud server. I'll walk through how that is setup, and my architecture for scaling the environment should my custom digital products go viral.

And the best part, REST is how one creates Web Services. What are Web Services? They are the future of everything. Really. Remember up there where I mention machine to machine communication? Web Services are the creation and publishing of APIs to "do CRUD" with things that people care enough to pay real money for access. Such as access to commercially controlled data like music, movies, or even stock and bond research and trading. Web Services is taking REST and wrapping it in commercial activities. Some event venue could publish a ticketing API, and then charge ticket brokers for access. The list of possibilities are endless. And that list is expected to be how ALL commercial services in the future will be conducted. (make your eyes really big when you read that last part :)

In summary, this tutorial covers how to create an API with Services 3.0, as well as how to support your API customers (who may not be using Drupal) (and who may be dumb as rocks) how to successfully use your site's API. I give out and walk through an API Shell, which took over a month to create. Next, students will begin creating their own API with architectural guidance by myself and other Larks Teaching Assistants. To facilitate this, an example API's is step by step created, with time for the students to implement their component in their API as we go along. For individuals or groups with a specific project they are planning or have in development, a 3rd day of additional guidance and support is also available.

oh God I wish I cld come

dr-wanni's picture

@Bsenftner I feel so bad that I can't be there for this, as this is what I have been trying to schieve for months now. I am a student in the university of benin, I love drupal, it basically the life I have outside other things. Please tell me if there is a way I can have this training sent to me and how much exactly is it ( if I can afford it). Or can you please point me in the right direction where I can grope for better understanding of services module and how to call data from it. I am not an experienced programmer, and I haven't written a module yet , but I realy will appreciate some help on this. Thanks.

Drupal rocks and this community is awesome. Too bad I'm not in LA. But I may be useful in my home country if I have the adequate knowledge.... Help people plsss!!!!

Sorry if I sound so "kiss ass"