SlideShare a Scribd company logo
1 of 49
The Interaction Design
of APIs


                                              Stanford HCI Group
                          Seminar on People, Computers, and Design
                                                     April 17, 2009




Alex Payne
API Lead, Twitter, Inc.
Select Language ...




What is Twitter?                                                                                    Watch a video!
                                              What?           Why?         How?

                                                                                          Please sign in
                                                                                          user name or email address:


                                                                                          password:



                                                                                                                     Sign In »
                                                                                                Remember me

                                                                                          Forgot password? Click here.

                                                                                                 Already using Twitter from
Twitter is a service for friends, family, and co–workers                                          your phone? Click here.

to communicate and stay connected through the
exchange of quick, frequent answers to one simple
question: What are you doing?

                      Get Started—Join!



         Suddenly, it seems as though   When I first started doing it, I    Incredibly useful
         all the world's a-twitter.     thought, 'geez, not another
                                        website to worry about
                                                                           Wired
                                        updating and checking', but
FrontPage
                                                                              Create a page
                 EDIT
VIEW
                                                                                                    Pages & Files
                                                                              Upload files
                                                                                                    Settings
   FrontPage                                                                                        Help

last edited by     Doug Williams   1 day ago                  Page history   Search Pages and Files


Welcome to the Twitter API wiki. What are you coding?
                                                                             Send a link

                                                                             Put this page in a different folder
Documentation
       Frequently asked questions                                            Add Tags
       REST API Documentation                                                Page Security
       Search API Documentation
       REST API Changelog
       Migrating to followers terminology
                                                                             Navigator

                                                                               Official resources
Official Resources
       REST API issue tracker - file bugs, request features                    FrontPage
       Request whitelisting
                                                                               Libraries
       @twitterapi - follow to get updates about the API
       Twitter API Announcements Google Group                                  Migrating to followers terminology

                                                                               Moderators
OAuth
                                                                               REST API Changelog
       OAuth FAQ
       OAuth Examples                                                          REST API Documentation
                                                                             Pages     No Files

Community Resources
                                                                             SideBar
       Twitter Development Talk Google Group
Alex Payne writes online here.
See also the archive, books & talks.
The five most recent posts.

Mending The Bitter Absence                                          advertisement


of Reasoned Technical
Discussion
There’s a counterpart to my post on technology journalism     Delicious bookmarks on
that I’ve been hesitant to write. Just as most professional      your iPhone. Now
journalism on high technology fails us today, so too does       available in the App
                                                                        Store!
the online discussion amongst technologists as a
                                                               POWERED by FUSION
community.

Social media (blogs, community news sites like Reddit and Hacker News,
Twitter and such) have swept in to fill a vacuum between peer-reviewed
academic journals and water cooler conversation amongst software
engineers. Anyone with a blog can publish development war stories,
benchmarks, or an interview with another developer. It’s a world of
engineer’s notebooks laid wide open, and in theory, we should be more
informed as a profession than we ever have been.

In practice, the conversations that are most widely heard in the tech
community are full of inaccuracies, manufactured drama, ignorance, and
unbridled opinion. In discussing these Internet-spanning debates with non-
technical friends, comparisons to Hollywood tabloids come first to mind.
It’s a time sink for an industry that should be a shining example of how to
What’s an API?
Why do we care
about making good APIs?
Why does this matter
 to an HCI person?
The Twitter API


    2 years old
•




    40 methods
•




    4,500+ registered developers
•




    5,000+ registered applications
•




    multiple books (English, Japanese)
•




    an even larger “invisible” ecosystem
•




    hundreds of millions of requests per day
•
What do people build
with the Twitter API?
How does it feel?
http://twitter.com/statuses/show/1516683992.json
{
  quot;textquot;:quot;Kitty, don't boss me. I will feed you in due time.quot;,
  quot;truncatedquot;:false,
  quot;in_reply_to_status_idquot;:null,
  quot;in_reply_to_user_idquot;:null,
  quot;favoritedquot;:false,
  quot;in_reply_to_screen_namequot;:null,
  quot;idquot;:1516683992,
  quot;sourcequot;:quot;webquot;,
  quot;created_atquot;:quot;Tue Apr 14 13:47:41 +0000 2009quot;,
  quot;userquot;:
  {
     quot;statuses_countquot;:6426,
     quot;descriptionquot;:quot;No ideas but in things.quot;,
     quot;profile_background_tilequot;:false,
     quot;utc_osetquot;:-28800,
     quot;profile_text_colorquot;:quot;41446cquot;,
     quot;followingquot;:true,
     quot;profile_link_colorquot;:quot;ad102dquot;,
     quot;urlquot;:quot;http://blog.evanweaver.comquot;,
     quot;namequot;:quot;Evanquot;,
     quot;notificationsquot;:false,
     quot;profile_sidebar_fill_colorquot;:quot;quot;,
     quot;followers_countquot;:2308,
     quot;protectedquot;:false,
     quot;profile_background_image_urlquot;:quot;http://s3.amazonaws.com/twitter_production/profile_background_images
/6920721/BD2_1024-1.jpgquot;,
     quot;friends_countquot;:117,
     quot;profile_sidebar_border_colorquot;:quot;d5d4ecquot;,
     quot;time_zonequot;:quot;Pacific Time (US  Canada)quot;,
     quot;profile_image_urlquot;:quot;http://s3.amazonaws.com/twitter_production/profile_images/111994468/
BD2_1024_2-1_normal.jpgquot;,
     quot;favourites_countquot;:1032,
     quot;locationquot;:quot;Russian Hill, Californiaquot;,
     quot;idquot;:761613,
     quot;created_atquot;:quot;Fri Feb 09 22:59:00 +0000 2007quot;,
     quot;profile_background_colorquot;:quot;7b9ab7quot;,
     quot;screen_namequot;:quot;evanquot;
  }
}
What makes it easy?



    low barrier to entry: “just poke at it”
•




    human-readable names
•




    logical nesting of resources
•




    predictable output
•




    constrained set of object models
•
What frustrates developers?




                 inconsistency
             •




                 anything vague or unpredictable
             •




                 lack of user interface conventions
             •




                 network and performance issues
             •
A shameful glimpse at bad APIs.
import java.util.{Calendar, Date}

lazy val updatedDate = {
  val rfc3339 = new SimpleDateFormat(quot;yyyy-MM-dd'T'h:m:ss'-05:00'quot;)
  val calendar = Calendar.getInstance
  calendar.set(year.toInt, month.toInt - 1, day.toInt)
  rfc3339.format(calendar.getTime)
}




                                         java.util.Calendar, java.util.Date
//Call SecKeychainAddGenericPassword to add a new password to the keychain:
OSStatus StorePasswordKeychain (void* password,UInt32 passwordLength)
{
 OSStatus status;
 status = SecKeychainAddGenericPassword (
           NULL,         // default keychain
           10,          // length of service name
           quot;SurfWriterquot;, // service name
           10,          // length of account name
           quot;MyUserAcctquot;, // account name
           passwordLength, // length of password
           password,       // pointer to password data
           NULL          // the item reference
   );
   return (status);
 }

//Call SecKeychainFindGenericPassword to get a password from the keychain:
OSStatus GetPasswordKeychain (void *passwordData,UInt32 *passwordLength,
                              SecKeychainItemRef *itemRef)
{
 OSStatus status1 ;


status1 = SecKeychainFindGenericPassword (
           NULL,        // default keychain
           10,         // length of service name
           quot;SurfWriterquot;, // service name
           10,         // length of account name
           quot;MyUserAcctquot;, // account name
           passwordLength, // length of password
           passwordData, // pointer to password data
           itemRef       // the item reference
  );
   return (status1);
}

//Call SecKeychainItemModifyAttributesAndData to change the password for
// an item already in the keychain:
OSStatus ChangePasswordKeychain (SecKeychainItemRef itemRef)
{
   OSStatus status;
   void * password = quot;myNewP4sSw0rDquot;;
   UInt32 passwordLength = strlen(password);

status = SecKeychainItemModifyAttributesAndData (
          itemRef,      // the item reference

                                                                              Keychain Services, Mac OS X
          NULL,        // no change to attributes
          passwordLength, // length of password
          password       // pointer to password data
BOOL CALLBACK AboutDlgProc(HWND hwnd, UINT Message,
                                                      case WM_COMMAND:
WPARAM wParam, LPARAM lParam)
                                                        switch(LOWORD(wParam))
{
                                                        {
  switch(Message)
                                                           case ID_HELP_ABOUT:
  {
    case WM_INITDIALOG:                                    {
                                                              int ret = DialogBox(GetModuleHandle(NULL),
      return TRUE;                                                MAKEINTRESOURCE(IDD_ABOUT), hwnd, AboutDlgProc);
      case WM_COMMAND:                                        if(ret == IDOK){
         switch(LOWORD(wParam))                                   MessageBox(hwnd, quot;Dialog exited with IDOK.quot;, quot;Noticequot;,
         {                                                           MB_OK | MB_ICONINFORMATION);
            case IDOK:
                                                              }
               EndDialog(hwnd, IDOK);
                                                              else if(ret == IDCANCEL){
            break;
                                                                  MessageBox(hwnd, quot;Dialog exited with IDCANCEL.quot;, quot;Noticequot;,
            case IDCANCEL:
                                                                     MB_OK | MB_ICONINFORMATION);
               EndDialog(hwnd, IDCANCEL);
                                                              }
            break;
                                                              else if(ret == -1){
         }
                                                                  MessageBox(hwnd, quot;Dialog failed!quot;, quot;Errorquot;,
      break;
                                                                     MB_OK | MB_ICONINFORMATION);
      default:
                                                              }
         return FALSE;
                                                           }
    }
    return TRUE;                                           break;
}                                                          // Other menu commands...
                                                        }
                                                      break;




                                                                                                                       Win32
http://api.yelp.com/neighborhood_search?location=1512%20Shattuck%20Avenue%2A%20Berkeley%2A%20CAywsid=XXXXXXXXXXXXXXXXXX




 {'message': {'code': 0, 'text': 'OK', 'version': '1.1.0'},
 
   'neighborhoods':
 
   
   [{'city': 'Berkeley',
 
   
   'name': 'Gourmet Ghetto',
 
   
   'borough': '',
 
   
   'state': 'CA',
 
   
   'state_code': 'CA',
 
   
   'country': 'USA',
 
   
   'country_code': 'US',
 
   
   'url': 'http://yelp.com/search?/find_loc=Gourmet+Ghetto%2C+Berkeley%2C+CA' },
 
   
   {'city': 'Berkeley',
 
   
   'name': 'North Berkeley',
 
   
   'borough': '',
 
   
   'state': 'CA',
 
   
   'state_code': 'CA',
 
   
   'country': 'USA',
 
   
   'country_code': 'US',
 
   
   'url': ' http://yelp.com/search?/find_loc=North+Berkeley%2C+Berkeley%2C+CA'}]
 }




                                                                                                                           Yelp
A brief tour of excellent APIs.
class CreateSavedSearches  ActiveRecord::Migration
 def self.up
   create_table :saved_searches do |t|
    t.column :user_id, :integer
    t.column :name, :string
    t.column :query, :string
    t.column :position, :integer
    t.timestamps
   end

  add_index :saved_searches, :user_id
 end

 def self.down
  drop_table :saved_searches
 end
end



                                                      Rails Migrations
$('form#login')
 .find('label.optional').hide().end()
 .find('input:password').css('border', '1px solid red').end()
 .submit(function() {
     return confirm('Are you sure you want to submit?');
 });




                                                               jQuery
import scala.actors.Actor._

val echoActor = actor {
  loop {
    receive {
      case msg = println(quot;received: quot; + msg)
    }
  }
}

echoActor ! quot;helloquot;
echoActor ! quot;world!quot;




                                                Scala Actors
What are the qualities
   of good APIs?
Explorability.
REST vs WS-*
A case study in explorable APIs.
Smalltalk Environment
SLIME
(the Superior Lisp Interaction Mode for Emacs)
Predictability.
ODBC, JDBC, etc.
A case study in predictable APIs.
Consistency.
The options Hash in Rails
 A case study in consistent APIs.
file_field(:post, :attached, :accept = 'text/html')
file_field(:attachment, :file, :class = 'file_input')

text_area(:post, :body, :cols = 20, :rows = 40)
text_area(:comment, :text, :size = quot;20x30quot;)
text_area(:entry, :body, :size = quot;20x20quot;, :disabled = 'disabled')

submit_to_remote 'create_btn', 'Create', :url = { :action = 'create' }




                                                                           Rails Helpers
The Humane API:
explorable
predictable
consistent
Thank you for listening.
    Questions?

More Related Content

Viewers also liked

Mediakasvatuksen koulutus_varhaiskasvatus_2013
Mediakasvatuksen koulutus_varhaiskasvatus_2013Mediakasvatuksen koulutus_varhaiskasvatus_2013
Mediakasvatuksen koulutus_varhaiskasvatus_2013Erja Anttonen
 
Battle-The Story of the Bulge Book Brief
Battle-The Story of the Bulge Book BriefBattle-The Story of the Bulge Book Brief
Battle-The Story of the Bulge Book BriefE. Shane Phillips, DSL
 
Keek in google play
Keek in google playKeek in google play
Keek in google playross967
 
NGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIA
NGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIANGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIA
NGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIARELand.,Ltd
 
Activ metodica sect 2 16 mart 12 ileana
Activ metodica sect 2 16 mart 12  ileanaActiv metodica sect 2 16 mart 12  ileana
Activ metodica sect 2 16 mart 12 ileanaeconsiliere
 
Corsi DML Area Social Media
Corsi DML Area Social MediaCorsi DML Area Social Media
Corsi DML Area Social MediaDML Srl
 
Apresentação Qualificare WCT
Apresentação Qualificare WCTApresentação Qualificare WCT
Apresentação Qualificare WCTRITA KALUF
 
Supsi social-media-mktg-16dic
Supsi social-media-mktg-16dicSupsi social-media-mktg-16dic
Supsi social-media-mktg-16dicDML Srl
 
Sunny viila final ok
Sunny viila final okSunny viila final ok
Sunny viila final okRELand.,Ltd
 
Trabajos rebe poemas y acrosticos
Trabajos rebe poemas y acrosticosTrabajos rebe poemas y acrosticos
Trabajos rebe poemas y acrosticosproduciendotextos
 
Bentuk-Bentuk Pengajaran Individual
Bentuk-Bentuk Pengajaran IndividualBentuk-Bentuk Pengajaran Individual
Bentuk-Bentuk Pengajaran IndividualNastiti Rahajeng
 

Viewers also liked (14)

Ukuran panjang
Ukuran panjangUkuran panjang
Ukuran panjang
 
Mediakasvatuksen koulutus_varhaiskasvatus_2013
Mediakasvatuksen koulutus_varhaiskasvatus_2013Mediakasvatuksen koulutus_varhaiskasvatus_2013
Mediakasvatuksen koulutus_varhaiskasvatus_2013
 
Battle-The Story of the Bulge Book Brief
Battle-The Story of the Bulge Book BriefBattle-The Story of the Bulge Book Brief
Battle-The Story of the Bulge Book Brief
 
Keek in google play
Keek in google playKeek in google play
Keek in google play
 
NGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIA
NGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIANGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIA
NGỌC LAN APARTMENT - ĐẲNG CẤP ĐẠI GIA
 
Activ metodica sect 2 16 mart 12 ileana
Activ metodica sect 2 16 mart 12  ileanaActiv metodica sect 2 16 mart 12  ileana
Activ metodica sect 2 16 mart 12 ileana
 
Corsi DML Area Social Media
Corsi DML Area Social MediaCorsi DML Area Social Media
Corsi DML Area Social Media
 
Apresentação Qualificare WCT
Apresentação Qualificare WCTApresentação Qualificare WCT
Apresentação Qualificare WCT
 
Supsi social-media-mktg-16dic
Supsi social-media-mktg-16dicSupsi social-media-mktg-16dic
Supsi social-media-mktg-16dic
 
Sunny viila final ok
Sunny viila final okSunny viila final ok
Sunny viila final ok
 
Herramientas de web 2
Herramientas de web 2Herramientas de web 2
Herramientas de web 2
 
Trabajos rebe poemas y acrosticos
Trabajos rebe poemas y acrosticosTrabajos rebe poemas y acrosticos
Trabajos rebe poemas y acrosticos
 
Ukuran panjang
Ukuran panjangUkuran panjang
Ukuran panjang
 
Bentuk-Bentuk Pengajaran Individual
Bentuk-Bentuk Pengajaran IndividualBentuk-Bentuk Pengajaran Individual
Bentuk-Bentuk Pengajaran Individual
 

Similar to The Interaction Design Of APIs

The web take two
The web take twoThe web take two
The web take twoRomeo Pruno
 
Marketing & Sales - Founder institute Brussels
Marketing & Sales - Founder institute BrusselsMarketing & Sales - Founder institute Brussels
Marketing & Sales - Founder institute BrusselsDavid Hachez
 
Education Using Technology
Education Using TechnologyEducation Using Technology
Education Using Technologycharliepankeko
 
Spring '13 Release Developer Preview Webinar
Spring '13 Release Developer Preview WebinarSpring '13 Release Developer Preview Webinar
Spring '13 Release Developer Preview WebinarSalesforce Developers
 
Simple Ways to Get Your Organization to Adopt the AsyncAPI Spec
Simple Ways to Get Your Organization to Adopt the AsyncAPI SpecSimple Ways to Get Your Organization to Adopt the AsyncAPI Spec
Simple Ways to Get Your Organization to Adopt the AsyncAPI SpecAxway
 
Ed Tech Talk S L N Presentation V5
Ed Tech Talk  S L N  Presentation V5Ed Tech Talk  S L N  Presentation V5
Ed Tech Talk S L N Presentation V5iuistjen
 
Ed Tech Talk Sln Presentation V5
Ed Tech Talk Sln Presentation V5Ed Tech Talk Sln Presentation V5
Ed Tech Talk Sln Presentation V5iuistjen
 
Confluence State Of The Union 2009
Confluence State Of The Union 2009Confluence State Of The Union 2009
Confluence State Of The Union 2009Atlassian
 
AI and Python: Developing a Conversational Interface using Python
AI and Python: Developing a Conversational Interface using PythonAI and Python: Developing a Conversational Interface using Python
AI and Python: Developing a Conversational Interface using Pythonamyiris
 
The Community Manager
The Community ManagerThe Community Manager
The Community ManagerDavid Hachez
 
Documenting APIs: Sample Code and More (with many pictures of cats)
Documenting APIs: Sample Code and More (with many pictures of cats)Documenting APIs: Sample Code and More (with many pictures of cats)
Documenting APIs: Sample Code and More (with many pictures of cats)Anya Stettler
 
BarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian MulvanyBarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian MulvanyIan Mulvany
 
APIs 101: What are they? What do they have to do with genealogy?
APIs 101: What are they? What do they have to do with genealogy?APIs 101: What are they? What do they have to do with genealogy?
APIs 101: What are they? What do they have to do with genealogy?Colleen Greene
 
Introduction to Web Analytics
Introduction to Web AnalyticsIntroduction to Web Analytics
Introduction to Web AnalyticsDavid Hachez
 
Sharepoint developement tools(webparts+worflows) EBizSoft
Sharepoint developement tools(webparts+worflows) EBizSoftSharepoint developement tools(webparts+worflows) EBizSoft
Sharepoint developement tools(webparts+worflows) EBizSoftShakir Majeed Khan
 
The ROI of Social Media
The ROI of Social MediaThe ROI of Social Media
The ROI of Social MediaDavid Hachez
 

Similar to The Interaction Design Of APIs (20)

The web take two
The web take twoThe web take two
The web take two
 
Marketing & Sales - Founder institute Brussels
Marketing & Sales - Founder institute BrusselsMarketing & Sales - Founder institute Brussels
Marketing & Sales - Founder institute Brussels
 
Education Using Technology
Education Using TechnologyEducation Using Technology
Education Using Technology
 
Spring '13 Release Developer Preview Webinar
Spring '13 Release Developer Preview WebinarSpring '13 Release Developer Preview Webinar
Spring '13 Release Developer Preview Webinar
 
Simple Ways to Get Your Organization to Adopt the AsyncAPI Spec
Simple Ways to Get Your Organization to Adopt the AsyncAPI SpecSimple Ways to Get Your Organization to Adopt the AsyncAPI Spec
Simple Ways to Get Your Organization to Adopt the AsyncAPI Spec
 
Ed Tech Talk S L N Presentation V5
Ed Tech Talk  S L N  Presentation V5Ed Tech Talk  S L N  Presentation V5
Ed Tech Talk S L N Presentation V5
 
Ed Tech Talk Sln Presentation V5
Ed Tech Talk Sln Presentation V5Ed Tech Talk Sln Presentation V5
Ed Tech Talk Sln Presentation V5
 
Confluence State Of The Union 2009
Confluence State Of The Union 2009Confluence State Of The Union 2009
Confluence State Of The Union 2009
 
AI and Python: Developing a Conversational Interface using Python
AI and Python: Developing a Conversational Interface using PythonAI and Python: Developing a Conversational Interface using Python
AI and Python: Developing a Conversational Interface using Python
 
The Community Manager
The Community ManagerThe Community Manager
The Community Manager
 
Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010
Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010
Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010
 
Documenting APIs: Sample Code and More (with many pictures of cats)
Documenting APIs: Sample Code and More (with many pictures of cats)Documenting APIs: Sample Code and More (with many pictures of cats)
Documenting APIs: Sample Code and More (with many pictures of cats)
 
BarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian MulvanyBarCamb Connotea by Ian Mulvany
BarCamb Connotea by Ian Mulvany
 
Fabulous Freebies
Fabulous FreebiesFabulous Freebies
Fabulous Freebies
 
Frydenberg Web20 Scu09
Frydenberg Web20 Scu09Frydenberg Web20 Scu09
Frydenberg Web20 Scu09
 
APIs 101: What are they? What do they have to do with genealogy?
APIs 101: What are they? What do they have to do with genealogy?APIs 101: What are they? What do they have to do with genealogy?
APIs 101: What are they? What do they have to do with genealogy?
 
Introduction to Web Analytics
Introduction to Web AnalyticsIntroduction to Web Analytics
Introduction to Web Analytics
 
Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010
Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010
Playing Tag: Managed Metadata and Taxonomies in SharePoint 2010
 
Sharepoint developement tools(webparts+worflows) EBizSoft
Sharepoint developement tools(webparts+worflows) EBizSoftSharepoint developement tools(webparts+worflows) EBizSoft
Sharepoint developement tools(webparts+worflows) EBizSoft
 
The ROI of Social Media
The ROI of Social MediaThe ROI of Social Media
The ROI of Social Media
 

More from Alex Payne

Splitting up your web app
Splitting up your web appSplitting up your web app
Splitting up your web appAlex Payne
 
The perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that mattersThe perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that mattersAlex Payne
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonAlex Payne
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at TwitterAlex Payne
 
Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in ScalaAlex Payne
 
Speedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional LanguagesSpeedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional LanguagesAlex Payne
 
Mind The Tools
Mind The ToolsMind The Tools
Mind The ToolsAlex Payne
 
Strange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in ComputingStrange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in ComputingAlex Payne
 
The Business Value of Twitter
The Business Value of TwitterThe Business Value of Twitter
The Business Value of TwitterAlex Payne
 
Twitter API 2.0
Twitter API 2.0Twitter API 2.0
Twitter API 2.0Alex Payne
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?Alex Payne
 
The Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to AdobeThe Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to AdobeAlex Payne
 
Protecting Public Hotspots
Protecting Public HotspotsProtecting Public Hotspots
Protecting Public HotspotsAlex Payne
 
Twitter at BarCamp 2008
Twitter at BarCamp 2008Twitter at BarCamp 2008
Twitter at BarCamp 2008Alex Payne
 
Securing Rails
Securing RailsSecuring Rails
Securing RailsAlex Payne
 
Designing Your API
Designing Your APIDesigning Your API
Designing Your APIAlex Payne
 
Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007Alex Payne
 

More from Alex Payne (18)

Splitting up your web app
Splitting up your web appSplitting up your web app
Splitting up your web app
 
The perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that mattersThe perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that matters
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the Horizon
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in Scala
 
Speedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional LanguagesSpeedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional Languages
 
Mind The Tools
Mind The ToolsMind The Tools
Mind The Tools
 
Strange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in ComputingStrange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in Computing
 
The Business Value of Twitter
The Business Value of TwitterThe Business Value of Twitter
The Business Value of Twitter
 
Twitter API 2.0
Twitter API 2.0Twitter API 2.0
Twitter API 2.0
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
 
The Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to AdobeThe Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to Adobe
 
Protecting Public Hotspots
Protecting Public HotspotsProtecting Public Hotspots
Protecting Public Hotspots
 
Twitter at BarCamp 2008
Twitter at BarCamp 2008Twitter at BarCamp 2008
Twitter at BarCamp 2008
 
Securing Rails
Securing RailsSecuring Rails
Securing Rails
 
Why Scala?
Why Scala?Why Scala?
Why Scala?
 
Designing Your API
Designing Your APIDesigning Your API
Designing Your API
 
Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

The Interaction Design Of APIs

  • 1. The Interaction Design of APIs Stanford HCI Group Seminar on People, Computers, and Design April 17, 2009 Alex Payne API Lead, Twitter, Inc.
  • 2. Select Language ... What is Twitter? Watch a video! What? Why? How? Please sign in user name or email address: password: Sign In » Remember me Forgot password? Click here. Already using Twitter from Twitter is a service for friends, family, and co–workers your phone? Click here. to communicate and stay connected through the exchange of quick, frequent answers to one simple question: What are you doing? Get Started—Join! Suddenly, it seems as though When I first started doing it, I Incredibly useful all the world's a-twitter. thought, 'geez, not another website to worry about Wired updating and checking', but
  • 3. FrontPage Create a page EDIT VIEW Pages & Files Upload files Settings FrontPage Help last edited by Doug Williams 1 day ago Page history Search Pages and Files Welcome to the Twitter API wiki. What are you coding? Send a link Put this page in a different folder Documentation Frequently asked questions Add Tags REST API Documentation Page Security Search API Documentation REST API Changelog Migrating to followers terminology Navigator Official resources Official Resources REST API issue tracker - file bugs, request features FrontPage Request whitelisting Libraries @twitterapi - follow to get updates about the API Twitter API Announcements Google Group Migrating to followers terminology Moderators OAuth REST API Changelog OAuth FAQ OAuth Examples REST API Documentation Pages No Files Community Resources SideBar Twitter Development Talk Google Group
  • 4. Alex Payne writes online here. See also the archive, books & talks. The five most recent posts. Mending The Bitter Absence advertisement of Reasoned Technical Discussion There’s a counterpart to my post on technology journalism Delicious bookmarks on that I’ve been hesitant to write. Just as most professional your iPhone. Now journalism on high technology fails us today, so too does available in the App Store! the online discussion amongst technologists as a POWERED by FUSION community. Social media (blogs, community news sites like Reddit and Hacker News, Twitter and such) have swept in to fill a vacuum between peer-reviewed academic journals and water cooler conversation amongst software engineers. Anyone with a blog can publish development war stories, benchmarks, or an interview with another developer. It’s a world of engineer’s notebooks laid wide open, and in theory, we should be more informed as a profession than we ever have been. In practice, the conversations that are most widely heard in the tech community are full of inaccuracies, manufactured drama, ignorance, and unbridled opinion. In discussing these Internet-spanning debates with non- technical friends, comparisons to Hollywood tabloids come first to mind. It’s a time sink for an industry that should be a shining example of how to
  • 6. Why do we care about making good APIs?
  • 7. Why does this matter to an HCI person?
  • 8. The Twitter API 2 years old • 40 methods • 4,500+ registered developers • 5,000+ registered applications • multiple books (English, Japanese) • an even larger “invisible” ecosystem • hundreds of millions of requests per day •
  • 9. What do people build with the Twitter API?
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. How does it feel?
  • 18.
  • 19. http://twitter.com/statuses/show/1516683992.json { quot;textquot;:quot;Kitty, don't boss me. I will feed you in due time.quot;, quot;truncatedquot;:false, quot;in_reply_to_status_idquot;:null, quot;in_reply_to_user_idquot;:null, quot;favoritedquot;:false, quot;in_reply_to_screen_namequot;:null, quot;idquot;:1516683992, quot;sourcequot;:quot;webquot;, quot;created_atquot;:quot;Tue Apr 14 13:47:41 +0000 2009quot;, quot;userquot;: { quot;statuses_countquot;:6426, quot;descriptionquot;:quot;No ideas but in things.quot;, quot;profile_background_tilequot;:false, quot;utc_osetquot;:-28800, quot;profile_text_colorquot;:quot;41446cquot;, quot;followingquot;:true, quot;profile_link_colorquot;:quot;ad102dquot;, quot;urlquot;:quot;http://blog.evanweaver.comquot;, quot;namequot;:quot;Evanquot;, quot;notificationsquot;:false, quot;profile_sidebar_fill_colorquot;:quot;quot;, quot;followers_countquot;:2308, quot;protectedquot;:false, quot;profile_background_image_urlquot;:quot;http://s3.amazonaws.com/twitter_production/profile_background_images /6920721/BD2_1024-1.jpgquot;, quot;friends_countquot;:117, quot;profile_sidebar_border_colorquot;:quot;d5d4ecquot;, quot;time_zonequot;:quot;Pacific Time (US Canada)quot;, quot;profile_image_urlquot;:quot;http://s3.amazonaws.com/twitter_production/profile_images/111994468/ BD2_1024_2-1_normal.jpgquot;, quot;favourites_countquot;:1032, quot;locationquot;:quot;Russian Hill, Californiaquot;, quot;idquot;:761613, quot;created_atquot;:quot;Fri Feb 09 22:59:00 +0000 2007quot;, quot;profile_background_colorquot;:quot;7b9ab7quot;, quot;screen_namequot;:quot;evanquot; } }
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. What makes it easy? low barrier to entry: “just poke at it” • human-readable names • logical nesting of resources • predictable output • constrained set of object models •
  • 27. What frustrates developers? inconsistency • anything vague or unpredictable • lack of user interface conventions • network and performance issues •
  • 28. A shameful glimpse at bad APIs.
  • 29. import java.util.{Calendar, Date} lazy val updatedDate = { val rfc3339 = new SimpleDateFormat(quot;yyyy-MM-dd'T'h:m:ss'-05:00'quot;) val calendar = Calendar.getInstance calendar.set(year.toInt, month.toInt - 1, day.toInt) rfc3339.format(calendar.getTime) } java.util.Calendar, java.util.Date
  • 30. //Call SecKeychainAddGenericPassword to add a new password to the keychain: OSStatus StorePasswordKeychain (void* password,UInt32 passwordLength) { OSStatus status; status = SecKeychainAddGenericPassword ( NULL, // default keychain 10, // length of service name quot;SurfWriterquot;, // service name 10, // length of account name quot;MyUserAcctquot;, // account name passwordLength, // length of password password, // pointer to password data NULL // the item reference ); return (status); } //Call SecKeychainFindGenericPassword to get a password from the keychain: OSStatus GetPasswordKeychain (void *passwordData,UInt32 *passwordLength, SecKeychainItemRef *itemRef) { OSStatus status1 ; status1 = SecKeychainFindGenericPassword ( NULL, // default keychain 10, // length of service name quot;SurfWriterquot;, // service name 10, // length of account name quot;MyUserAcctquot;, // account name passwordLength, // length of password passwordData, // pointer to password data itemRef // the item reference ); return (status1); } //Call SecKeychainItemModifyAttributesAndData to change the password for // an item already in the keychain: OSStatus ChangePasswordKeychain (SecKeychainItemRef itemRef) { OSStatus status; void * password = quot;myNewP4sSw0rDquot;; UInt32 passwordLength = strlen(password); status = SecKeychainItemModifyAttributesAndData ( itemRef, // the item reference Keychain Services, Mac OS X NULL, // no change to attributes passwordLength, // length of password password // pointer to password data
  • 31. BOOL CALLBACK AboutDlgProc(HWND hwnd, UINT Message, case WM_COMMAND: WPARAM wParam, LPARAM lParam) switch(LOWORD(wParam)) { { switch(Message) case ID_HELP_ABOUT: { case WM_INITDIALOG: { int ret = DialogBox(GetModuleHandle(NULL), return TRUE; MAKEINTRESOURCE(IDD_ABOUT), hwnd, AboutDlgProc); case WM_COMMAND: if(ret == IDOK){ switch(LOWORD(wParam)) MessageBox(hwnd, quot;Dialog exited with IDOK.quot;, quot;Noticequot;, { MB_OK | MB_ICONINFORMATION); case IDOK: } EndDialog(hwnd, IDOK); else if(ret == IDCANCEL){ break; MessageBox(hwnd, quot;Dialog exited with IDCANCEL.quot;, quot;Noticequot;, case IDCANCEL: MB_OK | MB_ICONINFORMATION); EndDialog(hwnd, IDCANCEL); } break; else if(ret == -1){ } MessageBox(hwnd, quot;Dialog failed!quot;, quot;Errorquot;, break; MB_OK | MB_ICONINFORMATION); default: } return FALSE; } } return TRUE; break; } // Other menu commands... } break; Win32
  • 32. http://api.yelp.com/neighborhood_search?location=1512%20Shattuck%20Avenue%2A%20Berkeley%2A%20CAywsid=XXXXXXXXXXXXXXXXXX {'message': {'code': 0, 'text': 'OK', 'version': '1.1.0'}, 'neighborhoods': [{'city': 'Berkeley', 'name': 'Gourmet Ghetto', 'borough': '', 'state': 'CA', 'state_code': 'CA', 'country': 'USA', 'country_code': 'US', 'url': 'http://yelp.com/search?/find_loc=Gourmet+Ghetto%2C+Berkeley%2C+CA' }, {'city': 'Berkeley', 'name': 'North Berkeley', 'borough': '', 'state': 'CA', 'state_code': 'CA', 'country': 'USA', 'country_code': 'US', 'url': ' http://yelp.com/search?/find_loc=North+Berkeley%2C+Berkeley%2C+CA'}] } Yelp
  • 33. A brief tour of excellent APIs.
  • 34. class CreateSavedSearches ActiveRecord::Migration def self.up create_table :saved_searches do |t| t.column :user_id, :integer t.column :name, :string t.column :query, :string t.column :position, :integer t.timestamps end add_index :saved_searches, :user_id end def self.down drop_table :saved_searches end end Rails Migrations
  • 35. $('form#login') .find('label.optional').hide().end() .find('input:password').css('border', '1px solid red').end() .submit(function() { return confirm('Are you sure you want to submit?'); }); jQuery
  • 36. import scala.actors.Actor._ val echoActor = actor { loop { receive { case msg = println(quot;received: quot; + msg) } } } echoActor ! quot;helloquot; echoActor ! quot;world!quot; Scala Actors
  • 37. What are the qualities of good APIs?
  • 39. REST vs WS-* A case study in explorable APIs.
  • 41. SLIME (the Superior Lisp Interaction Mode for Emacs)
  • 43. ODBC, JDBC, etc. A case study in predictable APIs.
  • 44.
  • 46. The options Hash in Rails A case study in consistent APIs.
  • 47. file_field(:post, :attached, :accept = 'text/html') file_field(:attachment, :file, :class = 'file_input') text_area(:post, :body, :cols = 20, :rows = 40) text_area(:comment, :text, :size = quot;20x30quot;) text_area(:entry, :body, :size = quot;20x20quot;, :disabled = 'disabled') submit_to_remote 'create_btn', 'Create', :url = { :action = 'create' } Rails Helpers
  • 49. Thank you for listening. Questions?

Editor's Notes