Monday, March 9, 2009

some thoughts of using zend framework

1. Where is business logic located? Controller + Model? Fat controller + Thin model or Thin controller + fat model, or controller + model + another business logic layer?

2. If the web application is organized in modules, and we don't want to use zend autoload due to performance consideration, how to access one module's data/model from another module?

3. Active Record or DAO? I personally prefer DAO. And the reason is obvious: data access get separated from business model, and your model won't become heavy. Just think of a situation: send email to millions of subscribers, if each subscriber has to carry db accesss object, that is gonna take a lot of resurces.
Here is an article about active record and DAO: http://blog.astrumfutura.com/archives/128-DAO-vs-ActiveRecord-DAO-Wins.html

No comments: