Explore the introductions below and discover what you
can do with Helma and Javascript on the server-side.



Helma's coding conventions revolve around the prototype based object inheritance of Javascript. While Helma does not force you to leverage these coding conventions, doing so will increase productivity and you will achieve better maintainability due to a clean and well organized code structure.

The HopObject prototype is the core prototype of every Helma application. By default, other prototypes that you create will inherit from the HopObject prototype. Every directory that you create inside your application's code repository becomes automatically a prototype by that name and will inherit the methods, actions, macros and skins that the HopObject prototype provides.

In the "welcome" application's code repository at ./apps/welcome/code/ for example, you will find directories for the HopObject, Root and Guide prototypes. Both the Root and Guide prototypes inherit automatically any code from the HopObject prototype. Additionally, the Root prototype also inherits from the Guide prototype, due to the "_extends" property that is configured in ./apps/welcome/code/Root/type.properties

_extends = Guide

"Root" is the prototype of the application's root object. The root object of the "welcome" application therefore uses the combined code from these three prototypes, with code in "Root" overriding code from "Guide", which in turn overrides code from "HopObject".

When Helma receives a request to http://helma.serverjs.org/ it will look for a "main" action to handle the request. Since it will not find one in "Root", it will use the one defined at ./apps/welcome/code/Guide/main.hac. Requests pointing to a generic HopObject such as http://helma.serverjs.org/first/ on the other hand, will use the main action defined at ./apps/welcome/code/HopObject/main.hac.

More information on how Helma puts prototypes to work: