Friday, March 03, 2006

Making a Time Tracker in TurboGears

2006/30/7
Since may people may come from 42, I suggest you to download the full instruction at TurboGears Trac, you'll see full instruction to make it.

This article is motivate by the framework comparison screencast performed by Sean Kelly. I found this screencast from TurboGears group. the screencast compare J2EE , Rails ,Zope ,TurboGears ,and Django. TurboGears did fairly well. but Sean Kelly wasn't using the latest version(~0.9) during his tests.Thus I try to re-imlement the demo by using bunch of exciting new features (Model Designer, CatWalk, DataController...) introduced in the latest TurboGears version.


Origin version in ScreenCast

The screencast implement page like this, there is a add only interface, no editing.

TimeTracker preview

And it cost 2 python source files 49 lines of code, 2 page of templates, 53 lines of code, not a hundred lines of code.

Time Tracker preview Evaluation

Re-Implement version with latest svn(#885)
Its time catch up with Sean Kelly's demo in latest TurboGears version.
The re-implement with latest Turbogears svn like this. TurboGears > 0.9 provide autogenerate Editor(Catwalk) in Admin Panel(Toolbox)

Timetracker catwalk

We can get another running mode editor(much usefull for real app) with DataController by several lines of code.

Timetracker  DataController

the re-implement version cost 2 python source files (now Turbogears config file is in python) 6 lines of code, 0 page of templates, not a ten lines of code. The re-implement version also include a full-functional database-relation editor.

Timetracker Evaluation

Turbogears automatically generate pages for you both in admin and practice perspective. In Turbogears you can customize DataController and other widgets' looking and feel to fit your layout style.

0 comments: