At some point in 2007 I decided that I need some experience in developing for the Web. I had done some interesting work in engineering and science, but it was not web development and it was obvious that a vast amount of development was moving to the web. I wanted to understand it.
I learn best by doing, so I wrote a small web application called www.dayfindr.com. In essense is solves the problem of "Who can come when" for organising an event. The first implementation was in Lisp (my favourite language at that stage), but I ended up porting it to Erlang for various interesting reasons that I wont ge into today. When Google Wave came along with the ability to create "Gadgets", I decided that porting dayfindr.com to a Google Wave gadget would be an ideal opportunity to learn the platform. This post is about that experience.
For the web version, I needed several application components:
CalendaringSome domain code for calendaring functions.
User ManagementMost websites need some user management. This can be relatively complex with logins and passwords, ensuring security, maybe adding access via OAuth or OpenID etc. As a deliberate decision to avoid user "management", I decided to use the email. When a user creates an event, I would send an email to that user with a key (a hash) that could be used to access the event. TripIt uses a similar mechanism.
NotificationBecause I had email notifications already, I would re-use this and email the event organiser when an invitee updates their availability.
DatabaseFor a database I used Mnesia, but the implementation was no different from using a better known relational database.
DeploymentI needed a VPS to host this thing, so that's what I got and it costs aboutn £17 a month. You could get the same for $20 a month from my preferred hosting company, Slicehost.
In contrast to the original, traditional web application, the Google Wave Gadget has these components:
And this is what it looks like:
Strictly speaking, the gadget XML must still be hosted somewhere as "deployment", but this is so trivial I don't even consider it. Dayfindr Wave is hosted on Github, and it's easy to get the gadget XML file from there.
The main conclusion from this comparison is that gadget version is VASTLY simpler than the traditional web application.
But what about the downsides? Where's the conservation of misery?
- You don't own the data. For some applications this would be a non-starter.
Google Wave provides the notification, user management, database (via the Wave state) and deployment. For simple applications, you can develop the functionality in a fraction of the time and effort compared to a traditional web application. For larger scale apps I would not receommend this route, but this is a much cheaper way to develop and deliver small applications on the web.
The code is on github at http://github.com/bjnortier/dayfindr_wave, and if you want to include the gadget in your wave you use this url:
I always appreciate feedback, so I've created a publicly accessible wave for this: https://wave.google.com/wave/#restored:wave:googlewave.com!w%252BOPNqLOwWB.2
P.S. There is another, similar website to dayfindr.com, called doodle.com. There is also a wave gadget for doodle, called Planny. It has a little bit more functionality, but at the cost of extra complexity. Use whichever one you prefer :)