Difference between revisions of "GEPS 008: File Organization"
(Updates to src/gui organization after comments from Benny.) |
m (Gramps_4.x_File_Organization) |
||
(37 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | + | Finished: Gramps 4.0 (See [[Gramps 4.x File Organization]]) | |
+ | |||
+ | Gramps was originally written as a GTK application intended to only be used in a graphical environment. Over time, support has been added for other user interfaces (CLI and web). In order to reduce unnecessary dependencies between the various interfaces, the software architecture is being organized into 5 main categories of code - each in their own directory. | ||
+ | |||
+ | The descriptions below provide the general purpose and scope of each category. | ||
== src/gen/ == | == src/gen/ == | ||
− | This directory contains the core components of Gramps. The src/gen/ directory shall not have any dependencies on the other top level source directories (src/gui/, src/cli/, src/ | + | This directory contains the core components of Gramps. The src/gen/ directory shall not have any dependencies on the other top level source directories (src/gui/, src/cli/, src/webapp/, etc). The src/gen/ directory also shall not have any dependencies on the gtk library. |
+ | |||
+ | The word "gen" was chosen because it is short for "general" and "generic" which is a good way to describe code in this directory because it doesn't depend on or require a specific user interface. "gen" is also short for "genealogy" which is also an appropriate term for the code in this directory because it implements the "business logic" that makes Gramps a genealogy application. | ||
+ | |||
+ | === src/gen/datehandler/ === | ||
+ | The datehandler directory contains the code for handling dates in different locales. | ||
=== src/gen/db/ === | === src/gen/db/ === | ||
The db directory contains the code for manipulating the Gramps database. | The db directory contains the code for manipulating the Gramps database. | ||
+ | |||
+ | === src/gen/display/ === | ||
+ | The display directory contains business logic for displaying database objects in textual form. For example, localized date display and name display code. | ||
+ | |||
+ | === src/gen/filters/ === | ||
+ | The filters directory contains the code for filtering objects. | ||
+ | |||
+ | ==== src/gen/filters/rules ==== | ||
+ | The rules directory contains the code for rules used by the filters. The rules are divided into sub-directories according to primary object type: | ||
+ | * src/gen/filters/rules/citation | ||
+ | * src/gen/filters/rules/event | ||
+ | * src/gen/filters/rules/family | ||
+ | * src/gen/filters/rules/media | ||
+ | * src/gen/filters/rules/note | ||
+ | * src/gen/filters/rules/person | ||
+ | * src/gen/filters/rules/place | ||
+ | * src/gen/filters/rules/repository | ||
+ | * src/gen/filters/rules/source | ||
=== src/gen/lib/ === | === src/gen/lib/ === | ||
The lib directory contains the classes for the database objects. | The lib directory contains the classes for the database objects. | ||
+ | |||
+ | === src/gen/merge/ === | ||
+ | The merge directory contains the classes for merging database objects. | ||
+ | |||
+ | === src/gen/mime/ === | ||
+ | The mime directory contains the code for handling mime types in Gramps. | ||
=== src/gen/plug/ === | === src/gen/plug/ === | ||
The plug directory contains the core logic for registering and running plugins. It also contains any utility classes used by plugins. | The plug directory contains the core logic for registering and running plugins. It also contains any utility classes used by plugins. | ||
− | === src/gen/ | + | ==== src/gen/plug/report/ ==== |
− | + | This directory contains the base class for reports, constants, and basic utilities. | |
+ | |||
+ | === src/gen/proxy/ === | ||
+ | This directory contains classes to provide proxy access to the Gramps database. | ||
+ | |||
+ | === src/gen/simple/ === | ||
+ | This directory contains classes to provide simple access the Gramps database and reports. | ||
− | === src/gen/ | + | === src/gen/utils/ === |
− | + | This directory contains utility functions. | |
== src/gui/ == | == src/gui/ == | ||
This directory contains the code for the desktop graphical user interface. Any file that imports GTK or glade should live in this directory or a subdirectory of this directory. | This directory contains the code for the desktop graphical user interface. Any file that imports GTK or glade should live in this directory or a subdirectory of this directory. | ||
− | === src/gui/ | + | === src/gui/editors/ === |
− | This directory contains the code for the | + | This directory contains the code for the object editors used in the GUI. |
+ | |||
+ | ==== src/gui/editors/displaytabs/ ==== | ||
+ | This directory contains the code for the tabs used in the GUI editors. | ||
− | === src/gui/ | + | === src/gui/filters/ === |
− | This directory contains the code for | + | This directory contains the code for the GUI filter interface. |
− | === src/gui/ | + | ==== src/gui/filters/sidebar ==== |
− | This directory contains the code for | + | This directory contains the code for the GUI sidebar filters. |
− | === src/gui/ | + | === src/gui/glade/ === |
− | This directory contains | + | This directory contains Glade user interface definition files. |
− | === src/gui/ | + | === src/gui/logger/ === |
− | This directory contains the code for | + | This directory contains the code for GUI error logging and reporting. |
=== src/gui/merge/ === | === src/gui/merge/ === | ||
This directory contains the code for merging objects in the GUI. | This directory contains the code for merging objects in the GUI. | ||
+ | |||
+ | === src/gui/plug/ === | ||
+ | The gui.plug directory contains windows, dialogs, and tools that the plugins will use. | ||
+ | |||
+ | ==== src/gui/plug/export ==== | ||
+ | This directory contains the GUI code for running export plugins. | ||
+ | |||
+ | ==== src/gui/plug/quick ==== | ||
+ | This directory contains the GUI code for running quick view plugins. | ||
+ | |||
+ | ==== src/gui/plug/report ==== | ||
+ | This directory has the dialogs for running reports, such as selection criteria, file pickers, and paper sizes. | ||
+ | |||
+ | === src/gui/selectors/ === | ||
+ | This directory contains the code for the object selection dialogs in the GUI. | ||
+ | |||
+ | === src/gui/views/ === | ||
+ | This directory contains the code for the various graphical "views" in the GUI. | ||
+ | |||
+ | ==== src/gui/views/treemodels/ ==== | ||
+ | This directory contains the code for the models used in the GUI. | ||
=== src/gui/widgets/ === | === src/gui/widgets/ === | ||
Line 46: | Line 109: | ||
This directory contains the code for the command line interface. | This directory contains the code for the command line interface. | ||
− | == src/ | + | == src/webapp/ == |
This directory contains the code for the gramps-connect web interface. | This directory contains the code for the gramps-connect web interface. | ||
Line 54: | Line 117: | ||
=== src/plugins/docgen/ === | === src/plugins/docgen/ === | ||
This directory contains all the document generator plugins. | This directory contains all the document generator plugins. | ||
+ | |||
+ | === src/plugins/drawreport/ === | ||
+ | This directory contains all the graphical report plugins. | ||
+ | |||
+ | === src/plugins/export/ === | ||
+ | This directory contains all the export plugins. | ||
=== src/plugins/gramplet/ === | === src/plugins/gramplet/ === | ||
This directory contains all the gramplet plugins. | This directory contains all the gramplet plugins. | ||
+ | |||
+ | === src/plugins/graph/ === | ||
+ | This directory contains all the graph report plugins. | ||
+ | |||
+ | === src/plugins/import/ === | ||
+ | This directory contains all the import plugins. | ||
+ | |||
+ | === src/plugins/lib/ === | ||
+ | This directory contains shared library code for Gramps plugins. | ||
+ | |||
+ | === src/plugins/mapservices/ === | ||
+ | This directory contains all the map service plugins. | ||
+ | |||
+ | === src/plugins/quickview/ === | ||
+ | This directory contains all the quickview plugins. | ||
+ | |||
+ | === src/plugins/rel/ === | ||
+ | This directory contains the relationship calculator plugins. | ||
+ | |||
+ | === src/plugins/sidebar/ === | ||
+ | This directory contains all the navigation sidebar plugins. | ||
+ | |||
+ | === src/plugins/textreport/ === | ||
+ | This directory contains all the text report plugins. | ||
=== src/plugins/tool/ === | === src/plugins/tool/ === | ||
This directory contains all the tool plugins. | This directory contains all the tool plugins. | ||
− | === src/plugins/ | + | === src/plugins/view/ === |
− | This directory contains all the report plugins. | + | This directory contains all the view plugins. |
+ | |||
+ | === src/plugins/webreport/ === | ||
+ | This directory contains all the web report plugins. | ||
+ | |||
+ | === src/plugins/webstuff/ === | ||
+ | This directory contains plugins providing web resources. | ||
+ | |||
+ | == Related Gramps Bugs == | ||
+ | * #{{bug|2622}}: File Organization (GEPS 008) | ||
+ | * #{{bug|4646}}: reports cannot be run from the command line in a non-GUI environment | ||
+ | * #{{bug|2621}}: use python-setuptools instead of make (See [[GEPS 026: Replace 'make' for Gramps build]]) | ||
[[Category:GEPS|F]] | [[Category:GEPS|F]] |
Revision as of 01:18, 15 February 2014
Finished: Gramps 4.0 (See Gramps 4.x File Organization)
Gramps was originally written as a GTK application intended to only be used in a graphical environment. Over time, support has been added for other user interfaces (CLI and web). In order to reduce unnecessary dependencies between the various interfaces, the software architecture is being organized into 5 main categories of code - each in their own directory.
The descriptions below provide the general purpose and scope of each category.
Contents
- 1 src/gen/
- 2 src/gui/
- 3 src/cli/
- 4 src/webapp/
- 5 src/plugins/
- 5.1 src/plugins/docgen/
- 5.2 src/plugins/drawreport/
- 5.3 src/plugins/export/
- 5.4 src/plugins/gramplet/
- 5.5 src/plugins/graph/
- 5.6 src/plugins/import/
- 5.7 src/plugins/lib/
- 5.8 src/plugins/mapservices/
- 5.9 src/plugins/quickview/
- 5.10 src/plugins/rel/
- 5.11 src/plugins/sidebar/
- 5.12 src/plugins/textreport/
- 5.13 src/plugins/tool/
- 5.14 src/plugins/view/
- 5.15 src/plugins/webreport/
- 5.16 src/plugins/webstuff/
- 6 Related Gramps Bugs
src/gen/
This directory contains the core components of Gramps. The src/gen/ directory shall not have any dependencies on the other top level source directories (src/gui/, src/cli/, src/webapp/, etc). The src/gen/ directory also shall not have any dependencies on the gtk library.
The word "gen" was chosen because it is short for "general" and "generic" which is a good way to describe code in this directory because it doesn't depend on or require a specific user interface. "gen" is also short for "genealogy" which is also an appropriate term for the code in this directory because it implements the "business logic" that makes Gramps a genealogy application.
src/gen/datehandler/
The datehandler directory contains the code for handling dates in different locales.
src/gen/db/
The db directory contains the code for manipulating the Gramps database.
src/gen/display/
The display directory contains business logic for displaying database objects in textual form. For example, localized date display and name display code.
src/gen/filters/
The filters directory contains the code for filtering objects.
src/gen/filters/rules
The rules directory contains the code for rules used by the filters. The rules are divided into sub-directories according to primary object type:
- src/gen/filters/rules/citation
- src/gen/filters/rules/event
- src/gen/filters/rules/family
- src/gen/filters/rules/media
- src/gen/filters/rules/note
- src/gen/filters/rules/person
- src/gen/filters/rules/place
- src/gen/filters/rules/repository
- src/gen/filters/rules/source
src/gen/lib/
The lib directory contains the classes for the database objects.
src/gen/merge/
The merge directory contains the classes for merging database objects.
src/gen/mime/
The mime directory contains the code for handling mime types in Gramps.
src/gen/plug/
The plug directory contains the core logic for registering and running plugins. It also contains any utility classes used by plugins.
src/gen/plug/report/
This directory contains the base class for reports, constants, and basic utilities.
src/gen/proxy/
This directory contains classes to provide proxy access to the Gramps database.
src/gen/simple/
This directory contains classes to provide simple access the Gramps database and reports.
src/gen/utils/
This directory contains utility functions.
src/gui/
This directory contains the code for the desktop graphical user interface. Any file that imports GTK or glade should live in this directory or a subdirectory of this directory.
src/gui/editors/
This directory contains the code for the object editors used in the GUI.
src/gui/editors/displaytabs/
This directory contains the code for the tabs used in the GUI editors.
src/gui/filters/
This directory contains the code for the GUI filter interface.
src/gui/filters/sidebar
This directory contains the code for the GUI sidebar filters.
src/gui/glade/
This directory contains Glade user interface definition files.
src/gui/logger/
This directory contains the code for GUI error logging and reporting.
src/gui/merge/
This directory contains the code for merging objects in the GUI.
src/gui/plug/
The gui.plug directory contains windows, dialogs, and tools that the plugins will use.
src/gui/plug/export
This directory contains the GUI code for running export plugins.
src/gui/plug/quick
This directory contains the GUI code for running quick view plugins.
src/gui/plug/report
This directory has the dialogs for running reports, such as selection criteria, file pickers, and paper sizes.
src/gui/selectors/
This directory contains the code for the object selection dialogs in the GUI.
src/gui/views/
This directory contains the code for the various graphical "views" in the GUI.
src/gui/views/treemodels/
This directory contains the code for the models used in the GUI.
src/gui/widgets/
This directory contains widgets used by the GUI
src/cli/
This directory contains the code for the command line interface.
src/webapp/
This directory contains the code for the gramps-connect web interface.
src/plugins/
This directory contains all the plugins for Gramps.
src/plugins/docgen/
This directory contains all the document generator plugins.
src/plugins/drawreport/
This directory contains all the graphical report plugins.
src/plugins/export/
This directory contains all the export plugins.
src/plugins/gramplet/
This directory contains all the gramplet plugins.
src/plugins/graph/
This directory contains all the graph report plugins.
src/plugins/import/
This directory contains all the import plugins.
src/plugins/lib/
This directory contains shared library code for Gramps plugins.
src/plugins/mapservices/
This directory contains all the map service plugins.
src/plugins/quickview/
This directory contains all the quickview plugins.
src/plugins/rel/
This directory contains the relationship calculator plugins.
src/plugins/sidebar/
This directory contains all the navigation sidebar plugins.
src/plugins/textreport/
This directory contains all the text report plugins.
src/plugins/tool/
This directory contains all the tool plugins.
src/plugins/view/
This directory contains all the view plugins.
src/plugins/webreport/
This directory contains all the web report plugins.
src/plugins/webstuff/
This directory contains plugins providing web resources.
Related Gramps Bugs
- #2622: File Organization (GEPS 008)
- #4646: reports cannot be run from the command line in a non-GUI environment
- #2621: use python-setuptools instead of make (See GEPS 026: Replace 'make' for Gramps build)