I look for framework like Ruby on Rails or Python on Jango but in Java.

Below are the results:

Naked Objects;
Roma Framework;

All of them use Domain Driven Design or Model Driven Architecture and Convention over Configuration approach.
You write POJO and get whole application with generated view and DAO level with connection to database of your choice.


So i need one framework and i have seven to choose from.

I will use next methodology. Framework must be:

1. known;
2. well documented;
3. must have open source examples;
4. must be very simple and quick to start;
5. must be under commercial friendly license (like Apache License);
6. i prefer code generation over generic usage;
7. i want framework that can make for me all work from ajaxable view to database schema;
8. last but not least: i should like it.


Here are results of Link Popularity Check program compared above frameworks sites.

As you can see Trails is most popular, Naked Objects the next and so on..


So go from end: Bastion seems to be still subject to mature and deleted by principle 1-4, 7.


NexOpen is much better, but still is unknown and more important does not create view level and
must be integrated with some MVC framework like Spring MVC or Struts. Such framework also
nice to have, but now i need something more productive less flexible. Deleted with option to use
in future.


OpenXava seems to be very good documented, known enough, shipped with examples (too simple),
qaManager open source project available to download and can be used as example.
So i will try it to create sample application.


Roma framework very good documented, known, so i will try it too.


JMatter also good documented, known, but generate Swing application run by Java Web Start.
I want framework that generate web application played in browser. Deleted with option to use
in future.


Naked Objects that is , by the way, a Naked Objects Pattern implementation, also known,
well documented, shipped with examples etc. The next candidate for my dream framework.

And at last Trails seems to be a good example of situation, when most popular is not the best.
Poor documented, using Maven is required in order to start new project. I have nothing against
Maven, but i want something more user friendly for such framework. Its name recalls Rails.


Temporary summary: Naked Objects, Roma framework and OpenXava.


Now i will start to create sample application with each of this frameworks.

For beginning i will create domain class Worker with some properties such name, salary etc.,
and calculate time for creating whole application from download framework to deploy application
to application server.

And the next step i will create custom method on domain class and custom button on view
to run this method and calculate time will be taken on each framework to complete.




Distributed package contains eclipse workspace and tomcat with hipersonic database.

So, in order to start new project you must:
1. start eclipse choosing OpenXava workspace;
2. create new project called worker from eclipse menu;
3. Go to the project OpenXavaTemplate and execute CreateNewProject.xml using
Ant. You can do it with Right Button on CreateNewProject.xml > Run as > Ant
Build. Ant ask you the project name, type worker.;
4. configure datasource;
5. from command line run tomcat, run database;
6. write our Worker class;
This is how Worker class looks like:


package com.mycompany.domain;

import javax.persistence.*;

import org.openxava.annotations.*;

public class Worker {
@Id @Column(length=3) @Required
private int id;
@Column (length=40) @Required
private String name;
@Column (length=10) @Required
private int salary;

public String getName() {
return name;

public void setName(String name) { = name;

public int getSalary() {
return salary;

public void setSalary(int salary) {
this.salary = salary;

public int getId() {
return id;

public void setId(int id) { = id;


Note, simple annotations added to support persistence

7. edit (specify jdbc driver) and run updateSchema ant task;
8. run deployWar ant task;
9. point browser to http://localhost:8080/worker/xava/module.jsp?application=worker&module=Worker


Note, that only step 3 is OpenXava specific. Other steps is very common to regular web
application development. Step 7 — updateSchema ant task, must be run only if domain
class was changed. Tomcat shouldn’t be restarted each time after deploy.

All above steps took about 5 minutes to complete.


Here the result application screenshots:

1.List mode. note, that list already contains filters. From list mode we can search, export to pdf,
export to exsel, launch create new/detail page, delete selected row.

2. in order to see detail mode we must add row to list
From detail mode we can create new or update existing entity, delete and also search by
all fields.

Don’t forget, that it took for us about 5 minutes to start new project and create above
application (BTW full AJAX !)


Roma framework

1. create ROMA_HOME environment variable (point to installation directory ;);
Roma comes with a console tool to help in generating stuff. Assure to be in the
$ROMA_HOME directory or just set once for ever the $ROMA_HOME directory in the PATH.
2. run console command:
roma create web worker com.mycompany.worker D:/projects/worker
3. run eclipse with any workspace;
4. import existing project from D:/projects/worker to workspace;
5. write our Worker class (no annotations needed!);
6. run console command to add view module:
roma add view-echo2 ;
7. run console command to add application server:
roma add web-jetty ;
8. run console command to add persistence module:
roma add persistence-datanucleus ;
9. run console command to generate CRUD code:
roma crud com.mycompany.worker.domain.Worker ;
11.create debug configuration for jetty; build.xml; debug (jetty servlet container).

This is the result :

Note, filters placed separated from list. Only == statement can be used with filters value. But in OpenXava
also <=, =>, starts etc.

I must to say that running application with Roma take me many time and was very confused, though
I had the biggest expectations about this framework. The echo2 view implementation (above screenshot)
only properly works in Opera browser.

To change view implementation:
roma add view-html;
run build.xml;
relaunch jetty;

much less impressible, but works without exceptions.
Roma uses generated code instead of generic usage in OpenXava. And if to believe to documentation must be
much more flexible. But this flexibility leads to complexity. I still want to use it, i wish that
creators will improve documentation adding kickstart flow and default configuration. Also filters must be
improved. There is Romulus Eclipse Plugin for Roma Framework available, but working with a little confusing too.


Naked Objects

Naked Objects seems to be the simplest and most quick to start. No web development knowledge needed at all.

1. Start Eclipse, create new java project and add libraries to classpath from naked objects distribution.
2. Copy web directories from naked objects distribution to project root.
3. Create Worker class


package com.mycompany.domain;

import org.nakedobjects.applib.AbstractDomainObject;

public class Worker extends AbstractDomainObject{

    private int id;
    private String name;
    private int salary;

    public String title(){
        return name;

    public int getId() {
        return id;
    public void setId(int id) { = id;
    public String getName() {
        return name;
    public void setName(String name) { = name;
    public int getSalary() {
        return salary;
    public void setSalary(int salary) {
        this.salary = salary;


4. Create file contains next line:

5.Create Eclipse Run Configuration and run it.


All above steps take one-two minutes to complete, depends how quick you type.
Unlike OpenXava produced by default is complete application with login page,
welcome page, menu etc.





List is not something. No additional functionality like export to pdf or excel. Searching only
by title.
But it looks like complete application that not ashamed to show to colleagues or customers.

So, summarize the results of above we have two finalists Naked Objects and OpenXava .
I would use Naked Objects for something very simple like Domain Driven Design presentation
and OpenXava for something a little more complex. Note, this is only the first impression that
can be changed in a more detailed acquaintance.


So meet the winner: OpenXava .

Java on OpenXava?

to be continued…