[Koha-devel] Replacement of C4::SQLHelper by DBIx::Class

Yohann Dufour yohann.dufour at biblibre.com
Mon Jul 7 15:23:59 CEST 2014


Yes, I think the use of DBIx::Class::ResultClass::HashRefInflator is a 
good way for a smooth transition to DBIx::Class.

However, my current working concerns only the replacement of the module 
SQLHelper by DBIx::Class, so I don't know if I could help the community 
to update all the koha code with DBIx::Class ...
But, If I have some question about DBIx::Class, I wouldn't hesitate to 
ask you some help.

Yohann


Le 02/07/2014 20:39, Kyle Hall a écrit :
> So far I think the patches are excellent. The use of 
> DBIx::Class::ResultClass::HashRefInflator is a great way to move to 
> using DBIx::Class in our modules without the need to rework all the 
> calling code to make use of dbic objects.
>
> For long term goals I see the following steps leading us to the most 
> efficient use of dbic:
> 1) Replace all DBI deletes with DBIC
> 2) Replace all DBI updates with DBIC
> 3) Replace all DBI selects with DBIC using HashRefInflator
> 4) Eliminate simple module subs that do CRUD, switch to using DBIC 
> from scripts
> 5) Move logic out of our perl modules and into our Result classes, and 
> create custom ResultSet classes for operations affecting multiple rows
>
> This course of action will lead to much more DRY code, and mean fewer 
> bugs in the long run. Mandatory unit tests are also a given.
>
> In summary, keep up the good work Yohann! Feel free to contact me 
> personally for any assistance I may provide you!
>
> Kyle
>
> http://www.kylehall.info
> ByWater Solutions ( http://bywatersolutions.com )
> Meadville Public Library ( http://www.meadvillelibrary.org )
> Crawford County Federated Library System ( http://www.ccfls.org )
> Mill Run Technology Solutions ( http://millruntech.com )
>
>
> On Mon, Jun 30, 2014 at 9:20 AM, Yohann Dufour 
> <yohann.dufour at biblibre.com <mailto:yohann.dufour at biblibre.com>> wrote:
>
>     Hi,
>
>     I'm currently replacing C4::SQLHelper by DBIx::Class in order to
>     remove the module C4::SQLHelper from Koha (see bug 11385
>     <http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11385>).
>     I've already posted two patchs with this in mind : bug 12482
>     <http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482>
>     and bug 12487
>     <http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487>.
>     Before continuing, I would like to have a feedback from the
>     community on the method I used to do that.
>
>     Thank's for your responses,
>
>     Yohann
>
>     _______________________________________________
>     Koha-devel mailing list
>     Koha-devel at lists.koha-community.org
>     <mailto:Koha-devel at lists.koha-community.org>
>     http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>     website : http://www.koha-community.org/
>     git : http://git.koha-community.org/
>     bugs : http://bugs.koha-community.org/
>
>

-------------- section suivante --------------
Une pi�ce jointe HTML a �t� nettoy�e...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140707/7033d129/attachment.html>


More information about the Koha-devel mailing list