2009年2月2日星期一

Re: Re: [fw-mvc] Separating Models from DB Access

>OK, think I'm getting my head round this now :-) . So, my "gateway" is
>actually a data mapper, and that is used to hide the domain objects
>from the DB and vice-versa. A script will access the mapper, request a
>Site object, the mapper will do all the DB work, create a Site object
>from the data and then return that object. When the object has been
>updated and the changes need to be saved back to the DB the object is
>parsed back to the mapper, which again takes care of the DB work.
>
>The DB knows nothing about the mapper or the domain objects.
>The domain objects no nothing about the mapper or the DB.
>The mapper knows about both the DB and the domain objects.

one of the best descriptions I've read
--
View this message in context: http://www.nabble.com/Separating-Models-from-DB-Access-tp21745215p21796329.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: