Over the past days, I did some experimenting with the JOMP patch for Rhino and the mapping of additional filename extensions to HopObject properties. I probably took it a bit to far and made the list of supported file suffixes to long, even introducing duplicates, but I would like to propose supporting additional filename based conventions for Helma 1.7.
Here is what I added for my experiments:
foo.macro --> becomes a hobj.foo_macro function with "params" as first argument
foo.get --> becomes a hobj.foo_action_get function
foo.post --> becomes a hobj.foo_action_post function
foo.put --> becomes a hobj.foo_action_put function
foo.delete --> becomes a hobj.foo_action_delete function
foo.e4x --> becomes a hobj.foo_e4x xml object
foo.json --> becomes a hobj.foo_json js object
Then I also needed a mapping that would not be generally useful, but only interesting in the context of my experiments:
foo.control --> becomes a hobj.foo_control function with "view" as first argument
And on top of all that, I added some duplicates:
foo.view --> the same as foo.skin
foo.action --> the same as foo.hac
The helma patch that resulted in:
name | type | size |
helma.txt | text/plain | 8648 bytes |
Maybe instead of adding direct built-in support for additional filename conventions to Helma, we could instead add functionality that would make it easy to script/configure such additional conventions as needed.
I also added this proposal to the helma wiki, where you can leave comments .
21.1.2008, 17:02