[Koha-devel] Koha::Object

Kyle Hall kyle.m.hall at gmail.com
Mon Jul 27 13:22:39 CEST 2015


I think authentication is the perfect way to use interfaces in Koha! That
way we can have a standard API for authentication be it internal, ldap,
cas, or whatever! Right now the way C4::Auth and it's ilk are mixed
together definitely creates headaches when attempting to debug
authentication issues.

Olli++

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, Jul 27, 2015 at 7:18 AM, Kivilahti Olli-Antti <
olli-antti.kivilahti at jns.fi> wrote:

>  Thanks for all the replies!
>
> I am not a Moose-fan so just curious.
>
> I use Interfaces to create a contract between objects so different
> implementations can fill the same role. Just like they are intended to be
> used :)
> I am not implying to force some kind of an Interface-mechanism to
> Koha::Object.
> I am satisfied with it.
>
> I am deploying Interfaces to the Authentication rewrite and TestObject
> Factories to enforce subclass component interoperatibility in a formal way.
> (what a sentence...)
>
> Olli-Antti Kivilahti
> Järjestelmäkeittäjävaarakirjastot.fi+358 50 449 7763
> --Powered by Kubuntu Linux!
>
> On 27.07.2015 14:04, Kyle Hall wrote:
>
> Since Koha::Object(s) is used for with inheritance interfaces aren't
> really necessary. Simply declaring Koha::Object(s) as a base for your
> module will mean those methods already exists. The only time you need to
> define one of those methods is if you need to override the base behavior (
> to add error checking, modify related objects, etc ).
>
>  I believe the primary issue is start-up time needed for Moose, which
> makes it untenable for basic cgi script usage ( as opposed to PSGI/Plack
> where it only needs to load once ).
>
>  In general I'm a fan of interfaces, so I'm not opposed to the idea. Can
> you explain what advantage you think we'd can from implementing interfaces
> for Koha::Object(s)?
>
>  Thanks!
> 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, Jul 27, 2015 at 6:58 AM, Kivilahti Olli-Antti <
> olli-antti.kivilahti at jns.fi> wrote:
>
>> Hi there!
>>
>> I was looking for anykind of Interface implementation for Perl, and I
>> found Moose and Class::Interface.
>>
>> I cant but wonder why we are not using Moose for Koha::Object.
>> Apparently it works nicely with DBIx as well.
>>
>> --
>>
>> Olli-Antti Kivilahti
>> Järjestelmäkeittäjä
>> vaarakirjastot.fi
>> +358 50 449 7763
>> --Powered by Kubuntu Linux!
>> _______________________________________________
>> 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/20150727/b1eac104/attachment-0001.html>


More information about the Koha-devel mailing list