Lately I’ve been working on a new version of one of my oldest pet projects, GuessYourBaby. It’s a very simple site I put together many years ago to manage an online baby pool for a cousin and a close friend, both of whom were expecting at the same time. That old site was originally a single jsp file, which became a struts app and now will be a Google Web Toolkit (GWT) app hosted on Google App Engine (GAE). Now that the new site is in alpha, i’m very much looking forward to seeing some results trickle in! But it’s also appropriate to reflect on this project from a technical side..
- Wow! One hell of a learning curve! When I did the original legwork of deciding to use GWT, I was seduced by the idea of not having to learn nasty javascript to make a lovely yet full-fledged AJAX application. But boy did it take me time to learn the toolkit and boy did I go through a lot of hurdles! GWT brings along a completely new way of thinking as the Java is compiled in actual Javascript. Getting setup on eclipse, setting up the project structure to deal with entry points, deploying it, things that were all pretty routine had to be re-learned. If this wasn’t a pet project and I was working for someone, I probably would have ended up going for a JQuery/J2EE hybrid.
- Google App Engine… moving to the cloud. I also loved the idea of using Google’s cloud infrastructure. I wouldn’t have to worry about scaling up for traffic and it’s a managed hosted environment where I wouldn’t have to worry about all the little minutiae of running an app in a VPS (installing software, updates, etc. etc.). They also offer a free quota, so there isn’t a need to pay until you actually need to. Using GAE data store was also a bit of a shock to the system. The data store is fundamentally different from using a relational database and you have to unlearn some of the things you’re used to. Not normalizing, limited querying capability and no aggregation.. It’s an OODBMS. If your app needs to do any kind of reporting, stat collecting or aggregation, which is kind of what a baby pool is all about, it’s a big change. Basically, the approach is that you’re supposed to manage your own stats or counters as objects are written into the datastore. Don’t worry about normalizing, just store duplicate data! The downside is that your application code will need to account for all of these things, which we take for granted in a RDBMS.
- It’s Google, how can you go wrong? Well before I knew it I had an app with a severe case of vendor lock-in. So much of the GuessYourBaby code base is now tied to GAE/GWT that if Google ever decided to discontinue either one, well i’d be SOL. I have found some open source packages that theoretically allow one to host a GAE/GWT app away from Google’s infrastructure, but I never tried it and who knows if it would actually work. Hey, it’s Google right? What can go wrong? Well with the rash of products that Google has been kicking to the curb lately (Wave, Buzz, etc.), maybe I do have something to worry about!
- Hooray for Mailchimp! The new version will use Mailchimp to handle just about every email that goes out. I’m pleased with Mailchimp’s reporting, analytics and templating capabilities and even more pleased that they have a free tier that I can grow out of. I only wish they offered true transactional emails but they have a solution via Amazon Web Services that is available to paid customers.. which I will look into when the time comes.
In the end the whole point of a pet project is to keep the skills sharp and to learn new things, so I don’t regret using the GWT/GAE approach at all. At least I have one more thing to put on the resume. I also later learned that GAE is FAR MORE FRIENDLY to python than Java when I wrote insidetrck.com. Coming from a Java background, I found the Python/GAE experience refreshing! Far fewer lines of code to accomplish the same thing. I’d venture a guess that GAE was first designed with Python in mind.. after all, that was the first supported language.
I still like the idea of using a cloud infrastructure to host applications.. we’ve come a long way from hosting apps on a Pentium II behind a DSL line! 