Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Overcoming Web App Limitation with Chrome Extensions

Overcoming Web App Limitation with Chrome Extensions

A talk given to the London Hacker News July 2011 meetup covering ways in which web apps can overcome traditional limitations on their interactions with users, by utilising Chrome Extensions.

Mike MacCana

April 19, 2012
Tweet

More Decks by Mike MacCana

Other Decks in Technology

Transcript

  1. NOTIFY USERS ANYTIME • Change icon in browser toolbar: •

    Update ‘badge text’ (eg, unread count) and color • Desktop notifications • Don’t use these, they’re fucking annoying Thursday, 19 April 12
  2. • You can make a full app run in a

    ‘popup’. • Users don’t have to leave their site POPUP APPS Thursday, 19 April 12
  3. TYPICAL POPUP APP Asks BG page to auth Asks BG

    page to fetch data Requests to update UI API Provider with REST/SOAP API PopUp UI API Requests JSON Responses or XML if they hate you Background App ‘Background Page’ Runs persistently Authenticates when asked Starts polling once authenticated Backs off when API breaks Thursday, 19 April 12
  4. Other People’s Content Page JS Origin DOM Content Script JS

    HTTP Requests HTTP Requests Any site in extension permissions Thursday, 19 April 12
  5. A WHOLE BUNCH OF OTHER SHIT THAT YOU CAN’T NORMALLY

    ACCESS • Custom ‘options’ pages • Changing ‘new tab’ page • Address bar ‘page actions’ • Bookmarks, Cookies, History Thursday, 19 April 12
  6. ONE IS VERY DIFFERENT. JS JS JS JS Yes, that

    one. You win a cookie. Thursday, 19 April 12
  7. DOING SOAP IN THE BROWSER • All JS ‘autogenerate library

    from magic WSDL ponies’ libraries tested were broken • You need to munge the XML manually • JQuery does not do XPath anymore • Namespaces are awesome super fun Thursday, 19 April 12