tiles-struts
2008-01-05 18:44:53 来源:WEB开发网 闂傚倸鍊搁崐鎼佸磹閹间礁纾归柟闂寸绾惧綊鏌熼梻瀵割槮缁炬儳缍婇弻鐔兼⒒鐎靛壊妲紒鎯у⒔閹虫捇鈥旈崘顏佸亾閿濆簼绨绘い鎺嬪灪閵囧嫰骞囬姣挎捇鏌熸笟鍨妞ゎ偅绮撳畷鍗炍旈埀顒勭嵁婵犲嫮纾介柛灞捐壘閳ь剛鎳撻~婵嬪Ω閳轰胶鐤呯紓浣割儐椤戞瑩宕ョ€n喗鐓曟い鎰靛亝缁舵氨绱撻崘鈺傜婵﹤顭峰畷鎺戔枎閹搭厽袦婵犵數濮崑鎾绘⒑椤掆偓缁夌敻骞嗛悙鍝勭婵烇綆鍓欐俊鑲╃磼閹邦収娈滈柡灞糕偓鎰佸悑閹肩补鈧尙鏁栧┑鐐村灦閹稿摜绮旈悽绋课﹂柛鏇ㄥ灠閸愨偓濡炪倖鍔﹀鈧繛宀婁邯濮婅櫣绱掑Ο璇茶敿闂佺ǹ娴烽弫璇差嚕婵犳碍鏅插璺猴工瀹撳棝姊虹紒妯哄缂佷焦鎸冲畷鎴﹀箻鐠囧弶宓嶅銈嗘尰缁嬫垶绂嶉悙顒佸弿婵☆垳鍘ф禍楣冩倵濮樼偓瀚�

引用:http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.Html
ypically during Web application development, the user interface (UI) group creates the site's look and feel. Based on that look and feel, the group creates HTML pages that rePResent the application's functionality and navigation. With a servlets and JavaServer Pages (jsps)-based implementation, where HTML pages are converted into servlets and JSPs, UI developers identify common HTML and JSP view components, sUCh as header, footer, body, menu, and search. This article presents various solutions to effectively and efficiently organize HTML and JSP view components. I evaluate each solution using specific criteria, such as page number, code repetition, and layout control.
To eXPlore templating and layout solutions, we will use the Tiles framework. The Tiles framework's view components are known as tiles. The framework uses an xml configuration file to organize those tiles. This framework not only enables you to reuse tiles, but also the layouts that organize them.
To explore the more powerful and flexible solutions, we will investigate the synergy between the Tiles and Struts frameworks. Struts is an open source framework for developing Web applications using the popular Model-View-Controller (MVC) or Model 2 architectural pattern. Struts comes with a large set of reusable tags for which the Tiles tag library makes an Excellent enhancement.
Evaluation criteria
I will evaluate each solution based on the criteria below. The criteria are not mutually exclusive. For a specific situation and particular application, you must always balance between the strengths and weaknesses of each solution with respect to these factors.
Page number
A solution should strive to minimize the number of HTML and JSP pages. As the page number increases, the complexity of developing, managing, and maintaining an application increases drastically.
Code repetition
Under most circumstances, repetition is bad. The more repeated HTML and JSP code, the more difficult it is to develop and maintain an application. A simple change can result in a cascade of changes in many different pages with unpredictable consequences. A concrete and practical way of attaining reuse is to avoid code repetition.
Layout control
- ››Struts2配置文件中redirect传递中文参数乱码的解决...
- ››StrutsTestCase 简化开发过程
- ››struts 中一些包的详解
- ››struts1与struts2的区别
- ››struts学习1
- ››struts-2.1.8.1+jquery-1.3.2+spring-framework-2...
- ››Struts优缺点及实施经验总结
- ››Struts优缺点剖析
- ››Struts2中的DMI
- ››TileSense: AS3 tile based platform engine
- ››Struts2入门介绍1 -- Struts2介绍及运行一个简单...
- ››Struts2 redirectAction转向时默认加pass的问题
更多精彩
赞助商链接