Gnu-cash with Java

marthter marthter at yahoo.ca
Sat Jul 26 14:39:03 CDT 2003


Derek Atkins wrote:

>marthter <marthter at yahoo.ca> writes:
>  
>
>>I'm guessing here, but if you set up GnuCash with the Postgres
>>database as the back-end data store, it seems to me that it should be
>>possible to write other front-ends (including Java) that just use ODBC
>>access to manipulate accounts and transactions.  Of course you would
>>have to learn enough about the GnuCash data models to make sure any
>>data you changed from your front-end remained consistent so it would
>>still be useable from the normal GnuCash UI too.
>>
>>On the other hand, if that data model is very complicated, it may be
>>hard to consistently SQLify your transactions in there yourself
>>without corrupting the data.  In that case, the bindings idea is
>>probably better because you could just call the GnuCash functions and
>>let GnuCash worry about keeping the data internally consistent.
>>    
>>
>
>IMHO, you're better off creating a JNDI interface around the GnuCash
>API.  The data model is complex enough that accessing the sql database
>under gnucash is "not supported" because you are very likely to
>break some of the invariants.
>  
>
Hi Derek,

Thanks for the more-informed viewpoint on this question.  I have 
actually been thinking of trying something like this for a large 
customer of mine.

If I was to go the JNDI route, that should work independently of which 
back-end was installed, right?

If I was to go the SQL database route, (even though it is not 
supported), is there any documentation (or even just comments in the 
code) as to what the invariants are, so I would know which invariants 
not to break?

Cheers.

~Martin




More information about the gnucash-user mailing list