In hindsight, was leaving ADODB worth it? If you knew then what you know now?

In hindsight, was leaving ADODB worth it? If you knew then what you know now?

by Ray Morris -
Number of replies: 3

Years ago I wrote the MySQL class for a database abstraction layer and took over maintenance of the abstraction layer. Never again will I try to maintain such a layer.  WAY too many changes by DB vendors, especially Microsoft.

I'm curious how well it's worked for Moodle.  In hindsight, has leaving behind ADODB, instead writing and maintaining a separate DB abstraction layer been worth it?  As compared to contributing fix to ADODB, I mean.  I'm just curious if the people who did that work are glad and would do it again (and keep maintaining it) if you knew then what you know now.

 

 

Average of ratings: -
In reply to Ray Morris

Re: In hindsight, was leaving ADODB worth it? If you knew then what you know now?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I am not aware of any regrets, but the people who really know the answer to your question are Eloy and Petr.

In reply to Tim Hunt

Re: In hindsight, was leaving ADODB worth it? If you knew then what you know now?

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
No regrets at all here. The biggest benefit for me is that I have learned a lot about those four supported databases and their PHP drivers. Over the time we have built a relatively large array of database related unit tests that help us to catch any potential regressions and iron out newly discovered inconsistencies in supported databases.

We are still using the ADOdb abstraction layer in database authentication and enrolment plugins, I personally think it is a very good library for smaller projects that need to interface several different databases. The major difference is that our library is targeted at 4 databases only and is a lot more strict - it detects common coding problems and supports only features available in all our databases, it supports only bound paramters, we have custom nested transactions, another difference is the installation and upgrade APIs, we would need them even if we still used ADOdb.
In reply to Petr Skoda

Re: In hindsight, was leaving ADODB worth it? If you knew then what you know now?

by Ray Morris -

Thanks for th reply, Petr.  I'm digging through your code now to see how you solved a problem that AODB has when using FreeTDS:

Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (4004) (SQLExecDirectW)’)

FreeTDS docs suggest the problem in inherent in FreeTDS, but you guys solved in somewhow so that Moodle can use FreeTDS.