SlideShare a Scribd company logo
@progrium
                         #webhooks



web developers? how many are frontend, how many are backend?
twitter username. send me questions.
How WebHooks Will
                 Make Us All
                Programmers


has kathy sierra taught me nothing?
How WebHooks Will
                  Make You A
                    GOD

alternative title
someday you may be asked if you’re a god and as we’ve learned from ghostbusters, you will want to
be able to say yes.
Make You A
                       GOD

               The Evented Web


evented programming
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
What are WebHooks?



 Why should we all learn to program?



How do WebHooks foster programming?
1
            What are WebHooks?



event callbacks over the web. the design pattern or architecture of letting users receive
notifications over http. it’s not a spec or a protocol, it’s more along the lines of ajax: just an
interesting way of doing things.
1
            What are WebHooks?



event callbacks over the web. the design pattern or architecture of letting users receive
notifications over http. it’s not a spec or a protocol, it’s more along the lines of ajax: just an
interesting way of doing things.
command line: pipes. we talk about the equivalent of pipes on the web and people say RSS! and I say
nooo.... it’s something else.
Input                                                              Output
                                              Program




pipes are amazing in their simplicity. it’s all from a bit of infrastructure involving input and output
STDIN                                                    STDOUT
                                           Program




                                                                   STDERR



stdin, stdout were available to reroute wherever the user wanted
most common use was chaining commands together: piping
feedback loop, which is the key to emergent systems
xargs
                                                                               wget
                  echo
                                                            mail

           grep
                                          wc

                                                                         cat

so you had all these simple little programs, that might not even be useful alone
cat




                                xargs
                                               wget
                  echo
                                        mail

           grep
                                  wc




string them together...
cat           grep




             xargs
                                   wget
echo
                            mail


               wc
cat                 grep              mail




                                     xargs
                                                                      wget
                echo



                                        wc




and you have something more useful than just the sum of the parts
STDIN
                                             Program




but it doesn’t work without the output. it just breaks.
API
                                            Web App




unfortunately that’s how the web is today.
we can talk to web apps, but they really can’t talk to us. or anything else really.
API                                                                Events
                                            Web App




it’s not that they can’t, they just don’t. we need to start placing event hooks in.
function clickHandler() {
    alert("Click!");
}

element.addEventListener('click', clickHandler);
element.addEventListener('click', function() {
    alert("Click!");
});
element.addEventListener('click', function() {
    var name = $("input#name").val();
    if (name != "") {
        alert("Hello, " + name);
    }
});
element.addEventListener('click', function(event) {
    var name = $("input#name").val();
    if (name != "") {
        alert("Hello, " + name + ". " +
            "I'm " + event.target.id);
    }
});
getting people excited about evented programming.
twisted, event machine, etc ... event driven programming.
web hooks -> evented web
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);
     }
})
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);
     }
})
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);
     }
})
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);
     }
})
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);

     } else if (twitterUser['following'] > 1000 &&
         twitterUser['followers'] < twitterUser['following'] / 2) {

         twitter.block(twitterUser);
     }
})
twitter.addEventListener('newfollower',
v                             eventHandler);
twitter.addWebHook('newfollower',
          'http://example.com/eventhandler');
twitter.addWebHook('friendupdate',
           'http://example.com/eventhandler');




some other events you could imagine writing handlers for
twitter.addWebHook('directmessage',
          'http://example.com/eventhandler');
twitter.addWebHook('myupdate',
           'http://example.com/eventhandler');




makes twitter an even more powerful platform than it is
MAILHOOKS
                          DEMO



let’s see this in action. mailhooks was one of the first “adapters” i built for the evented web.
How WebHooks Will Make Us All Programmers
MORE DEMOS
                           (and then code)




create postbin, setup/show tender, pivotal tracker, twilio.
demo clickhooks with postbin and and then show the code.
http://2.latest.scriptletsapp.appspot.com/1w47Cs/run
webhooks are simple as you saw. their simplicity affords them to be used as a simple
building block in slightly more complex systems like pubsubhubbub.
how many have heard of pubsubhubbub? how many know what it does?
not time to play the video, i know brett is here and they talked about it.
basically real-time feeds using webhooks as the core mechanic.
not time to play the video, i know brett is here and they talked about it.
basically real-time feeds using webhooks as the core mechanic.
all these sites publish content with pubsubhubbub, meaning they all effectively have
webhooks for new content events... as a result, you can consume their content in realtime.
simple mechanics, if done right, yield rich, emergent dynamics.
the emergent system with webhooks is the evented web.
The Evented Web
           (Programmable Web 2.0)


               Event Triggers


                             (WebHooks)


Web APIs                        Handler Scripts
“In computer programming, hooking is
a technique used to alter or augment the
behavior of [a program], often without
having access to its source code.”
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
The Evented Web
           (Programmable Web 2.0)


               Event Triggers


                             (WebHooks)


Web APIs                        Handler Scripts
twitter.addWebHook('newfollower',
           'http://example.com/eventhandler');




the idea is the handler is a URL... whatever. it doesn’t matter whats on the other end.
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);

     } else if (twitterUser['following'] > 1000 &&
         twitterUser['followers'] < twitterUser['following'] / 2) {

         twitter.block(twitterUser);
     }
})
twitter.addEventListener('newfollower', function(event) {
    var twitterUser = event.follower;
    var friends = facebook.getFriendsNames();

     if (twitterUser['name'] in friends) {
         twitter.follow(twitterUser);

     } else if (twitterUser['following'] > 1000 &&
         twitterUser['followers'] < twitterUser['following'] / 2) {

         twitter.block(twitterUser);
     }
})
twitter.addWebHook('newfollower',
           'http://example.com/eventhandler');




because its a url, because it’s http ... you already know how to define it. it’s a simple web app, or web
script.
love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was
easy. no permissions or cgi-bins... just upload a le with ftp.
love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was
easy. no permissions or cgi-bins... just upload a le with ftp.
love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was
easy. no permissions or cgi-bins... just upload a le with ftp.
How WebHooks Will Make Us All Programmers
so i built scriptlets, which is basically that. use php, python, javascript to write simple little
scripts hosted in the cloud. write it, save it, get a url to run it. perfect for webhook handler
scripts.
here’s a wrapper that makes postbin work for pubsubhubbub
here’s a script used with hookpress to add comment notifications via notify.io to wordpress
this is the code i used for the clickhooks demo. you can see how simple it is, notify.io does
most of the work.
notify.io is a useful part of the ecosystem. it solves the notication part.
“how do you get events to the desktop?” pubsubhubbub for example
also a gateway drug for webhooks...
NOTIFY.IO
                              DEMO



intro. twitter DM example. outlets. curl. NioCallback. DrEval...
What are WebHooks?




The Evented Web blends our existing ecosystem of web APIs with event-driven programming,
creating a web that is both more programmable and real-time.
What are WebHooks?
                          Event callbacks over HTTP
                                            enabling the Evented Web




The Evented Web blends our existing ecosystem of web APIs with event-driven programming,
creating a web that is both more programmable and real-time.
And so concludes the
technical portion of the talk.

     Questions so far?
2
                Why should we all
                learn to program?



so many passionate programmers that are so smart and influential on society.
gates, jobs, zuckerberg...
exploration of thoughts on signicance.
sidenote: programming == holistic programming, not just “software engineering”
“As programming becomes more
      important, it will leave the back room and
      become a key skill and attribute of our top
      intellectual and social classes, just as
      reading and writing did in the past.”
                                                     —Marc Prensky




programming is the new literacy. (rushkoff’s talk)
i wanted to explore this idea further ...
technology.
Technology
                              ==
                             Tools




anything useful created by the mind
think of a world without technology.
humans might not survive denied technology.
some might argue our evolution from prehuman to human was about
 fully leveraging/developing our ability to create and work with technology
How WebHooks Will Make Us All Programmers
we drove many major species into extinction and become the dominant species on earth... all
with just a little bit of basic technology.
The most powerful
                force in the world.



kevin kelly concludes (among other things) that technology is the most powerful force int he
world.
pow•er
               capacity to cause change




best denition of power. simple. more useful.
i like to say that a kid with a laptop can change the world.
what is it about the computer?
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
“The most remarkable tool
             we’ve ever come up with.”
                            —Steve Jobs




why?
Imagination Compiler



Computing is the ultimate sandbox for our mind, allowing us to explore, model and even
execute whatever systems we can *imagine*, as long as we can gure out how to express
them. This is programming.
don’t have time for this video, but it’s the introduction to the MIT course Structure and
Interpretation of computer programs. Abelson goes over how computer science isn’t really a
science, maybe more engineering or art... he relates it to magic. he also says it’s not about
the computer. it’s fundamentally about formalizing intuitions about process. how to do
things.
don’t have time for this video, but it’s the introduction to the MIT course Structure and
Interpretation of computer programs. Abelson goes over how computer science isn’t really a
science, maybe more engineering or art... he relates it to magic. he also says it’s not about
the computer. it’s fundamentally about formalizing intuitions about process. how to do
things.
Process?



intuitions about ... process?
Knowledge



well it turns out, process is the basis of knowledge. i could go on quite a while about
knowledge, but to keep things on track, we’ll simplify it to this:
knowledge is basically a collection of validated models, allowing us to know how to do
things.
how-to is process.
Knowledge
                                ==
                               Power


this now trite idea, rst expressed by francis bacon... is something i had to revisit when i
defined power as the capacity to cause change. because when framed like this it’s obviously
more than a nice correlation: knowledge really *is* the capacity to cause change, therefore in
some way, they actually are quite synonymous.
Knowledge
                                ==
                               Power


this now trite idea, rst expressed by francis bacon... is something i had to revisit when i
defined power as the capacity to cause change. because when framed like this it’s obviously
more than a nice correlation: knowledge really *is* the capacity to cause change, therefore in
some way, they actually are quite synonymous.
Programming is the
             language of power.



If knowledge is power, then programming is the language of power. Programming is the most
precise expression of how-to knowledge. You don't just program to express so much as you
program to run, to make happen.
Programming is about designing systems within the realm of computing, but as we trend
towards ubiquitous computing, the boundary of "computing" and the rest of our world will
start to disappear.
our idea of what a computer is...
has been unraveling right in front of us.
abelson is right: it’s not about the “computer” ... it’s about something more.
not even the “network”. i’m not exactly sure what it is... but
Programmers are the
   most potent technologists.



i would like to make this assertion. the industrial revolution was about mechanization. i think
software and automation are the new mechanization. only this time it’s much greater --
software gives us more bang for buck in terms of change caused by effort. it was software
that allowed celebrity conan obrien to, with one click, change a person’s life.
Technologists shape
                 humanity.



and i think its undeniable how influential people are to society that can create and truly wield
technology.
but to bring it back to a little more concrete terms and where things are going:
The world is trending towards
         becoming programmable




USA Today on CES: “You’re going to be hard-pressed to find a new gadget or gizmo in 2010
that doesn’t also connect you to web services.” That’s just a step away from having apis and
hooks. Imagine a world where everything has an API and webhooks. Programmers can use it
all as building blocks, literally programming the world around them. Magic indeed.
Wizards.



programmers become not unlike wizards ... and wizards are basically gods.
Why should we all learn
    to program?
Why should we all learn
        to program?
         “Program or be programmed.”
The world is becoming increasingly programmable.
    The power of programming will eventually
            outweigh any reason not to.
3
              How do WebHooks
            foster programming?



obviously that kind of power, capacity to cause change, will be worthy of seeking out on its
own once it becomes more obvious. what do webhooks and the evented web have to
contribute? i think they’ll accelerate the process by making it more obvious, but there’s more.
this is more generally about education.
“Education is not the filling of a pail,
                     but the lighting of a fire.”
                                                 —William Butler Yeats




framed my idea of education.
inspiration and motivation are the real secrets to education.
teaching is just a means to facilitate learning; learning happens by the individual.
you need to inspire/convince the individual they want to learn ... and they will
“The truth is that reading, writing, and
   arithmetic only take about one hundred
   hours to transmit as long as the audience is
   eager and willing to learn.”
                                                        —John Taylor Gatto




world renowned school teacher corroborates this idea.
ackoff: one of the greatest thinkers of the 20th century that you probably haven’t heard of.
greenberg: champion of the democratic school.
Infrastructure as
    Education
Village that not only didn't have access to computers, but didn't know English. Left the
computer there with CDs (no Internet) and came back 3 months later. An 8 and 12 year old
were playing a game on it and when they realized he had brought the machine, they said (in
English): "We need a faster processor and a better mouse."
How WebHooks Will Make Us All Programmers
How WebHooks Will Make Us All Programmers
“Creating content is not what's
     important. What is important is
     infrastructure and access.”

                                                    —Sugata Mitra




Montesorri
Natural language
Google.
taking this idea, and returning to programming...
how many of us started programming on something like these?
programming was almost unavoidable on them.
how many of you experience a noticeable physiological reaction to this screen?
Programming is discovered.




today, the closest thing is myspace: css hacks to pimp your prole.
but while this IS programming, it’s doesn’t convey the POWER of programming
even though there’s automator on mac -- its sterile and limiting, pure utility.
myspace style programming has relevance, expression, and... view source
Programming is discovered.




today, the closest thing is myspace: css hacks to pimp your prole.
but while this IS programming, it’s doesn’t convey the POWER of programming
even though there’s automator on mac -- its sterile and limiting, pure utility.
myspace style programming has relevance, expression, and... view source
excellent viewsourceposse panel (missed it). my quick idea:
view page source is a huge reason why there are so many web people (esp frontend)
browser as a sandbox to explore and learn.
unfortunately its not the cool stuff. it’s not the stuff that changes the world.
twitter.addEventListener('newfollower', function(event) {
       var twitterUser = event.follower;
       var friends = facebook.getFriendsNames();

         if (twitterUser['name'] in friends) {
             twitter.follow(twitterUser);

         } else if (twitterUser['following'] > 1000 &&
             twitterUser['followers'] < twitterUser['following'] / 2) {

               twitter.block(twitterUser);
         }
   })




evented web gives us a sandbox to play with code that actually DOES cool and important things that
are relevant to us. making the apps we use do more in a very personal and expressive way. the
possibility space is much larger, and the language is richer, so it’s just begging for clever and creative
exploration...
How do WebHooks foster
                    programming?




it gives us a new sandbox to “play” with our web applications together in new and useful
ways.
it provides the infrastructure to *just code* like on apple II or commodore. No dev environs,
nothing to install. building directly on the shoulders of giants to easily achieve cool, useful,
relevant “hacks” that I think would hook anybody on at least the idea of programming.
How do WebHooks foster
                    programming?

           WebHooks and the Evented Web make
             programming discoverable again




it gives us a new sandbox to “play” with our web applications together in new and useful
ways.
it provides the infrastructure to *just code* like on apple II or commodore. No dev environs,
nothing to install. building directly on the shoulders of giants to easily achieve cool, useful,
relevant “hacks” that I think would hook anybody on at least the idea of programming.
and that’s how i think, in the long run, webhooks and the evented web will help make us all gods with
the ability to *program* the world around us.
@progrium
#webhooks

More Related Content

PDF
APIs That Make Things Happen
Jeff Lindsay
 
PDF
Web Hooks
Jeff Lindsay
 
PDF
Webhooks
Guillaume POTIER
 
PDF
WebHooks in 10 Minutes
Jeff Lindsay
 
PDF
Webhooks, Asynchronous Web Applications and Push Notifications
montagetalent
 
PDF
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
 
PDF
Master the New Core of Drupal 8 Now: with Symfony and Silex
Ryan Weaver
 
PDF
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
Ryan Weaver
 
APIs That Make Things Happen
Jeff Lindsay
 
Web Hooks
Jeff Lindsay
 
Webhooks
Guillaume POTIER
 
WebHooks in 10 Minutes
Jeff Lindsay
 
Webhooks, Asynchronous Web Applications and Push Notifications
montagetalent
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Ryan Weaver
 
Master the New Core of Drupal 8 Now: with Symfony and Silex
Ryan Weaver
 
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
Ryan Weaver
 

What's hot (20)

PDF
PWA 與 Service Worker
Anna Su
 
PDF
Secure my ng-app
M A Hossain Tonu
 
ODP
Mangling
Olaf Alders
 
PDF
The MetaCPAN VM Part II (Using the VM)
Olaf Alders
 
PDF
Java to Golang: An intro by Ryan Dawson Seldon.io
Mauricio (Salaboy) Salatino
 
PDF
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Nicholas Jansma
 
PDF
Evented applications with RabbitMQ and CakePHP
markstory
 
PDF
#PDR15 - PebbleKit iOS 3.0
Pebble Technology
 
PDF
The Present Future of OAuth
Michael Bleigh
 
PDF
Forensic Tools for In-Depth Performance Investigations
Nicholas Jansma
 
PDF
Migrating existing monolith to serverless in 8 steps
Yan Cui
 
PDF
Power Of Zero
Andrew Forward
 
ODP
Continuous integration with Git & CI Joe
Shawn Price
 
PDF
Python in the land of serverless
David Przybilla
 
PDF
JavaScript APIs - The Web is the Platform
Robert Nyman
 
PPTX
React in production
Michael Haberman
 
PDF
Attribute actions
Matthew Beale
 
PPTX
Meet with Meteor
Tahmina Khatoon
 
PDF
Beware the potholes on the road to serverless
Yan Cui
 
KEY
IS YOUR WIDGET FAST? FIVE BEST PRACTICES TO FASTER EMBEDDABLE CONTENT
Ismail Elshareef
 
PWA 與 Service Worker
Anna Su
 
Secure my ng-app
M A Hossain Tonu
 
Mangling
Olaf Alders
 
The MetaCPAN VM Part II (Using the VM)
Olaf Alders
 
Java to Golang: An intro by Ryan Dawson Seldon.io
Mauricio (Salaboy) Salatino
 
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Nicholas Jansma
 
Evented applications with RabbitMQ and CakePHP
markstory
 
#PDR15 - PebbleKit iOS 3.0
Pebble Technology
 
The Present Future of OAuth
Michael Bleigh
 
Forensic Tools for In-Depth Performance Investigations
Nicholas Jansma
 
Migrating existing monolith to serverless in 8 steps
Yan Cui
 
Power Of Zero
Andrew Forward
 
Continuous integration with Git & CI Joe
Shawn Price
 
Python in the land of serverless
David Przybilla
 
JavaScript APIs - The Web is the Platform
Robert Nyman
 
React in production
Michael Haberman
 
Attribute actions
Matthew Beale
 
Meet with Meteor
Tahmina Khatoon
 
Beware the potholes on the road to serverless
Yan Cui
 
IS YOUR WIDGET FAST? FIVE BEST PRACTICES TO FASTER EMBEDDABLE CONTENT
Ismail Elshareef
 
Ad

Similar to How WebHooks Will Make Us All Programmers (20)

PDF
Building an Event-driven Web @ Impact
Jeff Lindsay
 
PDF
Web Hooks And The Programmable World Of Tomorrow
GoogleTecTalks
 
PDF
Web Hooks Google Tech Talk
Jeff Lindsay
 
PDF
Web Hooks and the Programmable World of Tomorrow
Jeff Lindsay
 
PDF
Server-Sent Events (real-time HTTP push for HTML5 browsers)
yay w00t
 
ODP
Webhooks - Creating a Programmable Internet
ryan teixeira
 
KEY
Webapp security testing
Tomas Doran
 
KEY
Webapp security testing
Tomas Doran
 
PDF
Rest
Brian Kaney
 
PDF
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
Carles FarrĂŠ
 
PDF
Crawler
hackstuff
 
PDF
PHP
kaushil shah
 
PPT
02 intro
babak mehrabi
 
KEY
What's up with HTTP?
Mark Nottingham
 
PDF
Georgia Tech Hack Day
Christian Heilmann
 
PDF
Complex things explained easily
Luca Tumedei
 
PPT
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008
Stephan Chenette
 
PDF
Slides serverside main
ggunasagar
 
PPTX
Lec 01 Introduction.pptx
AhmadMahmood62
 
PDF
+ Network Programming.pdf
OluwafolakeOjo
 
Building an Event-driven Web @ Impact
Jeff Lindsay
 
Web Hooks And The Programmable World Of Tomorrow
GoogleTecTalks
 
Web Hooks Google Tech Talk
Jeff Lindsay
 
Web Hooks and the Programmable World of Tomorrow
Jeff Lindsay
 
Server-Sent Events (real-time HTTP push for HTML5 browsers)
yay w00t
 
Webhooks - Creating a Programmable Internet
ryan teixeira
 
Webapp security testing
Tomas Doran
 
Webapp security testing
Tomas Doran
 
Rest
Brian Kaney
 
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
Carles FarrĂŠ
 
Crawler
hackstuff
 
02 intro
babak mehrabi
 
What's up with HTTP?
Mark Nottingham
 
Georgia Tech Hack Day
Christian Heilmann
 
Complex things explained easily
Luca Tumedei
 
Script Fragmentation - Stephan Chenette - OWASP/RSA 2008
Stephan Chenette
 
Slides serverside main
ggunasagar
 
Lec 01 Introduction.pptx
AhmadMahmood62
 
+ Network Programming.pdf
OluwafolakeOjo
 
Ad

More from Jeff Lindsay (13)

PDF
Hack Party SHDH Lightning Talk
Jeff Lindsay
 
PDF
NullMQ @ PDX
Jeff Lindsay
 
PDF
Evented Web @ Ignite
Jeff Lindsay
 
PDF
Hacker Dojo Origins
Jeff Lindsay
 
PDF
Dinos
Jeff Lindsay
 
PDF
Hacker Dojo @ Google
Jeff Lindsay
 
PDF
Creating + Nurturing Your Indie Game Community
Jeff Lindsay
 
PDF
Dissolving Problems
Jeff Lindsay
 
ZIP
SHDH Retrospective, Part 2
Jeff Lindsay
 
ZIP
SHDH Retrospective, Part 1
Jeff Lindsay
 
ZIP
Superglue: Web Hooks and the Future of the Web
Jeff Lindsay
 
ZIP
Using Web Hooks
Jeff Lindsay
 
PDF
Beyond Mashups: Service Integration and More
Jeff Lindsay
 
Hack Party SHDH Lightning Talk
Jeff Lindsay
 
NullMQ @ PDX
Jeff Lindsay
 
Evented Web @ Ignite
Jeff Lindsay
 
Hacker Dojo Origins
Jeff Lindsay
 
Dinos
Jeff Lindsay
 
Hacker Dojo @ Google
Jeff Lindsay
 
Creating + Nurturing Your Indie Game Community
Jeff Lindsay
 
Dissolving Problems
Jeff Lindsay
 
SHDH Retrospective, Part 2
Jeff Lindsay
 
SHDH Retrospective, Part 1
Jeff Lindsay
 
Superglue: Web Hooks and the Future of the Web
Jeff Lindsay
 
Using Web Hooks
Jeff Lindsay
 
Beyond Mashups: Service Integration and More
Jeff Lindsay
 

Recently uploaded (20)

PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
The Future of Artificial Intelligence (AI)
Mukul
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Doc9.....................................
SofiaCollazos
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 

How WebHooks Will Make Us All Programmers

  • 1. @progrium #webhooks web developers? how many are frontend, how many are backend? twitter username. send me questions.
  • 2. How WebHooks Will Make Us All Programmers has kathy sierra taught me nothing?
  • 3. How WebHooks Will Make You A GOD alternative title
  • 4. someday you may be asked if you’re a god and as we’ve learned from ghostbusters, you will want to be able to say yes.
  • 5. Make You A GOD The Evented Web evented programming
  • 13. What are WebHooks? Why should we all learn to program? How do WebHooks foster programming?
  • 14. 1 What are WebHooks? event callbacks over the web. the design pattern or architecture of letting users receive notications over http. it’s not a spec or a protocol, it’s more along the lines of ajax: just an interesting way of doing things.
  • 15. 1 What are WebHooks? event callbacks over the web. the design pattern or architecture of letting users receive notications over http. it’s not a spec or a protocol, it’s more along the lines of ajax: just an interesting way of doing things.
  • 16. command line: pipes. we talk about the equivalent of pipes on the web and people say RSS! and I say nooo.... it’s something else.
  • 17. Input Output Program pipes are amazing in their simplicity. it’s all from a bit of infrastructure involving input and output
  • 18. STDIN STDOUT Program STDERR stdin, stdout were available to reroute wherever the user wanted most common use was chaining commands together: piping feedback loop, which is the key to emergent systems
  • 19. xargs wget echo mail grep wc cat so you had all these simple little programs, that might not even be useful alone
  • 20. cat xargs wget echo mail grep wc string them together...
  • 21. cat grep xargs wget echo mail wc
  • 22. cat grep mail xargs wget echo wc and you have something more useful than just the sum of the parts
  • 23. STDIN Program but it doesn’t work without the output. it just breaks.
  • 24. API Web App unfortunately that’s how the web is today. we can talk to web apps, but they really can’t talk to us. or anything else really.
  • 25. API Events Web App it’s not that they can’t, they just don’t. we need to start placing event hooks in.
  • 26. function clickHandler() { alert("Click!"); } element.addEventListener('click', clickHandler);
  • 28. element.addEventListener('click', function() { var name = $("input#name").val(); if (name != "") { alert("Hello, " + name); } });
  • 29. element.addEventListener('click', function(event) { var name = $("input#name").val(); if (name != "") { alert("Hello, " + name + ". " + "I'm " + event.target.id); } });
  • 30. getting people excited about evented programming. twisted, event machine, etc ... event driven programming. web hooks -> evented web
  • 31. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } })
  • 32. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } })
  • 33. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } })
  • 34. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } })
  • 35. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } else if (twitterUser['following'] > 1000 && twitterUser['followers'] < twitterUser['following'] / 2) { twitter.block(twitterUser); } })
  • 37. twitter.addWebHook('newfollower', 'http://example.com/eventhandler');
  • 38. twitter.addWebHook('friendupdate', 'http://example.com/eventhandler'); some other events you could imagine writing handlers for
  • 39. twitter.addWebHook('directmessage', 'http://example.com/eventhandler');
  • 40. twitter.addWebHook('myupdate', 'http://example.com/eventhandler'); makes twitter an even more powerful platform than it is
  • 41. MAILHOOKS DEMO let’s see this in action. mailhooks was one of the rst “adapters” i built for the evented web.
  • 43. MORE DEMOS (and then code) create postbin, setup/show tender, pivotal tracker, twilio. demo clickhooks with postbin and and then show the code. http://2.latest.scriptletsapp.appspot.com/1w47Cs/run
  • 44. webhooks are simple as you saw. their simplicity affords them to be used as a simple building block in slightly more complex systems like pubsubhubbub. how many have heard of pubsubhubbub? how many know what it does?
  • 45. not time to play the video, i know brett is here and they talked about it. basically real-time feeds using webhooks as the core mechanic.
  • 46. not time to play the video, i know brett is here and they talked about it. basically real-time feeds using webhooks as the core mechanic.
  • 47. all these sites publish content with pubsubhubbub, meaning they all effectively have webhooks for new content events... as a result, you can consume their content in realtime.
  • 48. simple mechanics, if done right, yield rich, emergent dynamics. the emergent system with webhooks is the evented web.
  • 49. The Evented Web (Programmable Web 2.0) Event Triggers (WebHooks) Web APIs Handler Scripts
  • 50. “In computer programming, hooking is a technique used to alter or augment the behavior of [a program], often without having access to its source code.”
  • 53. The Evented Web (Programmable Web 2.0) Event Triggers (WebHooks) Web APIs Handler Scripts
  • 54. twitter.addWebHook('newfollower', 'http://example.com/eventhandler'); the idea is the handler is a URL... whatever. it doesn’t matter whats on the other end.
  • 55. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } else if (twitterUser['following'] > 1000 && twitterUser['followers'] < twitterUser['following'] / 2) { twitter.block(twitterUser); } })
  • 56. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } else if (twitterUser['following'] > 1000 && twitterUser['followers'] < twitterUser['following'] / 2) { twitter.block(twitterUser); } })
  • 57. twitter.addWebHook('newfollower', 'http://example.com/eventhandler'); because its a url, because it’s http ... you already know how to dene it. it’s a simple web app, or web script.
  • 58. love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was easy. no permissions or cgi-bins... just upload a le with ftp.
  • 59. love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was easy. no permissions or cgi-bins... just upload a le with ftp.
  • 60. love it, hate it... its everywhere. commodity hosting. compared to classical cgi and perl, it was easy. no permissions or cgi-bins... just upload a le with ftp.
  • 62. so i built scriptlets, which is basically that. use php, python, javascript to write simple little scripts hosted in the cloud. write it, save it, get a url to run it. perfect for webhook handler scripts.
  • 63. here’s a wrapper that makes postbin work for pubsubhubbub
  • 64. here’s a script used with hookpress to add comment notications via notify.io to wordpress
  • 65. this is the code i used for the clickhooks demo. you can see how simple it is, notify.io does most of the work.
  • 66. notify.io is a useful part of the ecosystem. it solves the notication part. “how do you get events to the desktop?” pubsubhubbub for example also a gateway drug for webhooks...
  • 67. NOTIFY.IO DEMO intro. twitter DM example. outlets. curl. NioCallback. DrEval...
  • 68. What are WebHooks? The Evented Web blends our existing ecosystem of web APIs with event-driven programming, creating a web that is both more programmable and real-time.
  • 69. What are WebHooks? Event callbacks over HTTP enabling the Evented Web The Evented Web blends our existing ecosystem of web APIs with event-driven programming, creating a web that is both more programmable and real-time.
  • 70. And so concludes the technical portion of the talk. Questions so far?
  • 71. 2 Why should we all learn to program? so many passionate programmers that are so smart and influential on society. gates, jobs, zuckerberg... exploration of thoughts on signicance. sidenote: programming == holistic programming, not just “software engineering”
  • 72. “As programming becomes more important, it will leave the back room and become a key skill and attribute of our top intellectual and social classes, just as reading and writing did in the past.” —Marc Prensky programming is the new literacy. (rushkoff’s talk) i wanted to explore this idea further ...
  • 74. Technology == Tools anything useful created by the mind
  • 75. think of a world without technology. humans might not survive denied technology. some might argue our evolution from prehuman to human was about fully leveraging/developing our ability to create and work with technology
  • 77. we drove many major species into extinction and become the dominant species on earth... all with just a little bit of basic technology.
  • 78. The most powerful force in the world. kevin kelly concludes (among other things) that technology is the most powerful force int he world.
  • 79. pow•er capacity to cause change best denition of power. simple. more useful.
  • 80. i like to say that a kid with a laptop can change the world. what is it about the computer?
  • 83. “The most remarkable tool we’ve ever come up with.” —Steve Jobs why?
  • 84. Imagination Compiler Computing is the ultimate sandbox for our mind, allowing us to explore, model and even execute whatever systems we can *imagine*, as long as we can gure out how to express them. This is programming.
  • 85. don’t have time for this video, but it’s the introduction to the MIT course Structure and Interpretation of computer programs. Abelson goes over how computer science isn’t really a science, maybe more engineering or art... he relates it to magic. he also says it’s not about the computer. it’s fundamentally about formalizing intuitions about process. how to do things.
  • 86. don’t have time for this video, but it’s the introduction to the MIT course Structure and Interpretation of computer programs. Abelson goes over how computer science isn’t really a science, maybe more engineering or art... he relates it to magic. he also says it’s not about the computer. it’s fundamentally about formalizing intuitions about process. how to do things.
  • 88. Knowledge well it turns out, process is the basis of knowledge. i could go on quite a while about knowledge, but to keep things on track, we’ll simplify it to this: knowledge is basically a collection of validated models, allowing us to know how to do things. how-to is process.
  • 89. Knowledge == Power this now trite idea, rst expressed by francis bacon... is something i had to revisit when i dened power as the capacity to cause change. because when framed like this it’s obviously more than a nice correlation: knowledge really *is* the capacity to cause change, therefore in some way, they actually are quite synonymous.
  • 90. Knowledge == Power this now trite idea, rst expressed by francis bacon... is something i had to revisit when i dened power as the capacity to cause change. because when framed like this it’s obviously more than a nice correlation: knowledge really *is* the capacity to cause change, therefore in some way, they actually are quite synonymous.
  • 91. Programming is the language of power. If knowledge is power, then programming is the language of power. Programming is the most precise expression of how-to knowledge. You don't just program to express so much as you program to run, to make happen.
  • 92. Programming is about designing systems within the realm of computing, but as we trend towards ubiquitous computing, the boundary of "computing" and the rest of our world will start to disappear.
  • 93. our idea of what a computer is...
  • 94. has been unraveling right in front of us. abelson is right: it’s not about the “computer” ... it’s about something more. not even the “network”. i’m not exactly sure what it is... but
  • 95. Programmers are the most potent technologists. i would like to make this assertion. the industrial revolution was about mechanization. i think software and automation are the new mechanization. only this time it’s much greater -- software gives us more bang for buck in terms of change caused by effort. it was software that allowed celebrity conan obrien to, with one click, change a person’s life.
  • 96. Technologists shape humanity. and i think its undeniable how influential people are to society that can create and truly wield technology. but to bring it back to a little more concrete terms and where things are going:
  • 97. The world is trending towards becoming programmable USA Today on CES: “You’re going to be hard-pressed to nd a new gadget or gizmo in 2010 that doesn’t also connect you to web services.” That’s just a step away from having apis and hooks. Imagine a world where everything has an API and webhooks. Programmers can use it all as building blocks, literally programming the world around them. Magic indeed.
  • 98. Wizards. programmers become not unlike wizards ... and wizards are basically gods.
  • 99. Why should we all learn to program?
  • 100. Why should we all learn to program? “Program or be programmed.” The world is becoming increasingly programmable. The power of programming will eventually outweigh any reason not to.
  • 101. 3 How do WebHooks foster programming? obviously that kind of power, capacity to cause change, will be worthy of seeking out on its own once it becomes more obvious. what do webhooks and the evented web have to contribute? i think they’ll accelerate the process by making it more obvious, but there’s more.
  • 102. this is more generally about education.
  • 103. “Education is not the filling of a pail, but the lighting of a fire.” —William Butler Yeats framed my idea of education. inspiration and motivation are the real secrets to education. teaching is just a means to facilitate learning; learning happens by the individual. you need to inspire/convince the individual they want to learn ... and they will
  • 104. “The truth is that reading, writing, and arithmetic only take about one hundred hours to transmit as long as the audience is eager and willing to learn.” —John Taylor Gatto world renowned school teacher corroborates this idea.
  • 105. ackoff: one of the greatest thinkers of the 20th century that you probably haven’t heard of. greenberg: champion of the democratic school.
  • 106. Infrastructure as Education
  • 107. Village that not only didn't have access to computers, but didn't know English. Left the computer there with CDs (no Internet) and came back 3 months later. An 8 and 12 year old were playing a game on it and when they realized he had brought the machine, they said (in English): "We need a faster processor and a better mouse."
  • 110. “Creating content is not what's important. What is important is infrastructure and access.” —Sugata Mitra Montesorri Natural language Google. taking this idea, and returning to programming...
  • 111. how many of us started programming on something like these?
  • 112. programming was almost unavoidable on them. how many of you experience a noticeable physiological reaction to this screen?
  • 113. Programming is discovered. today, the closest thing is myspace: css hacks to pimp your prole. but while this IS programming, it’s doesn’t convey the POWER of programming even though there’s automator on mac -- its sterile and limiting, pure utility. myspace style programming has relevance, expression, and... view source
  • 114. Programming is discovered. today, the closest thing is myspace: css hacks to pimp your prole. but while this IS programming, it’s doesn’t convey the POWER of programming even though there’s automator on mac -- its sterile and limiting, pure utility. myspace style programming has relevance, expression, and... view source
  • 115. excellent viewsourceposse panel (missed it). my quick idea: view page source is a huge reason why there are so many web people (esp frontend) browser as a sandbox to explore and learn. unfortunately its not the cool stuff. it’s not the stuff that changes the world.
  • 116. twitter.addEventListener('newfollower', function(event) { var twitterUser = event.follower; var friends = facebook.getFriendsNames(); if (twitterUser['name'] in friends) { twitter.follow(twitterUser); } else if (twitterUser['following'] > 1000 && twitterUser['followers'] < twitterUser['following'] / 2) { twitter.block(twitterUser); } }) evented web gives us a sandbox to play with code that actually DOES cool and important things that are relevant to us. making the apps we use do more in a very personal and expressive way. the possibility space is much larger, and the language is richer, so it’s just begging for clever and creative exploration...
  • 117. How do WebHooks foster programming? it gives us a new sandbox to “play” with our web applications together in new and useful ways. it provides the infrastructure to *just code* like on apple II or commodore. No dev environs, nothing to install. building directly on the shoulders of giants to easily achieve cool, useful, relevant “hacks” that I think would hook anybody on at least the idea of programming.
  • 118. How do WebHooks foster programming? WebHooks and the Evented Web make programming discoverable again it gives us a new sandbox to “play” with our web applications together in new and useful ways. it provides the infrastructure to *just code* like on apple II or commodore. No dev environs, nothing to install. building directly on the shoulders of giants to easily achieve cool, useful, relevant “hacks” that I think would hook anybody on at least the idea of programming.
  • 119. and that’s how i think, in the long run, webhooks and the evented web will help make us all gods with the ability to *program* the world around us.