Cyclic dependencies among "Book"(QofBook), "Instance"(QofInstance) and "Backend"(QofBackend)

John Ralls jralls at ceridwen.us
Wed Jan 6 20:22:30 EST 2016


> On Jan 6, 2016, at 4:53 PM, Agnew Casher <agnew.casher at yahoo.ca> wrote:
> 
> Hello all,
> 
> I am trying to familiarize myself with the above-mentioned dependencies
> and wanted to know if there were plans to simplify them. In particular,
> the simplification would help eliminate some of the circular
> compilation dependencies.
> 
> For example:
> "Book" should only need to depend on "Instance" (ie: through its
> "inheritance") and then "Instance" should only depend on "Backend" (ie:
> through a Factory inheritance model). The "Backend" can then deal with
> the "File/XML", "SQL", etc... data stores required by "Instance" and
> "Book".
> 
> Currently, it appears that "Backend" depends on "Book" to store its
> meta-data through "Key-Value Pair" arrays and/or Collections, including
> what could be considered "Run-Time Type Information"(RTTI). Perhaps, by
> distinguishing such meta-data from accounting-data and having the
> "Backend" deal with "Data Stores"(instead of "Book"), this may go a
> long way in simplifying the current design?

Yes, we'll clean that up as part of the C++11 rewrite.

Regards,
John Ralls



More information about the gnucash-devel mailing list