+4420 3290 2266


Project Haala


Resources and site The Platform HAALA

The platform serves text and design specific to each website while keeping all the resources in the same database. This is accomplished by using the site identifier which is 3 symbols long. The site identifier tells the platform: this set of resources should be used for this website and for this language.

There are 4 types of resources which take advantage of the site identifier (also called site-able resources):

  1. Label
    Text, stored in a database. Provides text which one can see on a website.
  2. Setting
    Configuration entry, stored in a database. Provides configuration for websites and the platform.
  3. File
    Header of a file, stored in a database. Provides website resources such as graphics, Javascript, CSS, templates and downloadable content.
  4. JSP
    Layout template, bundled into the platform deployable WAR package. Provides websites page layout.

Overwriting resources

For some of the website resources described above, the platform supports overwriting resources feature. This feature allows a resource to overwrite its parent and the platform will serve a new resource instead. For example, a website may get a unique layout by overwriting default JSP or Freemarker template and behaviour by overwriting some of the Javascript files. The resources are either bundled in the WAR or served from the database and by providing the site identifier the website lets the system know which resources to serve instead of default ones. This section will be explained great in details later in this article.

Multilingual support

The platform provides multilingual support for text, graphics and arbitrary files in rather a starnge manner by overwriting resources. The platform loads resources based on the site identifier provided by user. There is the link between language locales and root site identifiers stored in the settings which is solely used to display the website in user's native language. Thus the platform is unaware of resources' language it serves, it simply fetches resources by the site identifier and it is developer's job to properly link identifiers to resources.

Lets assume that the site identifier xx1 refers to English resources and xx2 refers to Russian resources. The platform will load xx1 resources (which are in English) until a user tells it to switch to xx2 site identifier. From that point onward the platform will load xx2 resources (which are in Russian). And based on the database configuration, xx2 is linked to and sits on top of xx1 allowing the platform to reuse xx1 resources such as templates, Javascript, CSS, images in absence of xx1 alternative, in this case xx2 overwrites xx1 resources. So when the user switches the site identifier from xx1 to xx2 she only sees some of the text and images changing, or this can be a complete new look.