Static Content

Even though a framework like OpenHierarchy is focused on being flexible, dynamic and handling various forms of business logic, there is always the need for static content such as images and CSS files.

Normally, serving static content is no challenge. You simply put the files in the file system and hard code a relative or absolute path to them in whatever context that the views are generated in.

OpenHierarchy takes the serving of static content to a new level. Since modules can be updated and moved between different sections in runtime,  their URL is subject for change and also the URL to their static content. OpenHierarchy also has the functionality of imposing access restrictions on static content based on the simple principle - if you don't have access to a module then you shouldn't have access to it's static content either.

In order to make the packaging and distribution of modules simple and rational, OpenHierarchy allows for the modules to bundle their static content inside their JAR-files. Which Java package that contains the static content for each module is configurable in the module descriptor.

In order to serve static content this way, OpenHierarchy comes with a special static content module that is used to access the static content of the different modules.

As in most cases, OpenHierarchy features like the static content serving functionality described above are optional and modules can use traditional methods for bundling and serving static content as well.

Latest blog posts