<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> 1) Allow find and simple searches in pl.<br>
<br>
</span>IMO, this is not a good idea. You're coupling database schema with code<br>
that's closer to display.<br></blockquote><div><br></div><div>It's funny, I've been trying to think of an example search to justify this and I can't really think of one where we can't use existing Result relationships to get our data. Maybe find() and single() are really all we need from pl files, but I don't think a hard and fast rule against search() is a good idea.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
All access should be via an API into the C4:: or Koha:: namespace, and<br>
the modules there are the only ones that know/care how the database is<br>
actually laid out. This means that if we want to change how things are<br>
stored[0], only one module needs to know about the change, and it can<br>
still present the same interface to code.<br></blockquote><div><br></div><div>Result and ResultSet are part of the Koha namespace. I also feel that you aren't quite correct about how one modules need to know the change a present the same interface. I can't count the number of times I've added a new parameter to an existing subroutine and had to update every function call in many perl files. Now that hashref's are more common, it's become less of a problem but it's still a problem that exists. I just don't think this is a entirely valid point. Remember, Result and ResultSet methods are no different than methods anywhere else in Koha and C4.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The moment that you have more than one place talking to a fairly<br>
low-level system like the database, you are going to have problems (e.g.<br>
the issues in the current system where so many modules touch the account<br>
code that refactoring it is a huge nightmare.)<br></blockquote><div><br></div><div>Exactly. If you look at my accounts rewrite you'll see I didn't try to shoehorn everything into Result and ResultSet. I used a Koha module that uses Results and ResultSets in a sane fashion. </div><div> </div><div>Kyle</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Robin Sheat<br>
Catalyst IT Ltd.<br>
✆ <a href="tel:%2B64%204%20803%202204" value="+6448032204">+64 4 803 2204</a><br>
GPG: 5FA7 4B49 1E4D CAA4 4C38  8505 77F5 B724 F871 3BDF<br>
</font></span><br>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br></blockquote></div><br></div></div>