因此,在控制器中,我们会访问模型,并获得所有创建完毕的模型,这样,所有视图所要做的就是输出某些数据。
So in the controller, we are going to be accessing the Model and getting it all set up so all the view has to do is spit out some data.
模型-视图-控制器:Rails的MVC框架(称为Action Pack)为基于Web的访问进行了定制并且实现了著名的被称为Model 2(参见参考资料)的设计策略。
Model-view-controller: The Rails MVC framework — called Action Pack — is customized for Web-based access and implements a well-known design strategy called Model 2 (see Resources).
控制器一般使用模型的函数调用来改变它,和视图使用不同的模型调用访问所需要的模型的构建(用户可见)表示。
The controller generally USES the model's function calls to change it, and the view USES different model calls to access what is needed to build the (user-visible) representation of the model.
控制层:主要负责系统的访问控制、协调模型和视图间的关系,是系统的核心控制单元。
Control layer: responsible for system access control, coordination relationship between the model and the view is the core of the system control unit.
控制层:主要负责系统的访问控制、协调模型和视图间的关系,是系统的核心控制单元。
Control layer: responsible for system access control, coordination relationship between the model and the view is the core of the system control unit.
应用推荐