English 中文(简体)
采用数据图设计模式的强硬框架结构
原标题:Zend framework architecture using Data Mapper design pattern

因此,我正在利用数据表设计模式开发申请,但在处理数据库表之间的关系方面,我有一些问题。 我不相信,也找不到任何资源,说明我如何规划我与数据图表模式的关系。

我是否应在我的可达类别中使用参考和可依赖性定义,或者在我需要时,我是否应当有组成和即时使用新类别?

例如,一个博客站,其作者应当像:

$blog->auth或 = findDependentRowset($row)

$auth或 = new Auth或();
$blog->auth或 = $auth或->findAuth或ById($auth或Id);
问题回答

我认为,正如你指出的那样,执行泽斯德框架表格关系的最有数据图表的方法是使用<代码>优惠/代码>和<代码>依赖性标准/代码>。

视其他因素(业绩需要、您的行文模式的复杂性......)而定,你可能希望与设计模式相比,不那么严格,只为表格实施制图,执行有关询问的关系(通过使用<代码>)。 Zend_Select Object provided by $this->getAdapter()->select( and some JOINs.

希望,





相关问题
Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

JSON with classes?

Is there a standardized way to store classes in JSON, and then converting them back into classes again from a string? For example, I might have an array of objects of type Questions. I d like to ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Passing another class amongst instances

I was wondering what is the best practice re. passing (another class) amongst two instances of the same class (lets call this Primary ). So, essentially in the constructor for the first, i can ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签