[Koha-devel] OPAC dir structure redesign
Colin Campbell
colin.campbell at ptfs-europe.com
Tue May 7 17:03:13 CEST 2013
On Tue, May 07, 2013 at 10:21:30AM -0400, Kyle Hall wrote:
> I think we need very
> standard variable names. For example, any and all pages about a single
> patron should have a standard patron variable ( let's say "Borrower" ). The
> same thing should go for records.
A lot of the code creates variables for every element. When you have to
invent that many variables the code soon gets inconsistent and buggy. If
we are passing a borrower pass a borrower as a hashref dont disassemble
and reassemble into his constituent part. And there's a lot of code that
manipulates data for presentation reasons before passing it to the
template that can do the same presentation task as well, if not better
(and usually more efficiently). I'd treat any code that retrieves data
and then loops through it as suspect. Safer to get the result set and
pass it to the template to display. Which brings the code closer to the
approach that an ORM would require.
Colin
--
Colin Campbell
Chief Software Engineer,
PTFS Europe Limited
Content Management and Library Solutions
+44 (0) 800 756 6803 (phone)
+44 (0) 7759 633626 (mobile)
colin.campbell at ptfs-europe.com
skype: colin_campbell2
http://www.ptfs-europe.com
More information about the Koha-devel
mailing list