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
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@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@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/
+1000! On Wed, Jul 2, 2014 at 3:39 PM, Kyle Hall <kyle.m.hall@gmail.com> wrote:
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@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@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/
_______________________________________________ Koha-devel mailing list Koha-devel@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/
-- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 5353750 ext 13168 GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
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@biblibre.com <mailto:yohann.dufour@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@lists.koha-community.org <mailto:Koha-devel@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/
participants (3)
-
Kyle Hall -
Tomas Cohen Arazi -
Yohann Dufour