Talk in English - US at php[tek] 2023
Track Name:
PHP Architect Ballroom
View Slides: https://speakerdeck.com/morozov/database-abstractions-and-where-they-leak
Short URL: https://joind.in/talk/f0e30
(QR-Code (opens in new window))
Doctrine DBAL is the most popular relational database abstraction library for PHP. Many developers prefer using a database abstraction since they usually provide a better developer experience than working directly with database drivers. However, despite the best effort of their designers, abstractions often make developers unhappy when it comes to using non-trivial database features.
Per Joel Spolsky[1], "all non-trivial abstractions, to some degree, are leaky". As a quite complex one, Doctrine DBAL leaks in a variety of aspects: drivers, SQL dialects, and schema management specifics.
In this talk, I will highlight the most notable inconsistencies of Doctrine DBAL APIs and provide recommendations on dealing with them.
[1] https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/
Comments
Comments are closed.
The talk had a lot of good “under the hood” information. It seemed to me though that the only place that abstractions leak is when you are trying to write database codes for many different types of databases and that didn’t seem too relevant.
Good talk, and good tips on how to mitigate differences between database engines when supporting more than one.
Learned a few things like most char things being handled as streams.
.
There was a lot of great information in this talk, especially for anyone trying to build a product that they want to support multiple data backends for. I hadn’t realized there were such “gotcha” moments that need to be covered in case of those non-MySQL backends (shows how focused my db exposure has been!) It was a little hard to follow at the outset, but once I caught better on to what was being explained, it was great. People who are more focused on DBAL in everyday life probably wouldn’t have that same stumble.
Quite interesting, especially for folks who aren't huge database buffs. It really sheds some light on the challenge of not only database abstractions, but wide-reaching abstractions in general.
enjoyed the talk.
John Boctor, thank you for the feedback. Could you elaborate a bit more?
In all the cases I showed, the API consumer needs to be aware of the underlying database platform or the driver (i.e. the implementation details) to make their code work in a portable way. Is it what makes it leaky?