Friday, January 7, 2011

ERP/2.40/Openbravo 2.x architecture

ERP/2.40/Openbravo 2.x architecture description

Rating :
N/A
(0 votes cast)
You have to be registered to be able to vote


Contents

[hide]



Technology Overview


Development Environment


Openbravo is a pure web-based application built following the MVC
model. Most of the code is automatically generated based on the Data
Model Dictionary by an engine that we call Wizard for Application
Development (WAD). The engine executes and recompiles the application
every time the system administrator changes the configuration to
accommodate a user's request.

OpenBravo Architecture



This execute and recompile creates files for the different components of the MVC model as the figure above shows:


  • Model: xsql files with executable SQL statements
  • View: HTML & XML files define the layout of the forms and define the relationship with the data
  • Control: java servlets define the actions to be executed, manage the model and generate the view.

Execution Environment


To run the code, the application must be installed in a server
running MVC Foundation Framework (which provides support for the MVC
architecture) and a group of third-party applications which we call the
Operating Environment. Users require nothing more than a standard web
browser.

Openbravo Execution Environment

Both WAD and the MVC-FF are largely Openbravo's own development.
The Data Model Dictionary is an extension of Compiere's, with original
modules (such as production), and adjustments necessary to adapt it to
European and Spanish accounting standards and payment processes.


Openbravo's Operating Environment


Openbravo requires a group of well-known third party applications
such as Tomcat, Ant, Log4j, and some other utilities. Oracle 10g
database (release 2 SE) or PostgreSQL is also required.

The model is based on standard SQL statements, so it is not
necessary to use an EJB server. We use Apache Tomcat as the servlet
container, but others can be used instead.

Ant is used to make the builds and Log4j is used for debugging purposes.

All of these applications can be installed both on Linux or Windows.


MVC Foundation Framework (MVC-FF)


MVC-FF is composed of a set of utilities developed by Openbravo:
XmlEngine, SQLC and HttpBaseSecureServlet. MVC-FF is needed to allow the
development of decoupled files for the Model, View and Control
components of the MVC architecture.

This set of utilities has been used in the development of many
other MVC applications, and it has proven to be very efficient for the
Openbravo development team


XmlEngine


XmlEngine is a utility used to create XML/HTML documents from a
template in XML/HTML format and an XML configuration file with the
dynamic data to be inserted in the template. XmlEngine is easy to use
because the design of the template is the identical to that of the final
document desired. The input of data is made identifying the places
where data will be displayed by using standard XML/HTML attributes like
“id” or tags such as “DIV”. The configuration file maps the data source
fields with the places identified in the template. To improve
performance, the templates are read and stored in memory. When a page is
required, the template creates a document that fills with the data
provided by the application. With this tool we generate the forms for
editing a record, list a selection of records, create reports with
grouping levels or print specific forms of the application.


SQLC


SQLC (SQL Compiler) is a utility used to avoid the repetitive task of
writing Java classes to interact with the database. The input is an XML
file that contains standard SQL statements and the parameters used in
the statements. SQLC reads this file and generates a Java class that has
all the code necessary to connect to the database, execute the
statement, read the record and create standard Java types as return for
the methods.


HttpBaseServlet


HttpBaseServlet and HttpBaseSecureServlet are the servlets from which
all of the servlets of the system that implement the Control component
of MVC are derived. These servlets implement common functionalities such
as authentication, authorization, database connectivity and error
handling. The servlets deriving from HttpBaseSecureServlet make the
standard control of reading data, interacting with the database with
classes generated by SQLC and providing the output with XmlEngine.


Data Model Dictionary and WAD


The automation of code generation is achieved by using the data model
dictionary and the WAD (Wizard for Application Development). WAD
automatically generates all the files of the application with an MVC
architecture. The files that are generated use XmlEngine, SQLC and
HttpBaseSecureServlet.

The automation of code generation provides a better quality
because the files are always coded using the same rules and style. The
knowledge of the domain is contained by the model and not in manually
written code. Also, the improved functionalities implemented over time
in WAD are added to all the files when the code is regenerated without
any additional intervention.




Retrieved from "http://wiki.openbravo.com/wiki/ERP/2.40/Openbravo_2.x_architecture_description"



This page has been accessed 43,562 times. This page was last modified 09:32, 19 May 2009. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.




Category: Architecture Legacy ERP