Helma Logo
main list history

Helma Facts

Please add corrections in the comments area below. I used to call these facts - now I'm calling them assertions until somebody proofs this page.

Assertion: Each '/' separated token of a URL has a backing HopObject which represents it (based on mountpoint for non-static pages). The HopObject tree of your application is always created manually in code (ex: onStart()) or will come from persisted data (internal database or SQL database). The hierarchy of tokens in a URL request have nothing to do with the directory structure in your Helma app.

Assertion: Each directory you create in your Helma application represents a prototype which by default extends the HopObject prototype. To have the prototype extend a different prototype, add the file type.properties in your prototype directory and add the line "_extends = {other_prototype}".

Assertion: The root HopObject has a Users HopObject attached to it. And this Users HopObject has user HopObjects attached to it. These user HopObjects can indeed also be resolved to a URL. (What else do you have to do to assure this?)

Assertion: To avoid frustration when learning Helma, you should at least always have a main.hac file in your HopObject prototype directory which returns at least some basic response. The file 'main.hac' is the default action for any HopObject instance.

Assertion: When creating a website with significant user data (peristent user/session data), you can approach the design of your application in at least two ways. (I don't really understand this - but here we go: hehe) When you log a user in, you could pursue a RESTful approach with the site URL structure under that user's URL token. /user1/books/book1. Because the HopObject tree is dynamically created in code, you can do this when you programmatically log the new user in. Or you could use something like /books/book1 and separately persist the user data to a separate branch of the HopObject tree which is never actually served. (the branch for that user.) (Rewrite)

Assertion: If you want to be able to use the core Helma Javascript objects in your application: (even core/Object.js or core/JSON.js), you still need to include them in your app.properties file. For example: myhelmaapp.repository.1 = core/all.js. This is certainly true as well if you are using Jala as well.

See also:
http://en.wikipedia.org/wiki/Representational_State_Transfer#Example