Monthly Archives: March 2012

First Javascript application: Times!

Phew, I just finished N hours trying to write my first real Javascript application for writing down hours for billing. I guess I should actully log those hours right away… Done.

What does my application do really? You’ve worked for some time (from some time to some time) on a particular date. After each month you’d like to see on what you exactly used your time on, get some summaries etc.

I started by grabbing myself all-inclusive template from bootstrap, added jquery and fired away with almost latest version of Chromium.

Currently the only datastore available is Chromium’s SQL backend. The almost only reference on it’s API I could find was the one at html5rocks.com slides. As I eventually understood that you cannot do your database code simply by dispatching calls one-by-one (you actually need to chain those using callbacks) it all started to work out. Too bad this only took me way too many hours (logged though).

So planned and implemented features in a “short” list: (implemented)

  1. list the logged in items
  2. log in an item
  3. delete an item
  4. edit an item (dao code is ready, form modifying is not)
  5. logging ux: sane defaults and quick support:
    • day:
      • today
      • yesterday
      • relative
      • other
    • starting at:
      • 7-12 o’clock in 30 minute increments
      • the next non-logged minute of the selected day
      • relative, anchor down “ends at” at now
    • ending at:
      • 4-18 hours in 30 minute increments
      • the next logged “starts at”
      • relative hours:minutes (range slider)
  6. simple summaries: (day,week,month,year) summaries
  7. github push, public domain or APL
  8. split up the current textarea “notes” into:
    • tags
    • comment (free text field)
    • mood (e.g. 1-5 rating, emoticon based)
  9. two dimensional summaries: (day,week,month,year) X (tag, mood)
  10. backend web application with json api
  11. synchronization with backend web application
  12. N8 support (haha!)

So there might be still some things to iron out, but I’m getting there. Perhaps I’ll finally even learn Javascript’s this.