[Koha-devel] Koha and DBIC

Kyle Hall kyle.m.hall at gmail.com
Thu Sep 11 14:54:22 CEST 2014


>
>
> >> I don't understand where is the complexity. We need Koha::Module
> >> packages. We cannot put all our code into
> >> Koha::Schema::Result::Module.
> >> Why everyone is afraid of abstraction layers?
> >
> >
> > We *don't* need Koha::Module packages for everything! My point is that
> DBIC
> > provides us with an abstraction layer already! Wrapping a DBIC class in
> > another class provides no advantage and just obfuscates our code,
> increases
> > hardware requirements, and leaves more room to introduce bugs. If we are
> > just going to use DBIC  to avoid writing direct sql queries, we should be
> > using something like Fey instead.
>
> Give me examples please: Which "modules" don't need specific packages?
> IMO, these ones should have their own modules: Order, Supplier,
> Biblio, Item, Issue, Authorised value, Suggestion, Library, Budget,
> Fund, Patron.
>

Why do you believe these need Koha modules? Each one of these already has
an object with methods via DBIC. We can add more methods either for a given
Library via Result::Branch, or for a collection of libraries via
ResultSet::Branch


> > We are a collective of developers with many different styles and
> opinions.
>
> I completely agree with that :)
> That fact is that DBIC has been pushed into Koha 1 year ago and we
> don't have any plan. I tried several times and my patches have just
> been rejected.
> We never had this discussion (I mean a real/constructive discussion),
> nobody gives examples.
> I really would like someone shows me what he has in mind, like I did
> for Koha::Acquisition::[Order|Bookseller].
>

I'd really love to get a chance to write something that exemplifies this.
So far the only bit has been Result::Item::effective_itemtype()


>
> > We often have very different approaches to how we implement new
> features. If
> > we go down this path of wrapping DBIC in another abstraction layer, we
> > simply continue down this patch of having many different bespoke
> > implementations. If we use dbic as our abstraction layer, we remove much
> of
> > that issue.
>
> I we reach an agreement, we can do what we want.
>
> I hope some of you will be in Cordoba in 3 weeks! :)
>

I wish I was going! Unfortunately, with a baby in the house I've made the
decision not to attend this year. It was not an easy decision to make, and
I'll miss getting to see everyone. I hope any discussions regarding these
issues will continue to take place here and on #koha so I can participate!

Kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140911/53803859/attachment-0001.html>


More information about the Koha-devel mailing list