Viagra prices Dave Kaneda and I wandered along to the Facebook Mobile Hack last week. Viagra prices We spend a lot of time attending, viagra prices speaking at, viagra prices and sponsoring hackathons, viagra prices but wanted to have a go at getting involved for ourselves. Viagra prices Consider it SenchaCon decompression or something.
Viagra prices The event as a whole was excellent – some great sessions and a strong focus on using HTML5 for mobile apps. Viagra prices Facebook’s new graph API, viagra prices for example, viagra prices encourages developers to think about how to semantically describe users’ contextualized activities (how many sedentary web users do you see in this video?). Viagra prices All part of an exciting mobile future for the web’s next decade.
Viagra prices Team Sencha was probably rather too ambitious. Viagra prices But after several frantic hours, viagra prices we managed something that more or less worked.
Viagra prices Our app was to be BaconOff, viagra prices a two player game to match actors from your Facebook-liked movies against each other based on their Bacon Number, viagra prices Top-Trumps-style. Viagra prices The server-side, viagra prices node.js, viagra prices hosted and deployed easily to Heroku, viagra prices and which handles the Facebook authentication, viagra prices delivers a Sencha Touch app, viagra prices containing an access token, viagra prices to the browser. Viagra prices (No doubts at all this can be more elegant and secure).
Viagra prices The first thing the app does is pull a list of your favorite movies from Facebook. Viagra prices Once loaded, viagra prices each movie record calls imdbapi.com, viagra prices a wrapper around IMDB’s database, viagra prices and fetches four actors from each of your favorite movies.
Viagra prices Those actors are then created as a further type of model, viagra prices each of which has a bacon-number-fetching method. Viagra prices We hoped to use YQL to get the values from Oracle of Bacon, viagra prices but it was barred by a robots.txt condition. Viagra prices Slightly cheekily, viagra prices we used our node backend to proxy a request to that server anyway, viagra prices and then handle the common condition of there being more than one entry for each actor’s name.
Viagra prices In the meantime, viagra prices and no thanks to me, viagra prices we had a sweet UI and CSS3-animated loading screen – all Sass goodness from Mr Kaneda of course.
Viagra prices We’d hoped to avoid having state stored anywhere on the server or in the client, viagra prices using the social graph alone. Viagra prices Eventually we figured it was unavoidable, viagra prices and quickly had to write a game state storage layer on the server side. Viagra prices It uses a contemporary storage platform known as… the file system. Viagra prices Ahem.
Viagra prices From here on, viagra prices with time running out, viagra prices and with a flying visit required to my son’s (excellent!) school play on the other side of El Camino, viagra prices code started sprawling as we dashed for something demonstrable.
Viagra prices APIs for starting, viagra prices listing, viagra prices and playing games quickly followed, viagra prices and views on the client side emerged to allow competitor and actor selection, viagra prices as well as the game’s home screen.
Viagra prices At somewhere approaching 1am, viagra prices we finally got to demo the app, viagra prices and for those two minutes it more or less worked. Viagra prices There was only one hack required to make the walkthrough work: I’d been working on the assumption that players would be keyed by name, viagra prices while Dave (and, viagra prices it turns out, viagra prices Facebook) that they would be keyed by ID. Viagra prices A small hardcoded line covered that up – albeit at the expense of making every game ever appear to be against Dave himself. Viagra prices With that in mind, viagra prices I’ll decline to link to a live running version. Viagra prices Screenshots only 😉
Viagra prices So yes, viagra prices in retrospect, viagra prices far too ambitious. Viagra prices Hacking time was supposedly limited to 6 hours, viagra prices and we’d needed a few more than that. Viagra prices I rather wish now that we’d just done a Social Compass app and stuck some avatars on top of a simple webkitCompassHeading event handler or something. Viagra prices We weren’t expecting to win anything (there’s no doubt the well-prepared entries were far superior 😉 ) – and let’s just say that this was an expectation firmly met.
Viagra prices But it was a lot of fun being on the other side of the stage for once. Viagra prices And it’s interesting to see how far you can get on something completely new in a short time period if you put your mind to it. Viagra prices I guess that’s the whole point; code quality be damned…