[Koha-devel] Restructuring C4

Colin Campbell colin.campbell at ptfs-europe.com
Wed Mar 30 17:32:27 CEST 2011


On 30/03/11 15:47, Ian Walls wrote:

> I was also able to get a Graphviz file out, showing all the package calls
> (folks may remember my keen interest in such things from KohaCon).  Running
> it through sccmap to detect cycles, I found a very long one between several
> of the modules.  About 8 packages long.
> 
> All this indicate to me that we REALLY need to start thinking about imposing
> some kind of structure on C4.  I'm thinking something with two-levels:
> 
> Level 1 :  Calls to the database, other direct interaction with stored data
> Level 2:   Calls to Level 1 functions to manipulate data
> 
> all our scripts would then be modified to call only Level 2, which would
> take care of talking to Level 1.  At the worst, a particular Level 1 package
> would be BEGuN as many times as there were Level 2 packages BEGuN in the
> script (and we could certainly do better).  It would eliminate all the
> cycles, as well.
Once we've abstracted the db to db layer, the opportunity to have a more
logically arranged set of utility classes follows and from there you
have choices of various paths to improve things. (and your approaching
what most folk would consider the starting point for a modern web
application)
> 
> I can provide access to my report for anyone who needs it, or more details
> about how I obtained it. 
I'd certainly like to see your figures and writing up the 'what you did'
to get them on the wiki would be useful, and maybe encourage the rest of
us to add some recipes.

> Whatever any of you need to keep this conversation
> going.  This is a big deal, in my opinion, and we need to start detangling
> our code before too much long, or we're going to get seriously bogged down.
I couldn't agree more. The story is all bad the current big ball of mud
makes testing difficult and doesn't abstract any complexity away
(instead it adds to it)

Colin
-- 
Colin Campbell
Chief Software Engineer,
PTFS Europe Limited
Content Management and Library Solutions
+44 (0) 845 557 5634 (phone)
+44 (0) 7759 633626  (mobile)
colin.campbell at ptfs-europe.com
skype: colin_campbell2

http://www.ptfs-europe.com


More information about the Koha-devel mailing list