My foray into web development: GWT/CRON-o-Meter
I’ve been tinkering again. I’ve been working on a web app version of CRON-o-Meter. I’m using GWT (Google Web Toolkit) which lets you write your client & server portions in Java, and converts the client java code into native javascript to run in the browser. It’s a pretty slick hack. While web apps are not nearly as clean and responsive as a stand alone app, there are a few nice benefits. For starters, there’s no configuration or installation for anyone to do. It should ‘just work’. Secondly, all the data is kept server side which means you can log in from any machine (work, home, cafe) and update your data. It also makes it easier to share recipes and results.
It’s not fully functional yet, and I don’t have a hosting environment set up yet, but you can see from this screenshot that it’s looking pretty decent. I’ve written the whole codebase from scratch, although it’s design is obviously heavily patterned from the current CRON-o-Meter application. I haven’t done any serious web programming since about 2003, so things have changed quite a bit. The technologies have improved greatly, but one thing that hasn’t changed is that web programming is still a giant pile of ass. CSS sucks, browsers suck, SQL databases suck, and client/server communication over http sucks. GWT helps immensely at hiding much of this, but to do anything non-trivial means getting down and dirty into all of these niggle idiosyncrasies of web development. Ranting aside, it has still been fun and I have enjoyed getting back up to speed with the latest cutting edge web technologies.
A big design decision was that you can only log in using a google account (using a service called OpenId that lets other websites authenticate your identity). I had initially started building it with my own home-baked user authentication system, but decided that for now it is ultimately a huge time saver to just use OpenId. It removes a huge amount of hassle from developing a system to securely manage accounts. I can just piggyback off of google this way, which is just great. I don’t have to worry about account creation, secure password hashing, validating email addresses, resetting forgotten passwords, and so on. If I had to write this all myself, it would likely have bugs and security holes. Instead, I can just focus on the application core.
It’s hard to put together a serious application like this in my spare time, as coding generally needs long sessions of uninterrupted flow time to make progress. Most evenings I’m too burnt out from work to do more coding, or I’ve got all that pesky socializing to do. So generally it’s a little fit of progress each Sunday afternoon. Alas, don’t expect a finished product anytime soon.
Pretty sick! Can’t wait for the web app version 🙂
1.0 grapes = 33.8 Cal… yikes!
Looks great! Another advantage of a web app is mobile access — it’d a little like having an iPhone/Android version.
Yay! I really like the current application, my only regret is that it is no web application so this will be just great.
I was looking for a donation button on your site because I would definitely donate some bucks if there was one. Your app has been extremely helpful and motivating for me and I enjoy using it much more than the other web-based services I tried. Thanks!
What a fantastic idea! This would be perfect for adding foods when you are away from your computer. Much easier than trying to remember everything you ate at the end of the day! Do you know if you will finish this soon?
I am dieter, just starting a Specific diet and my software engineer wife said to look on sourceforge for a calorie tracker and found your cron-o-meter. I am trying to import the foods allowed in the diet (very restricted) to the program.
I am using windows works, .xlr file. We need to know the xml file format, sample file or DTD or XSD.
Also we are wondering where can we download a copy of the source code.
She would like to see it.
The source code is all on source forge. It’s open source. You can see sample XML files by just using the export feature.
Like some of the previous posters, I’ve gotten a great deal of use out of CRON-o-Meter over the past few years. And I too would like to be able to keep track on my android, perhaps even with it synced to CRON-o-Meter on my mac. Perhaps this could be done using dropbox, if all of the files could be stored in a dropbox directory? Would be willing to pay for an android app that could do this.
And like Carina, I would like to donate, but don’t have paypal so I can’t use the donation button you have on sourceforge. Any chance you could support google checkout?