I am working on the zend project, I am referring on other zend project to create the new Zend Project.But I don't like to blindly follow that project without understanding. In the Zend Directory structure, In Model class there are mainly two type of classes I see, like as in
- models
- DbTables
- Blog.php //Extends Zend_Db_Table_Abstract
- Blog.php // Contains methods like validate() and save()
- BlogMapper.php // Also Contains methods like validate(Blog b) & save(Blog b)
Why this specific structure is followed? Is this is to separate Object class and Database model class?
Please explain.
Blog
has methodssave()
and such, it's more an active-record implementation and less a model in the meaning of the model-mapper-concept) – Kylakylah