NYCPHP Meetup

NYPHP.org

[zendframework] a modeling question

Michael Hernandez mhernandez at techally.com
Tue Jun 2 11:46:21 EDT 2009


On Tue, 2009-06-02 at 11:36 -0400, David Mintz wrote:
> At
> http://framework.zend.com/docs/quickstart/create-a-model-and-database-table you see they use a DataMapper class to map the domain object to the database. My question is, if you are totally certain that the back end you will be using will be a database (indeed, a MySQL database) now and forever, do you really need that extra layer?
> 
> -- 
> David Mintz
> http://davidmintz.org/
> 
> The subtle source is clear and bright
> The tributary streams flow through the darkness

I found the extra layer to prove useful when I realized that my User
model needed to make use of multiple tables. I was able to update my
model to use multiple table objects when necessary. If you were going to
write all the SQL yourself instead of using the methods that
Zend_Db_Table provides, I guess it wouldn't matter as much?

--Mike H




More information about the zendframework mailing list