| 1 | 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. |
| 3 | Here is what I added for my experiments: |
| 4 | |
| 5 | foo.macro --> becomes a hobj.foo_macro function with "params" as first argument |
| 6 | foo.get --> becomes a hobj.foo_action_get function |
| 7 | foo.post --> becomes a hobj.foo_action_post function |
| 8 | foo.put --> becomes a hobj.foo_action_put function |
| 9 | foo.delete --> becomes a hobj.foo_action_delete function |
| 10 | foo.e4x --> becomes a hobj.foo_e4x xml object |
| 11 | foo.json --> becomes a hobj.foo_json js object |
| 12 | |
| 13 | Then I also needed a mapping that would not be generally useful, but only interesting in the context of my experiments: |
| 14 | |
| 15 | foo.control --> becomes a hobj.foo_control function with "view" as first argument |
| 16 | |
| 17 | And on top of all that, I added some duplicates: |
| 18 | |
| 19 | foo.view --> the same as foo.skin |
| 20 | foo.action --> the same as foo.hac |
| 21 | |
| 22 | The helma patch that resulted in: |
| 23 | |
| 24 | <% this.attachments %> |
| 25 | |
| 26 | 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. |