[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-devel] OO-RDB mapper
From: |
Rick Welykochy |
Subject: |
[Koha-devel] OO-RDB mapper |
Date: |
Sun, 30 Sep 2007 10:16:18 +1000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-devel] OO-RDB mapper,
Rick Welykochy <=