Tuesday, May 18, 2010

A New SlimPoints Feature: Food Diary

It's been a long time coming, but I finally updated SlimPoints to support a kind of Points Tracking, which I refer to as a Food Diary.  What's points tracking?  Briefly, you keep a running total of the number of "points" you eat during the day, and try not to exceed a daily limit.  It's very easy to follow (especially if you have a tool!)  Previously I had used an iPhone app for this, but it was riddled with so many bugs that I decided to scratch my own itch and create the diary for SlimPoints.

Supporting this feature represents a fairly big change, as it means using App Engine's Datastore for persistence and (obviously) requires an account in order to maintain the diary.  Since I run on App Engine, I chose the path of least resistance, which is to use Google's own UserService API for supporting users via Google Accounts.

Interacting directly with App Engine's Datastore is kind of painful, but Objectify made it as simple as it could be.  I highly recommend it if you need to run on App Engine.

Another challenge was that I wanted the rest of the app to remain useful for people who didn't want to take time to create an account. Sites that immediately require you to sign up are kind of a turn-off; it's helpful if your users can kick the tires a bit before deciding they want to invest the time to sign up. For this I relied heavily on GWT's history management via URL, and tabs to separate open vs "account required" features. Ray Ryan's advice to "get history management right up front" was truly gold, for this feature.

I also took the dive and started using UIBinder, and I'm damn glad I did.  UIBinder takes the best part of Wicket- the ability to lay out and style your components in HTML, and brings it into GWT.  It was totally worth the 15 minutes it took to learn it.

There are lots of changes in this release, please check it out!




1 comments:

  1. A treasure trove! As much information on almost all my questions, I will not find anywhere else.

    ReplyDelete