1

I was reading the zend framework tutorial by Rob Allen. I am working on an application that will start small, but I would like it to be scalable, so the following statement got my attention:

"For this tutorial, we are going to create a model that extends Zend_Db_Table and uses Zend_Db_Table_Row. Zend Framework provides Zend_Db_Table which implements the Table Data Gateway design pattern to allow for interfacing with data in a database table. Be aware though that the Table Data Gateway pattern can become limited in larger systems. There is also a temptation to put database access code into controller action methods as these are exposed by Zend_Db_Table."

Can anyone tell me how this would be limited for larger systems? What are the alternatives?

xena
  • 163
  • 12

1 Answers1

0

The alternative is the DataMapper. You have a good explanation of these different patterns here: What is the difference between the Data Mapper, Table Data Gateway (Gateway), Data Access Object (DAO) and Repository patterns?

DataMapper is less coupled to the database that the Table Data Gateway which is a thin wrapper around a single table.

Zend_Db in ZF1 has serious limitations. Doctrine2 is a better choice for encapsuling your interaction with the persistence layer.

Community
  • 1
  • 1
Maxence
  • 12,184
  • 4
  • 48
  • 66