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

Kyle Hall kyle.m.hall at gmail.com
Wed Jul 2 20:39:04 CEST 2014


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>
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
> 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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140702/caf18e78/attachment.html>


More information about the Koha-devel mailing list