Re: [Openledger-developer] Random jottings
Brought to you by:
klavs
From: Jacques C. <ja...@ch...> - 2005-03-19 11:49:45
|
Klavs Klavsen wrote: > Perhaps you'd like to start this restructuring? > Once it is done, we can register it on CPAN :) Is this the bit where I turn out to be a flake who talks too much? Probably. :) Just spit balling a rough hierarchy (someone with more accounting nous would be a help in this bit) Business::Accounts:: Account ::Group ::Payable ::Receivable Chart Invoice Quote Order Transaction User ... Ledger:: Driver:: SQL-Ledger GNU-Cash ... In particular, the Ledger module (or Storage, or Backend, or whatever it should be called) would provide a generic interface for storage. So: Account ...Ledger ...Driver::SQL-Ledger | | | | | | ->commit() | | | | | +------------>commit($self) | | | | | +--------------->commit($account) . . . Most of the magic involved in a driver is mapping the internal data of a given object to its particular backend. For SQL-Ledger that would involve, one can suppose, direct intervention with the database. For GNU cash it would spit out XML, and so on. The later advantage of this overall approach is that it would provide a rough n ready migration path between accounting tools. Load data from system A, switch drivers, commit everything to B. Some of this might reusable from existing persistence frameworks. OpenInteract relies on SPOPS, but there are other ones around (like Class::DBI). JC. |