Question

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)

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top