MVC关系流程
来源:互联网 发布:深圳找工作知乎 编辑:程序博客网 时间:2024/06/05 17:06
http://ruby.railstutorial.org/chapters/a-demo-app.html?version=3.2#sec-planning_the_application
1.The browser issues a request for the /users URI.
2.Rails routes /users to the index action in the Users controller.3.The index action asks the User model to retrieve all users (User.all).
4.The User model pulls all the users from the database.
5.The User model returns the list of users to the controller.
6.The controller captures the users in the @users variable, which is passed to the indexview.
7.The view uses embedded Ruby to render the page as HTML.
8.The controller passes the HTML back to the browser.3
We start with a request issued from the browser—i.e., the result of typing a URI in the address bar or clicking on a link (Step 1 in Figure 2.11). This request hits the Rails router (Step 2), which dispatches to the proper controller action based on the URI (and, as we’ll see in Box 3.2, the type of request). The code to create the mapping of user URIs to controller actions for the Users resource appears in Listing 2.2; this code effectively sets up the table of URI/action pairs seen in Table 2.1. (The strange notation :users is a symbol, which we’ll learn about in Section 4.3.3.)
name
$debug
@name
@@total
PI
fishAndChips
$CUSTOMER
@point_1
@@symtab
FeetPerMile
x_axis
$_
@X
@@N
String
thx1138
$plan9
@_
@@x_pos
MyClass
_26
$Global
@plan9
@@SINGLE
Jazz_Song
- MVC关系流程
- MVC流程
- MVC学习1-------------MVC流程
- SSH MVC的关系
- JSF MVC 流程
- MVC计算器流程
- spring MVC 工作流程
- MVC关键流程
- mvc执行流程
- Spring MVC流程解析
- Spring MVC流程
- Magento的MVC流程
- spring mvc 的流程
- Spring MVC工作流程
- MVC工作流程
- spring mvc 工作流程
- dedecms mvc 流程
- MVC开发流程
- Java中Runnable和Thread的区别
- ISD4003驱动程序(基于51单片机,硬件调试通过)
- 【thinkphp3.x】ThinkPHP/Lib/Behavior/ContentReplaceBehavior.class.php文件分析
- 也说南怀瑾
- 使用Tika进行非结构化内容的读写-1
- MVC关系流程
- 规则引擎研究(一)——Rete算法(4)——Rete算法的特例Uni-Rete算法
- 【解题报告】 HDU 2795 Billboard -- 线段树的应用
- 网络 的复用技术
- IP复习
- 寻找设计的动机和方向
- hdu_1114
- Eclipse Java开发环境搭建
- 主定理和递归式复杂度分析