20 APIs in 20 Days

Error message

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

So, you can put out a passable brochure site in a day and have reached the point where you want to learn a little more about Drupal. You're not looking to become an elite hacker type, you just want to be able to do something beyond pointing and clicking your way through site building.

But where to start? Between all the books, DVDs, blogs, forums, IRC channels, YouTube videos, meetups and self-proclaimed 'ninjas' spouting off and vying for your attention, figuring out where to spend your time and hard earned dollars can be a challenge. Different people have different ways of learning, and there are some people who are going to find all this stuff useful at some level.

But instead of going down the road of 'educational materials' written 'for the rest of us', you may want to use your time doing some self-directed learning about APIs (or Application Programming Interfaces). These are the tools people tend to use to solve problems in Drupal, and they can apply to a wide range of challenges developers are going to face. Even if you do not consider yourself to be a programmer, you may want to understand what they are all about. Knowing what they are and when to apply them is often the difference between a good Drupal site and a great one.

20 APIs in 20 Days is a blog series published by Trellon, aimed at sharing a little bit of information about module interfaces every good developer should know at least a little bit about. We don't intend to publish information in 20 sequential calendar days, but do plan on spending 20 days going over something important you may find useful to know. So don't give us a hard time when we forget to hit 'publish' a couple days in a row - it's going to happen, Trellonauts tend to be very busy people.

APIs Make and Break Projects

You may want to know what an API is all about even if you are not a programmer. As a company, Trellon does a lot of things really well. One of the things we really excel at, however, is building great Drupal and CiviCRM developers, and part of that comes from how we work with APIs.

Trellon has been delivering Drupal solutions for over 6 years, and our team has developed some disciplines around how to bring people up to speed with the platform. It is not uncommon for a developer with limited PHP experience to join our team and be producing advanced theming and custom module work within a couple months without any formal training. A big part of surviving and growing as a company has been looking at the ways people learn and putting a culture in place that is centered on helping people to thrive as developers. It has not hurt having some really smart people around, either, to help guide others down the right paths.

When we got started building sites with Drupal, the options for learning about the platform were fairly constrained. There were no helpful books or videos to guide your learning experience, you were either hacking on the code yourself or spending a lot of quality time hanging out in IRC channels with the 'interesting personalities' who make up the Drupal world. At the same time, Drupal and contributed modules continued to evolve from release to release, and the ways you solve problems could change dramatically from one month to the next. The infuriating downside of delivering pure open source solutions - by the time you complete a project and write down what you did to solve an issue, your solution may become completely obsolete as something better emerges to take it's place.

Dealing with this nature of an open source project is as important as any technical skill you are ever going to gain with the platform. The way Trellon has dealt with it is by looking for constants where they exist, watching them like a hawk and making sure we know what is going to happen with them in the next release so we can be prepared. This approach lets us know what to use and when to use it, and (more importantly) allows us to better support out clients. It also lets us know how something is going to perform when it is deployed for a client web site, and invites some predictability around projects. Instead of using the latest module that claims to be the solution for a problem, our solutions can be centered around something that is going to be maintained and can be built off for some time.

The real payoff is down the road, when a site needs to be maintained over time. Knowing your APIs means you know how the upside and downside to any approach and how to deal with it when it becomes important. This kind of knowledge is what makes sites sustainable, keeps costs down, allows new people to come into projects without needing to retrain them, etc. Business decision makers benefit from having an understanding of these core building blocks, as they have an impact on how much it costs to keep things running for a long time to come.

What Are We Going to Cover

APIs in Drupal exist in a lot of forms, ranging from simple callbacks that are part of a module to well-defined function calls with a lot of parameters that depend on other modules to work. We have a broad definition for what an API actually is, and are mostly focused on the ways you work with a module that does not involve clicking a button.

Over the next month, we are going to discuss 20 of the most popular ones that keep popping up in our projects. These were decided on by our team in late December 2009, consisting of people who use Drupal day to day as part of their jobs and some of whom also play important roles in the Drupal community. Here is the list of what we are going to cover:

  • CCK
  • Ctools
  • Views
  • Preprocessing / Theme layer
  • Hooks API
  • Relationships
  • Activity
  • Feeds
  • Services API
  • Workflow
  • Node API
  • Forms API
  • Triggers and Actions
  • Messaging / Notifications
  • ApacheSolr
  • Voting API
  • Domain Access
  • Token
  • Organic Groups

... and this is only scratching the surface of the APIs that exist for Drupal. Be forewarned, most of the material we are going to cover is useful for Drupal 6, and may or may not apply in Drupal 7. But we do plan on sharing a lot of insight into code and approaches for solving challenges you might run into with the platform that are going to apply regardless of version.

Use the social bookmarking links below to share this with a friend you think may enjoy this series, and check back every day to see how well we keep up with our self-imposed publishing schedule.