Typical project structures

The first figure displays a typical project structure for a simple project with one data source:

Simple project with one data source

  • config directory contains the configuration files, including the configuration of the business objects.

  • models directory contains the business object definitions. It is practical to collect the models of the application modules into subdirectories. In the sample these are the customers, orders and products subdirectories.

  • data-access directory contains the data access objects of the models. It mirrors the models directory.

  • lib directory contains the helper files.

The next figure shows a multi-language project with more data sources:

Multi-language project with multiple data sources

  • config directory contains the configuration files, including the configuration of the business objects.

  • models directory contains the business object definitions. The models are grouped into subdirectories by the application modules. In the sample these are the customers, orders and products subdirectories. The root of the directory contains the data helper files as well.

  • models/../{data-source} directories contain the data access objects of the models. Each data source has its own subdirectory. In the sample these are the mysql and oracle subdirectories.

  • lib directory contains the helper files.

  • locales directory contains the locale files. It is practical to group the locales by the application modules. In the sample these are the customers, orders and products subdirectories. The names of the subdirectories function as namespaces for the locale keys. For more information see Project localization page.