Re: [Koha-devel] [Koha::Object] Related records and calling methods from templates

2016-09-20 Thread David Cook
-community.org Subject: Re: [Koha-devel] [Koha::Object] Related records and calling methods from templates What do you suggest? It's much easier to always get and pass a full object than sometimes a smaller one without knowing exactly what it represents (which methods you can call on i

Re: [Koha-devel] [Koha::Object] Related records and calling methods from templates

2016-09-20 Thread Kyle Hall
> > > What do you suggest? It's much easier to always get and pass a full > object than sometimes a smaller one without knowing exactly what it > represents (which methods you can call on it). > I don't think it will hurt perfs too much. > Of course there will certainly be some rooms for improvemen

Re: [Koha-devel] [Koha::Object] Related records and calling methods from templates

2016-09-19 Thread Jonathan Druart
2016-09-15 13:03 GMT+02:00 Marcel de Rooy : > Hi devs, > Hi :) > I am seeing more Koha objects that include methods for related records like > Koha::Patron, sub image referring to Koha::Patron::Images. > > As a second example, on bug 14610 (article requests), a biblio, item, branch > and borrower

Re: [Koha-devel] [Koha::Object] Related records and calling methods from templates

2016-09-15 Thread David Cook
ent Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Direct: 02 8005 0595 From: koha-devel-boun...@lists.koha-community.org [mailto:koha-devel-boun...@lists.koha-community.org] On Behalf Of Marcel de Rooy Sent: Thursday, 15 September 2016 9:03 PM To: koha-devel@li

[Koha-devel] [Koha::Object] Related records and calling methods from templates

2016-09-15 Thread Marcel de Rooy
Hi devs, I am seeing more Koha objects that include methods for related records like Koha::Patron, sub image referring to Koha::Patron::Images. As a second example, on bug 14610 (article requests), a biblio, item, branch and borrower method is added to Koha::ArticleRequest. Obviously, they all f

Re: [Koha-devel] Koha::Object[s] improvements - call for discussions

2016-08-11 Thread Jonathan Druart
For the record: The AUTOLOAD is on bug 17091 (Add AUTOLOAD to Koha::Objects) and the DBIC vs Koha::Object returned value for Koha::Virtualshelf methods is fixed on bug 17094 (Methods of Koha::Object[s]-based classed should not return DBIx::Class objects) 2016-06-26 11:04 GMT+01:00 Jonathan Druart

Re: [Koha-devel] Koha::Object[s] improvements - call for discussions

2016-07-07 Thread Kyle Hall
Thanks for the input. The bug started out as just a way to make the improper use of objects as hashrefs trigger an error, but evolved when I thought of this possibility. We can still make that happen, it still requires the blessed hashref to be converted to a blessed scalar ref and the class files

Re: [Koha-devel] Koha::Object[s] improvements - call for discussions

2016-07-07 Thread Alex Sassmannshausen
Hello Throwing in my 2¢ here too… Kyle Hall writes: > Jonthan, I love these ideas and definitely think they would be major > improvements to Koha::Object(s). Agreed. My reservations I expressed at the hackfest were around us losing the great documentation that is available with dbic by having

Re: [Koha-devel] Koha::Object[s] improvements - call for discussions

2016-07-07 Thread Marcel de Rooy
yle Hall Verzonden: zondag 26 juni 2016 13:06 Aan: Jonathan Druart CC: koha-devel@lists.koha-community.org Onderwerp: Re: [Koha-devel] Koha::Object[s] improvements - call for discussions Jonthan, I love these ideas and definitely think they would be major improvements to Koha::Object(s). I would l

Re: [Koha-devel] Koha::Object[s] improvements - call for discussions

2016-06-26 Thread Kyle Hall
Jonthan, I love these ideas and definitely think they would be major improvements to Koha::Object(s). I would like to toss something else in as well. A while back I submitted bug 15759 as a concept: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15759 This bug does some pretty awesome

[Koha-devel] Koha::Object[s] improvements - call for discussions

2016-06-26 Thread Jonathan Druart
Hi devs, At the KohaCon16 some of us have briefly talked about the limitations of Koha::Object[s] we encounter when implementing new modules. Koha::Object[s] has been pushed to master less than 18 months ago and we already have more than 30 classes using it. It permits to uniformise our way to cod

Re: [Koha-devel] Koha::Object validation ?

2016-02-15 Thread Julian Maurice
I was thinking about calling $self->before_save() in Koha::Object::store and then define Koha::AuthorisedValues::before_save, but that's kind of the same thing. I'll go with overwriting the store method, thanks ;) Le 15/02/2016 16:22, Jonathan Druart a écrit : > Hi Julian, > > You want to overwri

Re: [Koha-devel] Koha::Object validation ?

2016-02-15 Thread Tomas Cohen Arazi
+1! 2016-02-15 12:22 GMT-03:00 Jonathan Druart < jonathan.dru...@bugs.koha-community.org>: > Hi Julian, > > You want to overwrite the store method, that's it? > You can have a look at Koha::VirtualShelf->store for an example. > > Jonathan > > 2016-02-15 14:20 GMT+00:00 Julian Maurice : > > Hi the

Re: [Koha-devel] Koha::Object validation ?

2016-02-15 Thread Jonathan Druart
Hi Julian, You want to overwrite the store method, that's it? You can have a look at Koha::VirtualShelf->store for an example. Jonathan 2016-02-15 14:20 GMT+00:00 Julian Maurice : > Hi there, > > I'm currently working on some enhancements for authorised values (to > make it possible to have a hi

[Koha-devel] Koha::Object validation ?

2016-02-15 Thread Julian Maurice
Hi there, I'm currently working on some enhancements for authorised values (to make it possible to have a hierarchy of values), so I'm using Koha::AuthorisedValue which is a subclass of Koha::Object. I would like to add some sort of validation mechanism just before saving the object into database

Re: [Koha-devel] Koha::Object

2015-07-28 Thread Brendan Gallagher
We are very much interested in this. Both the great start that Olli is doing and the excellent ideas that Robin has to add on top. In Fact we've added this to our list to find funding for, for after we've finished the ES project. So help us finish the ES project faster (hint hint - test test - m

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Kivilahti Olli-Antti
We are very much looking forward to the ES-thing, and certainly will be one of the early adopters. Hoping to help you Q1 2016, if our schedule holds (which it certainly hasn't regarding the Koha REST API). Thanks for the link! Olli-Antti Kivilahti Järjestelmäkeittäjä vaarakirjastot.fi +358 50 4

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Robin Sheat
Kivilahti Olli-Antti schreef op di 28-07-2015 om 03:57 [+]: > Have you taken a look at this? > > Bug 7174 - Authentication rewriting > > It is not configuration file -driven, but it is almost 100% of what > you described with some added bonuses. I haven't had a chance to yet, still trying to

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Kivilahti Olli-Antti
Hi there! Have you taken a look at this? Bug 7174 - Authentication rewriting It is not configuration file -driven, but it is almost 100% of what you described with some added bonuses. With a looong list of complex dependencies. Oll

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Robin Sheat
Kyle Hall schreef op ma 27-07-2015 om 07:22 [-0400]: > 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 crea

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Kyle Hall
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.

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Kivilahti Olli-Antti
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.

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Mark Tompsett
.koha-community.org Subject: [Koha-devel] Koha::Object 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 Kivi

Re: [Koha-devel] Koha::Object

2015-07-27 Thread Kyle Hall
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

[Koha-devel] Koha::Object

2015-07-27 Thread Kivilahti Olli-Antti
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