关闭

[读书笔记]Struts学习

818人阅读 评论(0) 收藏 举报

The terms Model 1 and Model 2 originated in the JSP 0.92 specification. The primary characteristics of Model 1 are

  • HTTP requests are posted directly to .jsp files.

  • The logic for directing program flow, for accessing databases and remote systems, and for building user displays are all embedded directly in JSP files.

The primary characteristics of Model 2 are

  • HTTP requests are posted to Java servlets.

  • The logic for directing program flow (Controllers) and for accessing databases and remote systems (Models) are implemented in Java servlets and classes. All user displays (Views) are built using JSP files.

Struts implements the MVC design pattern and is based on Model 2. Struts implements MVC using

  • Model components that provide a programming model of back-end databases and remote systems and services

  • View components that use JSP and Struts custom tags to build pages for user presentation

  • Controller components that implement the business logic that defines the program flow

 

Struts is a "Web Application Framework" that helps you go further faster when developing applications for which the client is a browser. It enables you to build better applications by letting you take advantage of best practices put together by some of the best programmers in the world.

A framework is a collection of software and methods used to speed application development. Web application structure and format are formally governed by the Java Servlet and J2EE specifications.

The Struts framework is based on a Model-View-Controller architecture. The Model provides an internal representation of the data. The View displays data without incorporating significant business logic. The Controller determines what processing to perform and what steps to take next.

The Struts tag libraries are used to build Struts Views. The libraries' JSP custom tags provide a high level of functionality while making the Views more readable and easier to maintain.

 

Struts是一种网络应用框架,它可以把帮助你更加快速的开发出基于浏览器的网络应用程序.Struts使你可以利用一些世界上最优秀的程序员从实践经验中总结出来的方法来建造更好的应用程序.

一个框架是一些用于快速开发应用程序的软件和方法的集合.网络应用架构和形式是由Java ServletJ2EE规范规定的.

Struts是基于MVC架构.模型层(Model)提供了对于数据的内部处理;试图层(View)用于显示数据,但是并不含有重要的业务逻辑;控制层(Contrller)决定了进行什么样的处理以及以后的处理过程.

Struts标签库用于构建Struts的视图.标签库的JSP定制标签提供了更加高级的功呢功能,而且可以是视图层更加易读和易于维护.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:175409次
    • 积分:2920
    • 等级:
    • 排名:第12525名
    • 原创:96篇
    • 转载:19篇
    • 译文:12篇
    • 评论:3条