*** Update: This app is now an open source project on GitHub!
Ready for yet another quasi-useful mobile app?
Today I am introducing the Prize Patrol, a small application built on Sencha Touch!
I came up with this idea a few weeks ago while I was preparing for one of the Chicago Sencha User Group meetings. I wanted a way to build a list of contestants (people who attended our meeting) and raffle-off a series of prizes… we eventually used the ghetto names-in-a-hat approach. We’re a small group at the moment, so that worked just fine.
However, it occurred to me that we’re a bunch of developers using Sencha products (duh!). Wouldn’t it be a better idea (and a bit more professional) to build an app to handle this?
Some Technical Details
The code for the Prize Patrol is not minified, so feel free to dig into the 200-ish lines of JS code. I promise it’s nothing too exciting.
The premise is straightforward – the app contains a list of contestants and a list of prizes. HTML5 local data storage (Ext.data.LocalStorageProxy) is used to maintain both of the lists.
The app assumes that prizes will be input in the order of most-to-least important. Pushing the “Call Winner!” button will grab a random winner from the “contestant” list and assign them the last (i.e. the least-important) of the remaining “prizes”. The winner is then removed from the running for the remaining prizes.
Why is any of this cool?
As I said before, I basically conceived of this idea for use at the Chicago Sencha User Group’s monthly meetings to give away a variety of prizes. I figure we can pass an iPod/iPad/mobile device around the room instead of a sheet of paper. It’s just a bit classier.
Because the app is using HTML5 local storage, any person (or any group) around the world can use the app simultaneously without overwriting data. If the browser was accidentally closed, the data would remain intact (unlike session storage).
All comments are welcome. Do you have any ideas for improvement? I’d love to hear them!
Note: You’ll need a mobile browser to use the app (or a desktop browser running Webkit). IE and Firefox won’t run the app correctly.