An approach like this is considered useful to tack down complexity if you have a very large and/or complicated business model. For example you can concentrate on writing business code in a Record class and have a RecordMapper class that hides the database and saves and load Record instances. However, mantaining a data mapper layer is a heavy work, so I have integrated Doctrine (an ORM) in my Zend Framework applications. Doctrine is not a real DataMapper (search for the pattern) because model objects are not database agnostic, it also has many static clings, but it's a useful tool.
--
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://www.sourceforge.net/projects/ossigeno
2008年12月11日星期四
订阅:
博文评论 (Atom)
没有评论:
发表评论