Just came across the Doctrine Project which has an Object Relational Mapper and a DB Abstraction Layer. What does Doctrine provide that other PHP abstraction layers don't? And what practical use can you put the ORM to, apart from fetching objects via queries written in Doctrine Query Language? Is the query language really something you want to develop an entire web app in? Does it perform well?
On the whole does building an app on Doctrine make it easier to maintain and understand? Is it over-engineered, and is building on an abstraction layer sensible for small-medium size projects? (<50 GUI screens), as opposed to directly working with MySQL.
What does Doctrine provide that other PHP abstraction layers don't?
Is the query language really something you want to develop an entire web app in?
Just a part of the application responsible for maintaining business-objects should be aware of the existence of Doctrine. And that part doesn't have to be 100% Doctrine-based.
On the whole does building an app on Doctrine make it easier to maintain and understand?
Definitely. The code is easier to read, understand and maintain.
Is it over-engineered, and is it sensible for small-medium size projects?
Actually Doctrine is quite simple in its fundamentals. And it's a very good choice for small, medium and even some large applications.
Doctrine isn't the answer for everything and sometimes it's a little problematic. However for typical tasks it's extremely useful. IMHO the best ORM/ODM for PHP at this moment.
I'd like to add a few points to Crozin's answer, but unfortunately can't comment it. Here they are:
IMHO at the moment doctrine provides best IDE code completion support and DB layer abstraction among all php ORMs available. It is not over-engineered and follows SOLID principles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With