Have the Koha developers given any thought to recoding the raw DBI calls in Koha with an OO-RDB mapper? There are a number of them available on CPAN. I've written these things, at varying levels of complexity and completeness, in the past and the advantages are numerous: (*) separate the Perl code from the SQL (*) rows in tables are represented by objects so no more errors like this: $row->{naem} -- instead: $row->name (*) the abstraction layer of an OO-RDB mapper can provide 99% database driver independence; Koha could suddenly be supported by MYSQL, Postgresql, oracle, sqlite, etc.etc. (*) the abstraction layer allows application-level hooks to be installed *anywhere* in the RDB transcation process and total global control of RBD operations is suddenly available (instead of scanning/editing 1000's of lines of source code to make a basic functional RDB change) (*) audit logging can be automated; all insert, updates and deletes can be caught in the abstraction layer -- do what you want with them (*) updating a row in a table becomes foolproof: $row = OORDB->fetch(criteria); $row->name("new name'); $row->debt(undef); $row->commit; The list of advantages does go on and on. cheers rickw -- _________________________________ Rick Welykochy || Praxis Services Q: What's the difference between a software sales person and a car sales person? A: With a car sales person there is a slight chance that he actually knows how to drive.
Rick Welykochy <rick@praxis.com.au> wrote:
Have the Koha developers given any thought to recoding the raw DBI calls in Koha with an OO-RDB mapper?
I like it. Using an OO-RDB mapper has made my PHP-based work almost tolerable; using one for Perl should feel really good. With that for DB and Zebra for biblios, Koha would really rock. However, it seems like a lot of work (it took me long enough to recode all SQL calls to use prepare() back in 2.0.x) and I don't have spare time or a sponsor for it. It's not the sort of thing that will attract sponsorship/commissions easily. Few people want to pay for rewriting existing code, even if they need features which it will enable. Would people pay KohaLa to pay for this sort of work? The other problem:
There are a number of them available on CPAN. [...]
What are their strengths and weaknesses and which should we bet on? If we bet on the wrong one, how hard is it to switch later? Best wishes, -- MJ Ray http://mjr.towers.org.uk/email.html tel:+44-844-4437-237 - Webmaster-developer, statistician, sysadmin, online shop builder, consumer and workers co-operative member http://www.ttllp.co.uk/ - Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/
participants (2)
-
MJ Ray -
Rick Welykochy