天空是蓝色的

做好软件为中国 #gcc -c helloworld.c -o helloworld.o //编译目标文件 #gcc helloworld.o -o helloworld //编译成可执行exe #helloworld //运行exe
数据加载中……
[struts]MVC
 
Struts is an open-source framework for building Model 2 web applications.

MVC框架

A controller servlet that dispatches requests to appropriate action classes
provided by the application developer.

All requests are dispatched through a single controller servlet that is part of the
framework.

单独的控制器把所有的请求集中分发

This controller provides numerous application-wide services, such as
database connection pooling and automatic request dispatching. The controller
creates action classes, which are built by the developer to perform the work of the
application. These action classes extend the Struts Action class. This is a perfect
example of a reusable framework part—the controller is designed to create
Action subclasses to perform work. This aspect of Struts is based on the Command
design pattern, which allows for parameterizing activities.

控制器提供了众多的应用程序范围的服务,例如数据库连接池,请求自动分发.控制器创建开发者提供解决业务问题的action业务类
这些action类包括Struts Action class.控制器可以重复创建Action类是复用框架

The action instances create model beans that perform domain-specific activities.
Examples of these activities include executing business logic, connecting to
databases, and calling other bean methods. The model beans encapsulate the real
work of the application, just as in Model 2. Once the action instance has utilized
the model beans to perform work, it forwards the models that contribute to the
display via the controller to a view component, generally a JSP (although other
view options are possible; see the discussion on Velocity in chapter 9). The view
extracts the model beans and presents the visual results to the user. As you can
see, this is the same general information flow described in Model 2. Struts provides
a great deal of the infrastructure to make it easy to accommodate this information
flow.

Struts handles other details of application development as well. The framework
includes numerous custom JSP tags to help you construct the view. It also
provides classes that aid in internationalization, database connection pooling, and
flexible resource mapping.

Struts is a fairly lightweight framework whose primary job is to facilitate building
web applications using Model 2. I estimate that Struts saves from 35 to 40 percent
of the typical amount of effort to build a Model 2 application. One of Struts’
strengths is its cohesiveness—it doesn’t supply services outside those needed for
building Model 2 applications. Other frameworks are much more extensive; the
Turbine framework is one of them.

摘自<ARTOF
JAVA WEB
DEVELOPMENT>

posted on 2006-02-15 12:22 bluesky 阅读(2299) 评论(0)  编辑  收藏 所属分类: 工作总结


只有注册用户登录后才能发表评论。


网站导航: