View
 

FrontPage

This version was saved 16 years, 8 months ago View current version     Page history
Saved by Jeff Lindsay
on March 11, 2008 at 2:27:31 am
 

For real pipes on the web.

 

What are web hooks?

Web hooks let you customize, extend and integrate the web applications you use with anything else you can access programmatically. To web developers, web hooks are a simple design pattern that only require the ability to make web requests and to store some extra data about users. To users, web hooks are a way to get events and data in realtime from their web applications. From this they can use the data however they like, empowering them with the ability to extend and integrate, and start seeing the true vision of the programmable web.

 

How do they work?

By letting the user specify a URL for various events, the application will POST data to those URLs when the events occur. With the cheap availability of PHP hosting and even easier simple app/script hosting like AppJet, handling the POST data becomes fairly trivial. How you use it is up to you and whatever you want to accomplish. Among other things, you can:

 

  • create notifications to you or anybody via email, IRC, Jabber, ...
  • put the data in another app (real-time data synchronization)
  • process the data and repost it using the app's API
  • validate the data and potentially prevent it from being used by the app

 

Why should I care?

As integrated as we perceive the web, most web applications today operate in silos. With the rise of API's we've seen mashups and some degree of integration between applications. However, we have not seen the vision of the programmable web: a web where you as the user can "pipe" data between apps much like the Unix command line. Some say RSS is the answer. They are wrong. The heart is in the right place, but the implementation is wrong. RSS is still useful, but it is not going to bring us the true programmable web.

 

We just need a simple way to get data out in real-time to let the user easily do whatever they want with it. That means no polling, no content constraints, and no XML parsing. That means no RSS. Using HTTP is simpler and easier to use. PHP is a very popular and accessible programming environment, so it's likely to be used often for writing hooklets... getting data from a web POST in PHP is as simple as $_POST['something']. And making the request to the user script is as simple as making an HTTP request, something already built-in to most programming environments. In fact, web hooks are easier to implement than an API.

 

However implemented (although the easier the more likely it will be adopted), having an output for the web will complement the input provided by the rising adoption of API's. When you have both input and output, you have everything you need for apps to easily interact. This will encourage smaller, more focused apps that together with hook-enabled heavier apps will let amazing emergent creations happen!

 

Who is using web hooks?

A number of people have started using web hooks. Some consciously, some out of pragmatism. And that's a good sign. Let's reinforce this pattern... implement web hooks and join this party.

 

 

Who should be using web hooks?

  • Online application platforms
    • DabbleDB
    • Coghead
    • Salesforce
    • Ning
  • Remember the Milk (I just want to extend the todo app I use)
  • Twitter (wants to anyway)
  • Everybody...

 

Presentations

  • Web Hooks - Slides and notes to a presentation I gave several places
  • Web Hooks on PBwiki - Nathan's report on implementing web hooks on PBwiki

 

Further reading

 

You can also contact Jeff Lindsay for more information: 

jeff AT progrium DOT com

 

Comments (0)

You don't have permission to comment on this page.