Tales of a Developer Advocate

Developer Relations @ Google

  • I've seen the future of the web. It's in the background

    • 24 Feb 2011
    • 3 Responses
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost

    * I will caveat this whole post with the a hefty disclaimer that this only works on the Dev Channel of Chrome and could change significantly over time.

    Chrome introduced the notion of background pages to packaged apps and extensions. Background pages allow the app or extension to run without a UI surface – this is pretty cool because it allows for some really great use-cases that you don’t get with plain web applications; for example you can poll Twitter for updates that mention you and receive an alert via a Desktop Notification about the update.

    Web-apps hosted on the open web have not had this ability, until now.

    Chrome has recently brought this idea to the web with some added powers. Mainly:

    • Your web app can still run even when your app is closed,
    • Your web app can still run when the browser is closed,
    • Your web app can run after system start-up.

    This is very powerful.

    Actually let me re-phrase that. This is amazingly, unbelievably, stonkingly powerful. [definition: stonking]

    So, how do you use them?

    The good thing is it is really simple – a matter of two steps.

    Step 1, this is currently only available to apps – not web sites. Apps in Chrome are defined using a manifest file. You as the developer must include a permission “background” to enable this feature. More on the permissions model can be found on code.google.com.

    {
      "name" : "test",
      "version" : "0.0.0.1",
      "permissions" : ["background"],
      "app" : {
        "launch" : {
          "urls" : ["http://appmator.appspot.com/"],
          "web_url" : "http://appmator.appspot.com/"
        }
      }
    }

    Step 2, a little bit of Javascript magic…. actually, it is not magic, it is a simple call to window.open().

    win = window.open("background.html#", "background", "background");

    The detail is in the 3rd parameter which is reserved for specs. When Chrome is running with the “background” permission it will launch this page with no visible surface and track it in perpetuity.

    By using window.open, it means that users and developers can toggle the state of the background running task by simply calling window.close, which will cause it to stop running. This also means that requesting window.open without a url, but with the background name will return a reference to the running window that can then be closed.

    You can only open a url that is specified in the domain of the “urls” extents in the manifest – so for example you couldn’t open a background page to google.com if you didn’t verify you own that domain.

    Now your app can run in the background. It will start up when the user logs into their machine, it will still be running when the user closes the visible browser (if you completely kill

    POP QUIZ: How can my background page talk to my app pages?

    …

    …

    …

    ANSWER: SharedWorkers my hairy friend. Don’t use references to windows, that is so 2005.

    In other exciting news, Appmator has been modified to support the “background” permission.

    • Tweet
  • Dutch GTUG

    • 23 Feb 2011
    • 0 Responses
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost
    We recently announced that the Netherlands will be one of the countries that will have the Chrome Web Store available with integrated support for Dutch sellers.

    On the 2nd of March 2011 starting at 7pm the Dutch GTUG will be holding an event at Google Amsterdam about HTML5 and the Chrome Web Store.  I will show you some new cool stuff in HTML5 and related technologies and talk to you about how you can use the Chrome Web Store to reach new users.

    The event will start promptly at 7pm, so arrive a little earlier after 6:30pm.  I can’t wait to see you there, we have an Event Information page and a sign-up form.  If you want to come Sign Up Now as places are limited. I will be talking for an hour or so about HTML5 and the Chrome Web Store, showing you some really cool stuff and answering any questions that you have, followed by lighting talks - so if you have anything you want to demo, now is the chance.

    • Tweet
  • My first year in Google

    • 1 Feb 2011
    • 1 Response
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost

    That went by a lot faster than I thought it would.  Today (February 1st) completes my full first year in Google.

    It has been a crazy ride. Google is like no place that I have worked before, and I can honestly say it has been an amazing first year, I have met so many amazing people that I can't count.  It is pretty amazing that I work for a company that is talked about everyday by billions of people on the planet.

    How I came to be at Google

    I had built a Twitter based web-app that was pretty damn popular, I sold it and quit my job full-time job (I still had to work a 3 month notice period).  I had some ideas for a start-up that I wanted to pursue (it was a good idea - honest).  A couple of days after I quit I got a call from one of the PM's on the Google App Engine who I had been talking too quite frequently over the previous months about a job opening.  It is probably worth explaining that all of my apps were built upon the App Engine, and I was quite active in the App Engine forums and Twitter Developer forums (see my rant about Re-tweets ;) and I was implementing a lot of the latest features in my apps.

    My onsite interview was on the 8th of December, and I believe on the 15th I was offered the job as long as I got over the final hurdle (final sign-off). By the 23rd I was properly offered the job - contract and all.  At my interview I was "advised" not to take the first offer and hold out for a better packet..... however once the call came through with the terms, there was no way I was going to say no :)

    At Google

    My entire first month was spent in the Mountain View campus.  It was awesome.  I met so many amazing people. I can't really say much about what happens in a Nooglers first month - other than you are overloaded with information.  If you have ever seen the Matrix when Neo learns Kung-fu in 5 seconds, it's like that (without the brain plug).  Oh and yes, you do have to wear the hat!

    I joined as a Developer Programmes Engineer for iGoogle and Google Chrome; I didn't realise it but I had joined a team with so many industry experts, people like Chris Messina and Tim Bray. These were guys that I had followed for a long time, and now I get to work with them.  When I started, I was the 2nd person of a two man team in London it made sense to cover two products.  The team has grown a lot over the year and now I solely focus on Chrome (HTML5 and the Webstore).  We have an amazing set of developers on the team now in London (@reto_meir - from the start, @mahemoff, @crafty, @ade_oshineye, @tekgrrl and @ccherubino).

    Google IO - I joined after all the talks had been decided, so it was not possible for me to do one.  I helped out on two hack-booths and at one of the stands.  It was a pretty amazing experience, it the first time that I stayed in San Francisco (I probably won't be doing that too often).  An event with so many massive announcements and so many developers. I have never seen anything like it, plus everyone who attended got two phones, unless you were a Googler and all you got was a yellow t-shirt.

    I have travelled so much this year, actually, I quickly calculated that I have travelled more this year than I have in my entire 29 years of life before Google.  I have also given quite a lot of presentations over the last year too (http://gdd-2010.appspot.com/ and http://londonwebstorenight.appspot.com/ are just a few).

    Around late June, I shifted roles slightly; I became a Developer Advocate.  The distinction between the roles is not great, DPE's do more behind the scenes work and DA's will engage with partners more, potentially at an earlier stage.  But change in role reflected the outreach work that I have been doing for most of the year.

    In late October we went on a massive Road Trip around Europe giving talks to thousands of Developers in Munich, Moscow and Prague for the Google Developer Days.  We didn't get to stay long in Munich or Moscow, but we managed to stay the weekend in Prague - it is one of the most beautiful cities that I have ever been in (and the beer was good too).  All the events were IMO very good, even the wifi held up in many places.  It was quite interesting to see the organisational differences between countries, for example the Munich event had 15 minute breaks between each talk (which worked really well) and the Moscow event was HUUUUUGGGGEEE and held in a massive arena - through my british eyes, some of the stereotypes that we see portrayed played out amazingly well - and that is a good thing because each of these events were amazing.

    In December we launched the Chrome Webstore.  I had worked with the team on this pretty much since I joined Google.  It has been an amazing project to work on and to see the genesis of a movement towards an app-centric view of the web.  There is a strong future for web-apps as developers learn to move away from some of the traditional web-isms that we see in websites and build apps and not sites with a bit of functionality in.

    Throughout the year I have worked with hundreds of developers helping them build awesome web-apps for the open web.  It has been an amazing experience.  Oh and I got my first commit in Chrome ;)

    The Future

    I honestly have no idea what this year holds, other than being twice as big as the previous year and I now that I know a little more about how everything works I should be a lot more efficient.

    I am hoping to be talking at Google IO.  

    I will be working with more developers and helping them build awesome web apps.

    I will be spending more time working with people outside of London.  My focus this year has been very much focused on the capital, but the development community isn't just based here.

    I will be spending more time at home in Liverpool :)
    • Tweet
  • About

    I help developers build really cool products on the Web.

    I work for Google as a Developer Advocate in London, specializing in Chrome, HTML5 and the Chrome Web Store.

    231036 Views
  • Archive

    • 2012 (5)
      • February (5)
    • 2011 (30)
      • July (1)
      • June (4)
      • May (10)
      • April (4)
      • March (1)
      • February (5)
      • January (5)
    • 2010 (35)
      • December (15)
      • November (5)
      • October (2)
      • August (5)
      • July (8)
    • 2009 (1)
      • January (1)
    • 2008 (8)
      • December (1)
      • April (2)
      • March (3)
      • February (2)
    • 2007 (17)
      • December (1)
      • September (1)
      • August (5)
      • May (1)
      • March (2)
      • February (4)
      • January (3)
    • 2006 (153)
      • November (3)
      • October (7)
      • September (11)
      • August (9)
      • July (9)
      • June (14)
      • May (11)
      • April (32)
      • March (23)
      • February (26)
      • January (8)
    • 2005 (274)
      • December (7)
      • November (43)
      • October (63)
      • September (54)
      • August (66)
      • July (13)
      • June (10)
      • May (10)
      • April (6)
      • January (2)
    • 2004 (1)
      • August (1)

    Get Updates

    Subscribe via RSS
    TwitterFriendfeedLinkedIn