Zend Framework ORM-style table data gateway vs. extending Zend_Db_Table_Abstract

前端 未结 2 1292
灰色年华
灰色年华 2021-02-06 02:53

In the Zend Framework Quickstart, there has been a change from models that extend Zend_Db_Table_Abstract to the Table Data Gateway pattern.

Personally, I ha

2条回答
  •  清歌不尽
    2021-02-06 03:45

    It's useful because you can do $insert = new Model_Guestbook($param1, $param2, $param3); - means when someone comes to the project, he can create a new instance easily without knowledge of the database structure (by checking the source / by model interface). This is just one of the benefits this method offers :)

提交回复
热议问题