22.8.05 - jnex 3.5 released !

Jnex 3.5, the pure java MVC framework for Swing, ULC and Servlet / web applications has been released in its version 3.5 and is avalaible for download !

Jnex 3.5 is still free and open source (LGPL). Jnex framework is for building j2ee applications implementating the Model-View-Controller design pattern. With jnex the development effort lies in designing and connecting data models that embend the business logic, whilst viewers and editors for these models are generated by the framework. These datamodels represent either simple values or a struct or array of data models. Struct/Array-models as well as many simple value models are already implemented.

For Swing and ULC, containers are generated at runtime based on the data model.

For web applications that run as Tomcat Servlets, HTML templates are translated to viewers by the Servlet. An event-based state-machine is used for navigation.

Jnex data models can be exported and imported from JDBC and also converted to strings and vice-versa, which is useful for persistance.

Layout of Swing/ULC viewers can be achieved by using jnex layout classes or the standard jcomponents and layout classes, HTML layout is controlled by HTML templates containing placeholders for dynamic content and control elements (links/buttons).

Jnex provides multi-language features through the use of standard java resource bundles. Application properties can be accessed easily through the framework. The application development is enhanced and accelerated significantly by the rich base of components the framework provides.

Version 3.5 new features :
-State machine can have transitions that only need a triggering event and a target state. So you can have global events, which appear on every page.
-Working Compile & Run scripts for library and examples
-Easier deployment
-Commented examples
-Easier deployment
-Ant build scripts
-Linux deployment tested

20.7.05 - The Team example code avalaible commented

The code of The Team application has been commented. The Team is an example application for jnex that enables you to manage personal information about team members in a list and save the information to a file system. The used presentation tier is Swing. The application is also a nice example for the use of file persistance with jnex, building customized data models by sub-classing existing implementations, the use of data controllers and layout classes. Go to the example section to download.

19.07.05 - Take a look at the architectural overview...

By some reason the ArchitecturalOverview.doc file in previous releases of jnex was corrupt. So we released a new one that explains us so well what jnex is ! Check it out its in the docu section...;-)

19.07.05 - UlcExample commented

The jnex UlcExample is now avalaible commented. This example code is an application that manages a list of data items. The list is created from items that are made persistant on a database with the jnex persistance api. The list is managable through the three possible jnex guis, swing, ulc and html (servlet).

The example shows not only the implementation of a basic business application on the three presentation tiers by using the same datamodels and controllers but also demonstrates other capabilities of jnex, like jdbc, persistance and other..

You can download the code in the example section.

21.06.05 - Overview on building web apps with jnex added

We have made a simple overview to explain how web apps are built with jnex. You can find it in the Docu section. It is simplified and not all involved objects are shown but it explain the basic principle. Look at the HTML-Example, wich is commented now, to see how to realise it.

20.06.05 - Two more examples now with commentation !

The HTMlExample and the HelloWorld example are now fully commented with explainitory text. For the HTML-Example this will surely help in understanding the mechanism of the HTMlApplications that run on JnexServlets. Just go to the examples section and get the new commented version, they have just been replaced with the former examples.

6.06.05 - Added jnex examples and descriptions

In the examples section you will now find some good jnex examples. All of them are already included in the jnex 3.4 bundle but here you will find some additional description. Sometimes scripts for compiling and running are included. Anyway you need to download jnex and include jnex.jar into your classpath to run them. For the examples using a servlet you have to install the tomcat webserver ( ). To compile and run set your environment variables (CATALINA_HOME must be set to tomcat home dir) and use the scripts that come with the examples (compile and then deploy).

Only some examples are slightly documentated but a jnex docu and the example commentation is in process. We hope that most of the example code is self-explaining , wich would be only in favor of jnex !

If you have any questions or want to tell us about something, dont hesitate to write us ! We will be pleased to answer you !

19.05.05 - the jnex website is up ...

...but still not running with full functionallity. Examples, architectural overview and screens are coming up soon. Read the news arcticle bellow if you want to know what jnex 3.4 is !

19.05.05 - jnex 3.4 released !

download here

What is jnex ?

Jnex is a pure Java framework for the implementation of the model-view-controller ( MVC ) design pattern on a three presentation tier basis ! Swing, HTML and Canoo ULC. It is already functional and was originally developed and released by Nexirius ( ) under LGPL and shall now be further developed in the open source community. We have the kind support from SourceForge. The framework supports simple value and composite data models , automatic and dynamic creation of swing, html and ULC viewers, export and import of models over JDBC or to/from other external data,persistance, data model authorization, internationalisation cappabilities and many more nice features you will discover.

What do we have now in version 3.4 ?

We have a fully functional framework that needs to be discovered for further use ! The framework provides a set of predefined data models and viewers/editors to represent simple values (like strings, integers, date, boolean, images etc) :

DoubleModel (ProgressViewer)
ComboBoxModel (RadioBoxViewerCreator)

It is very easy to write your own DataModel and/or expand the existing implementations by sub classing them or even by sub classing the abstract DataModel class. Anyway this list will become longer... Then we have the composite models, where basically we have the ArrayModel and the StructModel. The ArrayModel can store elements that are instances of a certain type of DataModel. Whereas the StructModel can store any Data Model , also composite ones. That way it is very easy to make nested structs and other embedded structures. For example a mail address could be a StructModel with in it several StringModels and IntModels , or even other structs or arrays.
Whats nice is that all models can be rendered automatically with default views, embedded models are rendered recursivly.

What about the Data Model ?

All data models inherit from the same abstract class DataModel. Every DataModel has a fieldname by wich it can be referenced to, for example in a StructModel. For persistance DataModels can convert theirselves to a String and back. They also implement a comparision interface. Jnex models are fully scalable and anyhow the provided implementations of simple values are easy to integrate into any existing environment as they use java basic types to store data.To integrate for example business logic into a DataModel, it can append DataModelCommands. These are methods that are defined in the DataModel and can be called over fieldnames. They provide a control set that is also rendered into the viewer in any way , for example as buttons. Jnex supports persistence and transmission of data models, as it is able to transform any of them into a string and vice-versa. The mechanism to read/write Jnex data models from/to JDBC database connections is also provided. The actual mapping of database tables and fields to the associated models can be configured via simple Java tables.

Three presentation tiers ? Automatic creation of Swing, HTML or ULC viewers ?

This is possible by having registered default viewers/editors for every kind of data model. For example by default structures are rendered as forms, arrays as tables. But you can simply define and register your own viewers and editors and also overide the default mapping. Creation of viewers and mapping is done over a ViewerFactory class , that also holds application properties.(all the factory needs to be created is .properties file in the classpath, wich can be empty though) Heres a code snippet to illustrate how this basically works for Swing.

ViewerFactory factory = ViewerFactory.getDefaultInstance("JNexTest");
DataViewer editor = factory.createDefaultEditor(new MyDataModel());
DataViewer viewer = factory.createDefaultViewer(new MyDataModel());
JComponent editorComp = editor.getJComponent();
JComponent viewerComp = viewer.getJComponent();

To simplify the building of window apps in Swing , there is the Application class. An abstract class that provides you with a Swing frame (optionally a toolbar and a menu both fully scalable), a ViewerFactory , a MainModel (that you define yourself) , and an application fieldname (that can be dynamic) for the loading of app properties by the factory.The class that inherits from Application can then be called with a run() method , wich makes the frame pop up and execute the pre-init and init methods you may have implemented. The class also gives simple acces to the frames content pane as you see in the example below.

public class TestEnv extends Application{
  MyMainModel appModel;

  public TestEnv(String[] args)


  public void preInit()
    appModel = new MyMainModel();


  public void init()
    DataViewer viewer = getFactory().createDefaultViewer(getApplicationModel());
    JComponent viewerJComponent = viewer.getJComponent();
    getMainPanel().setLayout(new BorderLayout());

  public String getApplicationName
    return "MyJnexApp";

  public DataModel getApplicationModel()
    return appModel;

  public static void main(String[] args)
    new TestEnv(args).run();



Layout ?

For Swing layout is controlled simply by the usual Swing layout mechanism.Individual layout of Swing/ULC viewers can be controlled via layout classes where you can use placeholders and checks to dynamicaly define how the viewer looks like, or for examples , what language it uses.

For HTML presentation the layout is controlled by HTML templates, which contain embedded placeholders for dynamic content. The placeholders are functions that you define in your data model. A state machine is provided to control the process of the HTML pages, which are served by a servlet.

Internationalisation in applications can be realised through the multi-language capability of Jnex using placeholders and translations in property-files. The same mechanism is used in all three presentation technologies (Swing, HTML and ULC).

What is it all about ?

The idea and the primary goal behind Jnex is to enhance sustainable software development in Java. First Jnex makes development faster. Secondly it makes it very easy and evident to build your application in a modular way, to say it makes you implement MVC while taking out a lot of effort in the development. That way your software will be perfectly extendable, upgradeable and well built. And finally it enables your software not only to be run on any Java-supporting platform but also to use three different technologies on the presentation tier with very little effort. Jnex is a fully functional framework that can be used for professional software development with ambitious scaling goals. Nexirius needs support from the open source community to continue to make Jnex better, get more feedback and new features !