ORM and DAO in PHP


I am a PHP developer and I am familiar with ORM (Doctrine and Propel), but I seldom heard about DAO. What are the differences and relationship between ORM and DAO from PHP development perspective?

If I use Symfony to develop very large and complex projects, will that be better if I use DAO? (ORM is somehow heavy I think, but I know little about DAO)

2/3/2019 10:25:01 PM

Accepted Answer

See my related question.

Relating my question here, a DAO is basically a DAL that happens to be implemented as an object. This means that using a DAO could be lighter than your ORMs, but isn't necessarily because it doesn't imply a maximum complexity of interface or implementation, only a minimum (that an object is used to encapsulate data access operations).

If your project is large and complex, I would tend to think an ORM is going to be better than a lighter DAO.

5/23/2017 12:31:52 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow