Query Object Framework

Introduction

QOF, the Query Object Framework, provides a set of C Language utilities for performing generic structured complex queries on a set of data held by a set of C/C++ objects. This framework is unique in that it does NOT require SQL or any database at all to perform the query. Thus, it allows programmers to add query support to their applications without having to hook into an SQL Database.

Typically, if you have an app, and you want to add the ability to show a set of reports, you will need the ability to perform queries in order to get the data you need to show a report. Of course, you can always write a set of ad-hoc subroutines to return the data that you need. But this kind of a programming style is not extensible: just wait till you get a user who wants a slightly different report.

The idea behind QOF is to provide a generic framework so that any query can be executed, including queries designed by the end-user. Normally, this is possible only if you use a database that supports SQL, and then only if you deeply embed the database into your application. QOF provides simpler, more natural way to work with objects.


Subversion access

svn co svn+ssh://username@svn.debian.org/svn/qof/ qof

svn co svn://svn.debian.org/svn/qof/ qof

To just check out the debian source:

svn co svn://svn.debian.org/svn/qof/trunk/debian qof


Examples

Generating examples of your own

qof-gen

Writing new QOF objects and examples can be a tad repetitive so QOF generator automates the process using HTML forms and PHP. The generator is still new but it does create usable C code and an example program that can be compiled against current QOF SVN.

Using qof-generator with common front-end code

A second role for qof-generator involves providing a central repository for common front-end code that cannot go into QOF itself. Unlike backends, it seems strange to make a front-end into a GModule (although it can probably be done) and front-ends require dependencies that simply do not fit with the wider remit of the libqof1 library. So qof-main.c|h and qof-shell.c|h will be updated from qof-generator so that each project can benefit from improvements made elsewhere.


Documentation

The API documentation is embedded in the header files and can be viewed as HMTL.


Support

Support should be obtained by subscribing to the mailing list: http://lists.alioth.debian.org/mailman/listinfo/qof-devel.

Archives are available at: http://lists.alioth.debian.org/pipermail/qof-devel/


Origins

QOF is an offshoot from the GnuCash Project, where this framework is a deep, central component. QOF is basically the ?GnuCash "engine" with all of the financial objects removed. As such, QOF is "tried and true", and has proven its worth.


Function

Besides the query framework, QOF also provides a number of other base functions from ?GnuCash and a few extensions of its own:


Project Goals

Below are some concrete project goals.

See "Why QOF?" for the more abstract ideas behind QOF, including the relationships between "database-driven", "program-driven" and "data-centric" programming explored at Data-Freedom.org.


Downloads

?SourceForge

The source code release for v0.7.5 is available from ?SourceForge. The next release will be made from Alioth.

Debian

Packages are available in unstable, testing and stable.

Ubuntu

All releases since Dapper have included QOF. Feisty is the first to include v0.7 or later.

Gentoo

QOF 0.7.4 is available in the official repository of Gentoo Linux.

RPM packages

There is a sample .spec file available in QOF CVS, available via SourceForge. RPM packages have been prepared for v0.6.4 in Fedora 4 and 5 as well as ?OpenSuSE Factory.

Mac OSX & Fink

Packages are also possible for Fink and ?DarwinPorts (Mac OSX) - a sample Finkinfo file is provided in QOF CVS via SourceForge.


Project Status

This code is in active, daily use in several projects and is 'stable' code. See the roadmap for the current development direction.

Some projects currently using QOF are:


Written by Linas Vepstas <linas@linas.org> April 2004

Last updated by Neil Williams <linux@codehelp.co.uk> December 2007.


WikiLink

This site is powered by ikiwiki.