Introduction
简介
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).
本文档简要描述了openbravo源代码项目的结构。ob erp
项目主要由三个核心部分(xmlengine,sqlc和httpbaseServlet)以及ERP项目的wad词典(forms,
reports, call-outs, combos, work-flows, processes and so on)等构成。
Project Structure
项目结构
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
build
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为 ant任务编译后java文件的目标文件夹,此目录包含由src目录的java源码以及由sqlc模块解析*.xsql文件生成的java 类文件。
|-build
|-classes
|-org
...
|-javasqlc
|-src
|-srcAD
config
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目录包含一些配置文件。安装过程中一些安装文件会被下载到此目录,安装过程中会生成几个配置文件(Openbravo.properties,log4j.lcf and quartz.properties)在这里。
|-config
|-log4j.lcf
|-Openbravo.properties
|-quartz.properties
|-...
docs
The docs directory contains Openbravo's API documentation, which can be generated using the Javadoc tool.
docs 为文档目录。
legal
The legal directory contains a collection of licenses for the various libraries that Openbravo ERP utilizes.
legal为一些协议文件目录。
lib
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为一些类库的目录。ob 的类库被分为两大类:编译时类库和运行时类库,分别在build和runtime目录中。
|-lib
|-build
|-runtime
modules
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目录存放一些安装或开发的模块。每个模块的顶级文件夹的命名类似于模块描述信息。所有的模块都会被导出到此目录。
|-modules
|-org.openbravo.examples.helloworld
|-src
...
|-src-db
|-database
|-model
|-sourcedata
Above is the structure of the sample hello world module.
referencedata
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目录放置一些特定的参考数据。例如:xxx 等。此模块可以比较方便将一些参考数据导入到openbravo ERP系统中。
referencedata
|-importclient
|-sampledata
|-standard
src
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目录是openbravo erp系统的主要源代码目录。很多核心模块和服务(web程序、表单、报表 等等)都是由此构建而来的。
|-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.
src-core
The src-core directory contains the source code of the core components:
XmlEngine (View), SQLC (Model), HttpBaseServlet (Controller) and
ConnectionPool.
src-core 目录包含MVC架构核心组件(xmlengine,vsqlc,httpservelt)的源代码。
|-src-core
|-src
|-org
|-openbravo
|-base
...
|-HttpBaseServlet.java
|-HttpBaseUtils.java
...
|-data
|-Sqlc.java
|-database
|-ConnectionPool.java
|-exception
|-uriTranslation
|-utils
|-xmlEngine
阅读(1334) | 评论(0) | 转发(0) |