[Koha-devel] Move list related code to Koha::Virtualshelves (Dbix::Class inside)

Jonathan Druart jonathan.druart at bugs.koha-community.org
Thu Jul 16 20:02:59 CEST 2015


No need to regenerate the DBIx::Class schema, I have finally not added
the new constraint I wanted.

2015-07-16 18:55 GMT+01:00 Jonathan Druart
<jonathan.druart at bugs.koha-community.org>:
> I am sure you will want a link
> http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14544
> :-)
>
> 2015-07-16 18:51 GMT+01:00 Jonathan Druart
> <jonathan.druart at bugs.koha-community.org>:
>> Hello developers,
>>
>> For much of the last 2 days, I have tried to get rid of
>> C4::VirtualShelves::Page, which is, in my opinion, the worst module of
>> Koha [1]
>>
>> I am a bit frustrated because I will be afk for the next 2 weeks and I
>> have not finished what I intended to do. I am still far of removing
>> this module, but I prepared the ground:
>> I have added the package Koha::Virtualshelf, Koha::Virtualshelves,
>> Koha::Virtualshelfshare[s] and Koha::Virtualshelfcontent[s] to take
>> advantage of Dbix::Class.
>> I have also introduced a Koha::Exceptions module to throw exceptions
>> when needed.
>>
>> Of course I have added tests to cover the changes.
>>
>> I did not test widely the interface, so there are certainly some bugs.
>> But for what I tested, it works like as before.
>> It would be interesting to do some benchmarks also.
>>
>> I really would like to get feedbacks on these patches. For those
>> interested in following the evolution of the code and want to share
>> their idea, have a look :)
>> Compare both code (before and after), you will understand why we
>> really need to move/rewrite our code :)
>>
>> I won't be far from my mailbox, don't hesitate to ask [relevant]
>> questions and comment the patch set.
>>
>> Be care, the last patch is a wip ("release early, release often"),
>> don't apply it if you want to test. You will certainly need to update
>> the Dbix::Class schema files.
>> The next steps are: Get rid of GetShelves, GetShelfContents and the
>> other subroutines of C4::Virtualshelves. Then introduce a normal
>> structure to the perl script (shelves.pl and opac-shelves.pl). Finally
>> remove C4::VirtualShelves::Page.
>>
>> Cheers,
>> Jonathan
>>
>> [1] Actually it's not true, there are C4::Context, C4::Auth and
>> C4::Search before :)


More information about the Koha-devel mailing list