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.

23fc4556be14017796d38579dd4778ab?s=128

Mike MacCana

April 19, 2012
Tweet

Transcript

  1. WHY SHOULD I CARE ABOUT BROWSER EXTENSIONS? Thursday, 19 April

    12
  2. MAKE EXTENSIONS AND OVERCOME WEB APP LIMITATIONS Thursday, 19 April

    12
  3. CAN’T TALK TO USERS WHEN OUR SITE ISN’T OPEN Thursday,

    19 April 12
  4. NOTIFY USERS ANYTIME Thursday, 19 April 12

  5. 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
  6. USERS MUST STOP WHAT THEY’RE DOING & VISIT YOUR SITE

    Thursday, 19 April 12
  7. • You can make a full app run in a

    ‘popup’. • Users don’t have to leave their site POPUP APPS Thursday, 19 April 12
  8. 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
  9. SITES THAT DON’T HAVE APIS Thursday, 19 April 12

  10. NOT NAMING NAMES That would be unfair. Thursday, 19 April

    12
  11. Thursday, 19 April 12

  12. Other People’s Content Page JS Origin DOM Content Script JS

    HTTP Requests HTTP Requests Any site in extension permissions Thursday, 19 April 12
  13. STEALING SHIT Thursday, 19 April 12

  14. OTHER PEOPLE’S HTML Thursday, 19 April 12

  15. 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
  16. WHAT’S AWFUL Thursday, 19 April 12

  17. ALL DIFFERENT Thursday, 19 April 12

  18. ONE IS VERY DIFFERENT. JS JS JS JS Yes, that

    one. You win a cookie. Thursday, 19 April 12
  19. THANKS @MIKEMACCANA MIKEMACCANA ON HN Thursday, 19 April 12

  20. 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