ERP 2.50:Developers Guide/Concepts/Development Project Structure
This document describes the structure of an Openbravo ERP development project. Openbravo ERP has a tree directory structure that logically divides different core components (XmlEngine, SQLC, HttpBaseServlet) and WAD (Wizard for Application Dictionary) from the ERP itself (forms, reports, call-outs, combos, work-flows, processes and so on).
The following image provides a snapshot of the Openbravo ERP development project structure.
openbravo |-build |-config |-database |-docs |-legal |-lib |-modules |-referencedata |-src |-src-core |-src-db |-src-diagnostics |-src-gen |-src-test |-src-trl |-src-wad |-srcAD |-srcClient |-temp |-web |-WebContent
The build directory is where all of the compiled Java classes are copied after executing the ant compilation build tasks. Here you can see that the typical classes directory is present, containing all of the compiled Java class files from the src folder. Also, the Java source code that is generated from the applications *.xsql files during the sqlc phase of the project build.
|-build |-classes |-org ... |-javasqlc |-src |-srcAD
The config directory contains the Openbravo ERP configuration files. The config directory is where the setup script is downloaded to and executed from. Other configuration files in the config directory include the application properties file, Openbravo.properties, which is generated after running the setup process, and logging and scheduling properties files (log4j.lcf and quartz.properties).
|-config |-log4j.lcf |-Openbravo.properties |-quartz.properties |-...
The docs directory contains Openbravo's API documentation, which can be generated using the Javadoc tool.
The legal directory contains a collection of licenses for the various libraries that Openbravo ERP utilizes.
The lib directory contains all of the Java jar libraries used throughout the application. It is split into build and runtime, build containing the libraries used during compilation of Openbravo ERP, and runtime containing the jar files that are used during the application's execution.
|-lib |-build |-runtime
The modules directory is where any modules that you may have installed or developed are located. Each module has a top level directory named according to the Java package specified in its module description, and then below, a similar layout to the core development structure, which is in itself a module. When developing a module in the application dictionary, when the module is exported, it will be exported here to the modules directory.
|-modules |-org.openbravo.examples.helloworld |-src ... |-src-db |-database |-model |-sourcedata
Above is the structure of the sample hello world module.
The referencedata directory contains implementation specific reference data such as accounting structures, reports, product lists or price lists etc. Reference data modules are a convenient way to load reference data into Openbravo ERP.
referencedata |-importclient |-sampledata |-standard
The src directory is the top level directory of the main source code base for the Openbravo ERP project. It contains the source code for all of the components that make up the core Openbravo web application and services, including forms, reports, call-outs, combos, Data Access Layer (DAL), processes, manual windows, xsql and HTML files, reports etc.
|-src |-org |-openbravo |-authentication |-base |-dal |-erpCommon |-ad_actionButton |-ad_background |-ad_callouts ... |-ad_reports |-erpReports |-scheduling |-services
The ad_ prefix (in erpCommon folders/packages) denotes Application Dictionary. The directory name endings are pretty much self-explanatory. The difference between ad_reports and erpReports lays in the way we access a report within the application. If it's accessible directly through the menu, then it should be in ad_reports. On the other hand some windows (Invoices, orders, etc.) have a Print icon in the toolbar, which generates a report. These reports should be stored in erpReports.
The src-core directory contains the source code of the core components: XmlEngine (View), SQLC (Model), HttpBaseServlet (Controller) and ConnectionPool.
|-src-core |-src |-org |-openbravo |-base ... |-HttpBaseServlet.java |-HttpBaseUtils.java ... |-data |-Sqlc.java |-database |-ConnectionPool.java |-exception |-uriTranslation |-utils |-xmlEngine
The src-db directory contains all of the source code required to create the dbmanager.jar file. It also contains the database directory which is where all of the model data (structure: tables, constraints, procedures and triggers), sample data (Openbravo ERP data such as products, business partners and so on) and source data (windows and tabs metadata) in plain *.xml files are located.
|-src-db |-build |-database |-lib |-model |-sourcedata |-docs |-src |-com |-openbravo |-db
The src-diagnostics directory contains the code/tool to execute a diagnostic test on your configuration and report any problems or items you have not configured correctly. The diagnostic tool is executed using the ant diagnostic task from the root openbravo directory.
diagnostics |-build |-config |-src |-WebContent
The src-gen directory contains the DAL model objects generated from the Openbravo model (tables, columns, references etc.) the during the ant generate.entities task.
src-gen |-org |-openbravo |-model |-ad_access |-ad_alert |-ad_datamodel |-ad_domain
The src-test directory contains the test source code, such as JUnit test and suites.
src-test |-org |-openbravo |-test |-ant |-base |-dal |-expression ...
The src-trl directory contains the source code of the translator.
|-src-trl |-src |-org |-openbravo |-translate
The src-wad directory contains the source code of WAD (Wizard for Application Dictionary).
|-src-wad |-src |-org |-openbravo |-wad
The srcAD directory contains all of the automatically generated code from the Application Dictionary.
Temporary folder containing files which are not committed to Mercurial.
web |-images |-js |-popups |-skins
Is the web output folder for Eclipse, the output folder defines the webapp used by the Eclipse Tomcat integration. Contains WEB-INF (with web.xml and other important files) and META-INF.
ERP 2.50:Developers Guide/Concepts/Development Build Tasks | ERP 2.50:Developers Guide/Concepts/Common Fundamentals