segunda-feira, 2 de maio de 2011

Esquizofrenia Dialética


Table Data Gateway Objects – Those are object copies of our tables and they should contain table related generic queries. On Zend, we will use them to perform generic queries that will work across different database vendors via Zend_Db_Table_Abstract extension. What will those gateway objects do? They will connect (via an adapter) to our data source (here, a MySQL database), on a generic (non-database-specifc) way;


Data Mappers Objects - Those objects will work between our data source and our domain object models. They may, or may not, use the Gateway to have access to the data source. Their job is to, while refering NOT to a specific table BUT to a domain (that may need/have access to different tables), it provides a way to better organize the data and the related behavior. On our Zend example, we will use the mapper to move data back and forward our Domain Object and Gateway Object;

Domain Objects (a.k.a Business Objects) Those objects … I don't get here...


Anyone ? 

Sem comentários:

Enviar um comentário