Table of Contents

Chapter 1: Overview
Presentation
Business component
Controllers
Application
Project structure

Chapter 1: Overview

Presentation

OpenXava is a framework to develop JavaEE/J2EE applications quickly and easily.
The underlaying philosophy is to define with Java annotations or XML and to program with Java, the more definition and less programming the better.
The main goal is to make the more typical things in a business application easily, while you still have the necessary flexibility to develop the most advances features as you like.
Below you can see some basic concepts of OpenXava.

Business component

The fundamental pieces to create applications in OpenXava are the business components. In OpenXava context a business component is a Java class (althought also exists a XML version) that contains all needed information about a business concept that allows you to create applications on it. For example, all needed information that the system has to know about the concept of invoice is defined in the file Invoice.java. In a business component you can define:
This splitting way is good for work groups, and allows to develop generic business component for using in different projects.

Controllers

The business component does not define the things that user can do in the application; this is defined in controllers. The controllers are specified in the file xava/controllers.xml of your project; in addition OpenXava has a set of predefined controllers in OpenXava/xava/default-controllers.xml.
A controller is a set of actions. An action is a button or link that a user can click.
The controllers are separated from the business components because one controller can be assigned to several business components. For example, a controller to make CRUD operations, to print in PDF format or to export to plain files, etc. can be used and reused for components like invoices, customers, suppliers, etc.

Application

An OpenXava application is a set of modules. A module joins a business component with one or more controllers.
Each module of the application is what the end user uses, and generally it is configured as a portlet within a portal.

Project structure

A typical OpenXava project usually contains the these folders: