早教吧作业答案频道 -->英语-->
求英文翻译AsthecontrolleriscentraltoMVCinawebapplication,let'sconsiderthecontrollerfirst.Thekeyresponsibilitiesofawebapplicationcontrollerare:1.ToexamineandextractrequestparametersThismayleadtothecreationofc
题目详情
求英文翻译 As the controller is central to MVC in a web application, let's consider the controller first.
The key responsibilities of a web application controller are:
1. To examine and extract request parameters
This may lead to the creation of command domain objects, which will be passed to business objects. An MVC framework usually provides infrastructure that simplifies working with request parameters: for example, by populating JavaBeans with parameter values.
2. To invoke business objects, passing the data extracted from the request
Controllers will usually catch application exceptions resulting from business method invocations, modifying model creation, and view selection accordingly. (However, some fatal exceptions can simply be left to be handled by the web container, as web applications have a standard "error page" mechanism.)
3. To create the model that views will display based on the results of invoking business methods and any session state
4. In applications with server-side state, to create and manipulate session state
5. To choose a view and cause it to render, making the model data available to it
Other responsibilities may include generating web-tier log output and enforcing security restrictions (although security can also be handled declaratively in J2EE, as we saw in Chapter 6).
As these responsibilities are a mixture of application functionality (such as invoking application-specific business objects) and plumbing (such as passing model data to a named view and causing it to render content), they are usually split between application-specific and generic framework classes when using an MVC web application framework.
It's vital that controller objects have easy access to application business objects. Neither model nor view objects should require such access.
The key responsibilities of a web application controller are:
1. To examine and extract request parameters
This may lead to the creation of command domain objects, which will be passed to business objects. An MVC framework usually provides infrastructure that simplifies working with request parameters: for example, by populating JavaBeans with parameter values.
2. To invoke business objects, passing the data extracted from the request
Controllers will usually catch application exceptions resulting from business method invocations, modifying model creation, and view selection accordingly. (However, some fatal exceptions can simply be left to be handled by the web container, as web applications have a standard "error page" mechanism.)
3. To create the model that views will display based on the results of invoking business methods and any session state
4. In applications with server-side state, to create and manipulate session state
5. To choose a view and cause it to render, making the model data available to it
Other responsibilities may include generating web-tier log output and enforcing security restrictions (although security can also be handled declaratively in J2EE, as we saw in Chapter 6).
As these responsibilities are a mixture of application functionality (such as invoking application-specific business objects) and plumbing (such as passing model data to a named view and causing it to render content), they are usually split between application-specific and generic framework classes when using an MVC web application framework.
It's vital that controller objects have easy access to application business objects. Neither model nor view objects should require such access.
▼优质解答
答案和解析
作为控制器的核心是在MVC的Web应用程式,让我们考虑控制器第一.
关键的责任, Web应用程式控制器是:
1.审查和提取请求参数
这可能导致建立指挥域的对象,这将被传递到Business Objects的. 1 MVC框架通常提供基础设施,简化工作与请求参数,例如:由填充JavaBeans技术与参数值.
2.引用Business Objects公司,通过数据提取的要求
控制器通常会赶上应用的例外情况所造成的商业方法调用,修改模型的建立,并查看相应的选择. (不过,一些致命的例外情况可以简单留待处理由Web容器,作为Web应用程序有一个标准的“错误页”机制) .
3.创建模式的意见,将显示结果的基础上,引用业务的方法和任何会话状态
4.在应用与服务器端的状态,创建和操纵会话状态
5.选择一个意见,并导致它使,使模型数据提供给它的
其他责任可能包括生成的Web三层日志输出和执行安全方面的限制(虽然安全也可以处理以声明在J2EE ,正如我们看到在第6章) .
作为这些责任的混合功能的应用(如引用特定应用的Business Objects公司)和管道(如通过模型数据,以一个命名的意见,并造成它提供的内容) ,他们通常是分裂之间的特定应用和通用框架上课时使用MVC的Web应用框架.
它更重要的控制器物体轻松存取应用Business Objects公司.既不模型,也没有查看对象应要求此类访问.
关键的责任, Web应用程式控制器是:
1.审查和提取请求参数
这可能导致建立指挥域的对象,这将被传递到Business Objects的. 1 MVC框架通常提供基础设施,简化工作与请求参数,例如:由填充JavaBeans技术与参数值.
2.引用Business Objects公司,通过数据提取的要求
控制器通常会赶上应用的例外情况所造成的商业方法调用,修改模型的建立,并查看相应的选择. (不过,一些致命的例外情况可以简单留待处理由Web容器,作为Web应用程序有一个标准的“错误页”机制) .
3.创建模式的意见,将显示结果的基础上,引用业务的方法和任何会话状态
4.在应用与服务器端的状态,创建和操纵会话状态
5.选择一个意见,并导致它使,使模型数据提供给它的
其他责任可能包括生成的Web三层日志输出和执行安全方面的限制(虽然安全也可以处理以声明在J2EE ,正如我们看到在第6章) .
作为这些责任的混合功能的应用(如引用特定应用的Business Objects公司)和管道(如通过模型数据,以一个命名的意见,并造成它提供的内容) ,他们通常是分裂之间的特定应用和通用框架上课时使用MVC的Web应用框架.
它更重要的控制器物体轻松存取应用Business Objects公司.既不模型,也没有查看对象应要求此类访问.
看了求英文翻译Asthecontr...的网友还看了以下:
组成单词:1c,s,e,e,u,b,a2a,r,e,h,w,t,e3a,l,n,l,s,w,b,o 2020-05-21 …
指南针的"W,E,S,N"分别代表什么方向? 2020-06-12 …
地理上的“W”“E”“S”“N”是个代表什么方向?如果用来表示纬度或经度是什么意思? 2020-06-14 …
32个罗经点每个点怎么读出来?罗经中的32个罗经点(N.N/E.NNE.NE/N.NE.NE/EE 2020-06-19 …
请问下面的经纬度数分别是哪些城市?107°E,6°S.96°E,17°N.90°E,23.5°N. 2020-07-03 …
如何区分W,E,S,N表示的是东经还西经,北纬还是南纬,我老是记不清,有什么好方法还有,给了一个经 2020-07-03 …
电源插头上的三个字母E,L,N分别代表什么英文单词 2020-07-17 …
谁能帮我组个英语单词①e、n、o、p、t、w、y②e③d、t、y④b、c、f、m、p、r、t、v⑤ 2020-07-29 …
英语:下1.将下联打乱的字母组成单词,并写出汉语意思1.a,e,h,g,c,n[]2.e,i,s,t 2020-12-10 …
指南针的"W,E,S,N"分别代表什么方向? 2021-02-09 …