OS Projects‎ > ‎

CRUD Applications


The last years we used a CRUD framework based on the Swing technology and MDA code generator. The experience was quite good for simple user interfaces. Such applications are used for administrating data, servers, devices or users. The major drawback of this approach was the lack of user interface configuration for example to implement customer corporate identity.
Currently configuration applications are often web based to avoid deploying client applications. System administrators can access the system from any browser and perform their activity. Also new paradigms and frameworks are emerging. These frameworks clearly separate business logic from the presentation layer. Therefore the user interface can be tailored to customer needs using regular HTML5 and CSS3 technologies without requesting any changes in the application code. Powerful AJAX libraries tremendously improved user experience and feed back in web based applications. 

After initial experiences with the Apache Wicket framework we found out we had to code again CRUD functions before reaching our goal.

OpenXava CRUD Framework

The OpenXava framework support the following features we identified
  • Display bean and list of beans
  • Edit a bean, insert and remove items from a list
  • Validation of fields through the validation JSR framework
  • Persistence through JPA 2 and Hibernate library

Tailoring of OpenXava

We run the OpenXava applications under Tomcat 7 and MySQL database (OpenXava distribution supports hsqldb and own configured Tomcat server). The following configurations are necessary to have a running system.
  • Configure MySQL
    • install MySQL, create the database for your application and the associated technical user
  • Configure OpenXava to support MySQL (see Deleepa's Blog).
  • Configure OpenXava for Tomcat 7: Tomcat 7 is more stringent with security issues.
    • Add MySQL jdbc driver in the lib directory in the Tomcat installation (see Deleepa's Blog).
    • Edit the file tomcat/conf/context.xml

            <Resource name="jdbc/MySchoolDS" auth="Container" type="javax.sql.DataSource"

      maxActive="20" maxIdle="5" maxWait="10000"

      username="root" password="" driverClassName="com.mysql.jdbc.Driver"


    • Edit the file web/WEB-INF/web.xml and add the following code to the DRW servlet 





    • Edit the file persistence/hibernate.cfg.xml



        <property name="hibernate.connection.datasource">java:comp/env/jdbc/OpenXavaTestDS</property>

        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

        <property name="hibernate.jdbc.use_get_generated_keys">false</property>

        <property name="hibernate.show_sql">false</property>

        <mapping resource="GalleryImage.hbm.xml"/>



    • Edit the file persistence/META-INF/persistence.xml

            <persistence-unit name="default">





                    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>



            <persistence-unit name="junit">



    <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>

    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

    <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/openxava"/>

    <property name="hibernate.connection.username" value="root" />

    <property name="hibernate.connection.password" value="" />




  • In February 2012 we stopped developing the Wicket 1.5 CRUD framework and moved to the OpenXava project.
  • The master detail CRUD framework was ported to Wicket 1.5 releases during fall 2011. The same test application is used to validate the framework.
  • The first prototype of the Wicket master detail CRUD framework was realized with Wicket 1.4 releases. The test application is a Scrum management tool with import interface to the Agilefant tool. The backlog of the project and the sprint backlogs can be exported as a PDF document to provide traceability and audit features for the project office management processes.
Subpages (2): CRUD Commands Domain Model