Structured projects
A structured project starts with a default logical structure in the Projects view and a default physical structure on disk.
The exact structure depends on the type of project. Is it a desktop or mobile project? Are you generating your application using the Business Application Modeler (BAM)?
Structured projects: the logical structure in Project Manager
When you create a structured project, the Projects view displays a default structure of group, application, library, and packaging nodes. Figure 1 shows the default Projects view for a new Genero BAM Desktop project, while Figure 2 shows the default Projects view for a new Genero BAM Mobile project.
Table 1 provides the guidelines as to which files should be saved to each of the Project nodes.
Node | What should it contain |
---|---|
Application | The Application node is intended to hold application source files. At a minimum, it must hold
the source file that contains the MAIN function. These files are
.4gl files.For BAM structured projects, this node can also have the implemented program file (.4prg) from a Business Application diagram. |
Applicationflow | The Applicationflow node is intended for Business Application diagrams
(.4ba ). This node is created for BAM projects only. |
Config | The Config node is intended for configuration files, such as the FGLPROFILE
file.The exception is external application configuration files for use with the Genero Application Server and the Genero Browser Client. That configuration file should be saved in the Resources node. |
Database | The Database node contains no files when the structured project is first created. It is intended for database and database meta-schema files, such as those ending with a .db or .4dbx extension. |
Entities | The Entities node is intended for entities, such as form files. This includes form files (.4fd) that you created or import, as well as the form files that you implement from a Business Application diagram. For example, a CRUD form (.4fdm) can be saved into this node. |
Resources | The Resources node is intended for XML files that define user interface items, such as
presentation style files (.4st), toolbars (.4tb), topmenus
(.4tm), action defaults files (.4ad), and start menus
(.4sm). It is also intended for the XML-based external application configuration files (.xcf). |
Test | The Test application node contains no files when the structured project is first created. It
is intended for a test scenario file (.4gl). Dependencies for the node include
the Application node of the application being tested, and the Command line
arguments property include the minimum command line arguments necessary for running a
test scenario. For more information, see GUI Testing. |
Structured projects: the physical structure on disk
When you create a new structured project, you must provide the location of the project's root directory as part of the creation process. From this root directory, a set of sub-directories are created, with each directory intended for a specific set of files.
For example, Figure 3 displays the directory structure on disk for a BAM mobile project created in the MySandbox\new_BAM_mobile_project\ directory. A BAM desktop project will have a similar directory structure.
The specifics of the directory structure can vary based on the project type. Table 2 outlines the content of these directories.
Directory | Files to be saved to this directory |
---|---|
appflow (BAM projects only) | .4ba diagram. |
config | fglprofile, application configuration files (.xcf) |
database | sqlite file, meta-schema diagram |
databaseMaintenance | Database creation or update scripts |
images | Image files, .ttf fonts and the mapping of these fonts (image2font.txt) |
resources | Resource files, to include presentation style (.4st), toolbar (.4tb), topmenu (.4tm), startmenu (.4sm), and action defaults (.4ad) files. |
src | Genero source files, to include source code (.4gl), form (.4fd, .4fdm, and so on), and text-based form (.per) files. |
tests | GGC test scenarios (.4gl) |
webcomponents | Web component supporting files (.wcsettings, associated image files) |
After you build the project, new bin directories are created to hold the compiled files.
Directory | Files to be saved to this directory |
---|---|
bin | Compiled executables |
dbbin | Default target directory for database creation or update scripts. This directory is created for Genero BAM Desktop projects only. |
distbin | Genero archive files (.gar), package files, files to support OTA installation of mobile projects |
testbin | Default target directory for GGC test scenarios |
Managing TTF fonts
Structured projects are designed to manage the deployment of customer .ttf fonts and the mapping of these fonts. An empty image2font.txt file is written to the images directory, and the Images node has both *.ttf and image2font.txt listed in the list of files to include (set by the Include Files property).
For additional information, see the Fonts section in the Genero Business Development Language User Guide