What is Helma?
Helma is a scriptable, open-source
Java Web Application Server
res.write("Hello " + java.net.InetAddress.getLocalHost());
Helma is written in Java and employs Javascript for its server-side scripting environment, removing the need for compilation cycles and reducing development costs while giving you instant access to leverage the whole wealth of Java libraries out there.
What is Helma?
- Started in 1997
- orf.at Montagesystem
- Weblogs, "classic" helma
- Conceptual roots: Java, Object oriented databases, ASP
- Community: Small, pretty loyal, slightly disfunctional
- Users: orf.at, twoday, antville, many "small" sites and developers
- helma.org
Why Helma?
The top 10 reasons to give it a shot
- Helma is JavaScript! Well known, well established scripting language. Same language as on client-side
- Helma is Java! Scripted applications are compiled to Java, and server-side Java has proven to be quite fast and reliable
- Use existing Java-Libraries! Any available Java-library can be made accessible for the scripting environment. see here
- A light-weight. Rather small memory footprint, and is fast on start-up.
- Helma is open-source! BSD-style license
Why Helma?
The top 10 reasons to give it a shot
- Transparent database-mapping
- Efficient caching mechanism
- Smart (yet quite restrictive) templating mechanism
- Session management
- Integrated scheduling mechanism
What is Helma really?
Helma is a highly integrated Web stack consisting of:
Hello world michi/192.168.0.108!
Download and install Helma
Write the application
-> http://localhost:8080/helloworld
Prototyping
We define a Prototype 'Person' and instantiate, persist, modify and remove it. See the HopObject-reference.
Please, ignore the fact for a while that we clearly violated MVC-principles in the above code. The goal of this mini-app is to demonstrate the HopObject-methods.
DB Mapping
We will map the defined prototype on a database. See the Mapping-reference.
You will need to have MySQL installed, execute mysql.sql on your database, put the jdbc-driver from mysql.com into [HelmaDir]/lib/ext, delete [HelmaDir]/db/demo and restart Helma.
- Long-running, multithreading single process is ideal for simple in-process caching
- Caching via Least Recently Used (LRU) Hashtable, implemented using two rotatating Hashtables internally
- Each object exists exactly once at each time
- Concurrency considerations are really important
HopObject Collection Caching
- HopObject collections are ordered (lists)
- Any change in any object may affect collection membership or order
- Conservative default behavior: better to reload than to be wrong
- Options for more aggressive caching
Object Modelling
We will define a prototype 'Organisation'. Each person may belong to a Organisation.
- Object Model directly affects request path structure.
- Can be overridden by implementing getChildElement(), but it rarely is.
Rendering Framwork
Actions, Skins, Macros => MVC.
See http://helma.org/docs/guide/framework/.
Rendering Framework past, present and future
- Past: HSP (Helma Server Pages). Templates mixed with JS code, executed as functions
- Present: Skins and Macros. Rigid separation of form (skins) and content (macros).
Macros are special functions provided by application objects.
- Future: Helma template engine implemented in JavaScript
instead of Java; Alternative Velocity and Freemarker
template engines by Jürg Lehni.
Where is Helma going?
Helma 2 is a fresh implementation of Helma.
- Keep the good things, cut the cruft
- Many things have changed in Java libraries (both core and 3rd party)
- We have learned a thing or two
- Don't reinvent the wheel (even if we were actually first)
- Don't put things in Helma core that you can script
Helma (re-)organization
- Install some simple, common rules (aka bylaws)
- Distribute development and share responsibilities
- Try to attract more good people