[Koha-devel] Restructuring C4

Henri-Damien LAURENT laurenthdl at alinto.com
Thu Mar 31 14:20:50 CEST 2011


2011/3/31 Galen Charlton <gmcharlt at gmail.com>

> Hi,
>
>
> 2011/3/30 Ian Walls <ian.walls at bywatersolutions.com>:
> > 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
>
> Thanks for doing the analysis.  Regarding the overall project of
> restructuring C4, I suggest a slightly different way of looking at it:
> *not* restructuring C4 as such, but using it as a springboard for its
> successor.
>
> In other words, we'd still be creating a better structure, just in a
> different namespace.  Let's pick a name randomly for that namespace.
> I reach into my hat and pull out ... "Koha".  Fancy that. :)
>
> The Koha namespace would be for Perl modules that meet the following
> mandatory conditions:
>
> - usable by mod_perl (or its equivalent)
> - export the minimum number of routines necessary
> - follow stricture, warnings, documentation, and test case standards
> - separating data access methods from business logic
>
> and preferably the following optional conditions:
>
> - purely OO
>
> Obviously, the conditions and whether they would be mandatory or
> optional is a topic for discussion.
>
> Modules in C4 could use (and would be encouraged to use) routines in
> the Koha namespace.  Modules in Koha could not in general use C4
> modules; any C4 module that was safe to be depended on by a Koha
> module would be a candidate for being renamed to Koha.
>
> The advantage of carving out a new namespace is that it doesn't
> require that we refactor the entirety of C4 to support persistance or
> to untangle the dependency tree.  Instead, the only C4 code we would
> have to reimplement for the Koha namespace right away would be
> authentication, basic session management, and basic output.

About authentication and basic session management, I would advise to use
Plack::Middlewares  (Plack::Middleware::Authen) instead of re building our
own modules.
This would allow to be much more adaptive.
There is also a middleware for session management iirc.



>  That,
> along with data access using DBIx::Class, would allow us to start
> using mod_perl right away for specific functions.  One example of
> something that would then be easy to transform to a service running
> under mod_perl would be the unapi and OAI-PMH services.  As
> functionality gets detangled from C4 and moved into Koha, we can
> increase the number of services running under mod_perl while still
> keeping the CGI scripts that still depend on C4.
>
> Regards,
>
> Galen
>
>
-- 
--
Henri-Damien LAURENT
BibLibre SARL
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
tel : +33 4 67 65 75 50
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20110331/35e4c3c0/attachment.htm>


More information about the Koha-devel mailing list