koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] an interesting idea


From: Pat Eyler
Subject: [Koha-devel] an interesting idea
Date: Fri Mar 28 11:49:17 2003

(see http://www.perl.com/lpt/a/2002/10/22/phrasebook.html
     http://use.perl.org/~gnat/journal/11285
     http://use.perl.org/~djberg96/journal/11291
for more info)

I just ran across a set of articles that triggered some thinking for me.
The basic idea is that we could create a phrasebook of (templated) SQL
queries external to the normal modules and scripts.  Whenever we need
to use a specific query we can slurp it out of the phrasebook, fill in the
variables, and run it.  I think this might win in two ways:
  1) it will be easier to maintain/improve the SQL queries if they're not
     strewn about in the code
  2) we can work at translating the queries into other (nonMySQL) dialects
     of SQL if we ever decide to support them.
The same tool *might* also help us maintain translations internal to our
scripts (as opposed to things we've already used HTML::Template for).

There might be stickiness in a couple of areas too.  The biggest one that
I see is that we'll have to be very careful not to break the API presented
by a query (i.e., what variables it requires, what data it passes back) --
This is an excellent place for unit tests to help us.

any other thoughts?
-pate

Pat Eyler
Kaitiaki/manager               migrant Linux sys admin
the Koha project               ruby, shell, and perl geek
http://www.koha.org            http://pate.eylerfamily.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]