Setting up gnucash to use postgesql back end - close but no cigar ...

Jan Steinman Jan at ecoreality.org
Tue Mar 10 21:22:35 EDT 2015


On 2015-03-10, at 17:08, John Ralls wrote:

> 
>> On Mar 11, 2015, at 2:04 AM, Jan Steinman <Jan at ecoreality.org> wrote:
>> 
>>> From: John Ralls <jralls at ceridwen.us>
>>> 
>>> ... once we switch to using SQL as the internal data representation...
>> 
>> be_still(heart);
>> 
>> I *really* want an inter-operable SQL back-end. I can almost taste it.
>> 
>> I looked at the current data model (in MySQL), and it looks like... it's not really a data model. More like a general data dump (slots table). Perhaps I could be of assistance.
> 
> Hmm. Interoperable with what?
> 
> Yes, it's true that the current schema is just a persistence of GnuCash's internal representation. That's pretty standard for business applications if my reading of Fowler's "Patterns of Enterprise Application Architecture" is correct. In any case it's not likely to change: All of the business logic is likely to stay in GnuCash rather than move to the database.

The purpose of a data model is to *divorce* data representation and its manipulation from the user interface. It increases cohesion and reduces coupling.

I see Fowler (et. al.) seem to be heavily influenced by Reenskaug, Goldberg, Krasner, et. al. in this regard -- they even have a chapter on "Model, View, Controller," which was originally a Smalltalk concept, invented by Reenskaug.

The purpose behind MVC is to focus on getting the data model right, so that multiple Views (which is NOT the same as a "view" in SQL) could present it in different ways, and different Controllers could manipulate it in different ways.

If "the business logic is likely to stay in GnuCash," then how the heck will you ever get it to be multi-user? Or is that not an important goal?

If I may, I'd suggest that the data model should be capable of being driven independently of the View and Controller. That's been my "gold standard" during 20 years of object-relational consulting practice. But few of my clients ever got completely there... :-)

:::: Some days I wonder if it might not be better to culturally engineer humans to enjoy small scale garden farming than to genetically engineer weeds to save large scale agribusiness. -- Gene Logsdon
:::: Jan Steinman, EcoReality Co-op ::::




More information about the gnucash-user mailing list