general information
 - GnuCash Home Page
 - Features
 - Screenshots
 - GnuCash en Français
 - GnuCash auf deutsch
 - Download
 - Download (mirror)

developer information
 - System Architecture
 - Project Roadmap
 - Project Status
 - How to Contribute
 - Mailing List - Help
 - Mailing List - Archives
 - GnuCash Bug Tracker
 - LXR source code browser
 - Hacking GnuCash  - Required Toolkits

other information
 - Related Financial Software
 - Gnucash in the news!
 - Documentation - English
 - Documentation - Espagnol
 - Documentation - Français
 - Documentation - Português
 - Banner Ads
 - History and Credits
 - Gnumatic - Corporate Support

search gnucash.org

Sort method:

architecture overview

Architectural Overview

GnuCash is written primarily in two languages: C and Scheme. The engine/server is written in C primarily for speed, portability, stability and historical purposes. Much of the day-to-day workhorse code is written in Scheme, primarily for its power, expressiveness and ease of development. The user interface is gtk/gnome, some of it done up in C, some in scheme, and some with the GUI designer tool glade.

GnuCash is modular, thereby allowing separate individuals to maintain, develop and enhance certain modules without disturbing the overall development. (Never mind that modules help avoid spaghetti code and nasty, ugly hacks). The interfaces between modules are documented, and, for the most part, stable and unchanging. This block diagram shows major components.

GnuCash currently consists of the following modules:

The Engine

The Engine (located under the src/engine directory in the GnuCash codebase) provides an interface for creating, manipulating, and destroying three basic financial entities: Accounts, Transactions (known as Ledger Entries in accounting practice), and Splits (known as Journal Entries). These three entities are the central data structures of the GnuCash financial data model, as illustraded in this diagram.

The Engine code contains no GUI code whatsoever, and is essentially OS-neutral. It is written entirely in C.

Query

The Query module (src/engine/Query.*) provides an interface into the engine for finding transactions based on a set of criteria, such as description, date posted, account membership, etc. Simple queries can be combined using standard boolean operators.

File I/O

The File I/O module (src/engine/FileIO.*) provides an interface for reading and writing a set of Accounts, Transactions, and Splits to a binary file. This module is being deprecated. A text-based format using scheme forms is being developed as a replacement. This new module will be separate from the Engine.

The Register

The Register (src/register) implements a ledger-like GUI that allows the user to dynamically enter dates, prices, memos descriptions, etc. in an intuitive fashion that should be obvious to anyone who's used a checkbook register. The code is highly configurable, allowing the ledger columns and rows to be laid out in any way, with no restrictions on the function, type, and number of columns/rows. For example, one can define a ledger with three date fields, one price field, and four memo fields in a straightforward fashion. Cell handling objects support and automatically validate date entry, memo entry (w/auto-completion), prices, combo-boxes (pull-down menus), and multi-state check-boxes. Cells can be marked read-write, or output-only. Cells can be assigned unique colors. The currently active ledger row-block can be highlighted with a unique color.

The register code is completely independent of the engine code, knows nothing about accounting or any of the other GnuCash subsystems. It can be used in independent projects that have nothing to do with accounting.

Reports

The Reports module (src/scm/report.scm, src/scm/reports) is a scheme (guile) based system to create balance sheets, profit & loss statements, etc. by using the engine API to fetch and display data formatted in HTML.

This module is being redesigned to use the Query API to fetch the engine information instead of using the raw engine interface. The new reporting design will use Queries to extract the data and assemble it into a view-independent format. This data will then be converted to HTML reports and/or graphs such as bar and pie charts.

Graphs

The Graphs module will be a future module implementing GUI graphs such as bar and pie charts. These graphs will be interactive in that the user can, for example, move pie wedges, and 'live' in that the user will be able to click on graph subsections to see a detail graph or report of that particular subsection.

This module will be implemented using the GUPPI library being developed by Jon Trowbridge (<http://www.gnome.org/guppi>).

Price Quotes

The Price Quotes module (src/quotes) is a Perl system to fetch stock price data off the Internet and insert it into the GnuCash Engine. This module requires the functionality of the Finance::Quote module available at SourceForge. The Finance::Quote module can fetch price quotes from many different sources including Yahoo, Yahoo Europe, and some international exchanges.

The Finance::Quote module also supports fetching currency exchange rates. GnuCash will be extended to allow the fetching and use of currency exchange rates.

User Preferences

The User Preferences module (src/scm/options.scm, src/scm/prefs.scm) provides an infrastructure for defining both user-configurable and internal preferences. Preferences are defined in scheme using several predefined preference types such as boolean, string, date, etc. Preferences are 'implemented' by providing a GUI which allows the user to see and change preference values. An API is provided to query preference values and to register callbacks which will be invoked when preferences change.

Preference values which are different from the default values are stored as scheme forms in a user-specific preferences file (~/.gnucash/config.auto). This file is automatically loaded upon startup.

QIF Import

The QIF Import module (src/scm/qif-import) provides functionality for importing QIF (Quicken Interchange Format) data into GnuCash.

GnuCash

The GnuCash module (src/gnome, src/register/gnome and src/*.[ch]) is the main GUI application. It consists of a collection of miscellaneous GUI code to glue together all of the pieces above into a coherent, point-and-click whole. It is meant to be easy to use and intuitive to the novice user without sacrificing the power and flexibility that a professional might expect. When people say that GnuCash is trying to be a "Quicken or MS Money look/work/act-alike", this is the piece that they are referring to. It really is meant to be a personal-finance manager with enough power for the power user and the ease of use for the beginner.

Currently, the Gnome interface is the only operational interface. There is an obsolete Motif interface which is not maintained. The Qt code won't compile, and most/all functions are missing.



[ website hosted by Gnumatic Incorporated ]
[ email:webmaster at gnucash dot org ]