Helma logo
main list history

HOWTO improve Helma 1.x

I am currently working on improving and extending Helma 1.x. This page serves as a public todo list summing up tasks that should be or could be done (but are no bugs) to improve Helma 1.x.

  • HopObject
    • deprecate either count() or size(), I'd prefer to deprecate count()
    • deprecate invalidate(id), as it can be done as get(id).invalidate()
    • rename the magic properties (__id__, __parent__, ...). Some properties currently exist with one underscore in front (_property) as well as with two in front and two at the end (__property__). Some only use one syntax, some are case-sensitive, some others are not.
    • move getById(id, proto) to app.getById(proto, id) or remove it as it is unrelated to the HopObject called on, leave Constructor.getById(id) as it is.
    • rename getChildElement to onGetChildElement to reflect that it is an event handler
    • make getOrderedView() return something else. Currently it returns some object that is similar to a HopObject, but is not a HopObject. Some functions are missing, some throw an "unsupported exception". There should be something like a HopCollection, being extended by HopObject.
    • some functions like getOrderedView() throw RuntimeExceptions when called on an incompatible (transient) HopObject, some others just return null. I propose to change all functions to throw exceptions, as one can check with isPersistent() before doing a call that might not be supported.
  • Properties files
    • As every other directory or file is configurable, the location of the db.properties file should be too. I'd suggest to add dpPropsFile.
  • Scripting engines
    • Implement a configurable class shutter implementation for Rhino
    • Move configuration properties only influencing a specific scripting engine to it's own properties file (i.e. have separated configurations).

Comments

#1 by maks at 2008/08/07 02:40

I think this is a great idea and am happy to help.
It would be great if we could also put the bugzilla IDs next to each item on this page...

I'd prefer size() since I use it rather then count() in all my existing apps.

Would also be good to have getOrderedView() work with sorting by child properties as currently its quite limited. Perhaps it would be better to rework it to be more generic sorting interface.

Would also like to propose the following for the DB/ORM layer:
  • finish the work started by making the dirty nodes a ordered list (instead of hashmap) and add code required to map transient IDs to allocated DB IDs. This will allow transient nodes which are children of a transient node to all be persisted in the same transaction. Currently this does not work, because the transient children do not know have the DB ID that gets allocated to the parent transient object as it gets persisted, just before the children get persisted.
  • start using DB transactions via JDBC