InfoQ

News

Interview with Javier Paniza on OpenXava 2.1

Posted by Rob Thornton on Feb 16, 2007

Community
Java
Topics
Artifacts & Tools
Tags
JPA ,
OpenXava

OpenXava, the rapid-web application framework, recently released version 2.1. InfoQ sat down with Javier Paniza, project lead for OpenXava to discuss the framework and the new release, which brings JPA support as well as many other enhancements.

OpenXava bills itself as a Ruby on Rails equivalent for Java EE applications. OpenXava builds applications by code generation based on XML. OpenXava is built to prefer definition (using XML) to programming (using Java). Business components are defined in XML, including validations, views, and ORM information, and then OpenXava generates the user interface to interact with the data. Paniza on what makes OpenXava unique from Seam or Trails:

The main difference between Seam and OpenXava is the abstraction level. The abstraction level of OpenXava is higher, in OpenXava you do not need to write the User Interface, and you get free a customizable list mode with ordering and searching capacities, pdf report generation, excel exporting, etc. As far as Trails, I’m a big fan of Trails and I think that we have the same underlying ideas, so there isn’t a big qualitative difference (maybe only the aesthetic issue of using XML instead of POJOs), rather the difference is quantitative. The generated user interface and behaviuor of OpenXava is richer, mainly because OpenXava has been in use since 2001 and has had the time to absorb the user feedback.

Paniza went on to describe how the Business Component Orientation of OpenXava changes how you develop an application.

Intestead of thinking in code (for business logic, data access, etc.) and dividing the work for your developers in that way, you think in terms of Business Components (Invoice, Customer, Delivery, etc.). OpenXava eliminates the need to write low-level code (UI or database access code) so you mainly write code for Invoice, for Customer, for Delivery.

But the best advantage is when you modify your code, if you want to modify something about the Invoice you only need to touch one place, the Invoice.xml component. Putting all information about a business concept in the same place has a lot of practical advantages.

The conversation then moved to what types of applications are a good fit for OpenXava.

Business database-backed applications, such as Invoicing, Accounting, Inventory, etc. In fact, OpenXava was born for re-writing applications originally hosted on an AS/400 and written using RPG. Any typical business application suitable for RPG, COBOL, 4GL, VisualBasic, etc. can be developed easily with OpenXava. If you want to develop a blog, a portal, a virtual shop, etc, then maybe using Spring or Seam (with a lower abstraction level) would be better.

Next Paniza described the architecture of OpenXava.

From an application developer perspective the architecture is:

  • Business components: XML files that contain business logic, data structure, tabular data definition, views(UI) definitions and database mapping.
  • Controllers: Groups of actions (in the GoF sense). The controllers define the behavior of the application. OpenXava has some useful default controllers for CRUD and Printing (for generating reports). But it’s common to develop new ones for custom applications.
  • Application: A group of modules, where each module generates a portlet. The modules are the pieces with which the user can work. In the module the developer associates a business component with one or more controllers.

Behind the scenes:

  • Code generator: For generating EJB2 code, POJOs, Hibernate mappings, portlet files, etc.
  • User Interface: Currently a few JSPs and Servlets that generate the UI on the fly.
  • Pluggable persistence provider: Currently we have EJB2 CMP, POJOs + Hibernate and POJOs + JPA persistence providers.
  • Editors, validators, converters, stereotype definitions: For customizing the default behavior and extending OpenXava.

The next release of OpenXava will be version 3.0 and will have support for EJB3 Entities as well as some annotations as an alternative to XML. These options come as a result of feedback from users who want to use OpenXava in applications already using EJB3.

No comments

Watch Thread Reply

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.