[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Main | Date | Thread | Author

[ba-ohs-talk] JPublish and FreeEnergy

Context: looking for ways to build a Web publishing system as a substrate 
for an OHS, I discovered FreeEnergy by way of an announcement of an update 
on JPublish.    (01)

"JPublish is a simple web publishing system which uses the Velocity 
template engine in combination with a content management framework to build 
dynamic web sites. JPublish was designed to ensure a clean separation of 
content, programming logic, and presentation logic.
JPublish is loosely based on the Free Engery methodology. FreeEnergy was 
originally created by Leon Atkinson and others as described in his 
self-authored article Harnessing PHP's FreeEnergy available on the Zend.com 
web site. Essentially the FreeEnergy methodology was designed to handle 
page development in an object oriented fashion so that common objects could 
be reused. Much of JPublish's initial development ideas were obtained while 
documenting J.J. Berhens implementation of FreeEnergy in Python, called 
Aquarium. There is also a FreeEnergy implementation written in Java called 
Turbine, available at the Jakarta Apache site."    (02)

Now, to FreeEnergy.  It's PHP-related, but, as they say, Servlets work just 
as well.    (03)

"Our breakthrough came when we began to view a Web page in an 
object-oriented way. This enabled us to design a system that treated the 
assembling of pages like Matryoshka dolls, the Russian dolls that nest 
within each other. At the highest level is the set of code common to all 
pages. This includes the <html> and <body> tags. Within this script, a call 
is made to a script for laying out the page. In turn, the layout script 
outputs its code and calls navigation scripts in addition to a file 
containing the unique content."    (04)

"The FreeEnergy system breaks Web pages into five modules: action, layout, 
navigation, screen and utility:
       Action modules: Perform some sort of write function to a database, 
file or possibly to the network. They are executed before the screen 
module, and may override the user's request for a particular screen. Action 
modules never send data directly to the screen. Instead, they add messages 
to a stack to be popped later by the layout module.
       Layout modules: Contain just enough code to arrange the output of 
screen and navigation modules, which are invoked using include.
       Navigation modules: Contain links and repeating elements, such as a 
vertically-oriented column of buttons.
       Screen modules: Contain the content unique to the particular page 
being displayed. They may be plain HTML, or they may be primarily PHP code.
       Utility modules: These modules tend to be catch-all. Any module may 
rely on a utility module. Some of them are called for each page load, while 
others are collections of functions related to a particular database table. "    (05)