SiteMesh

概述:

SiteMesh 是一個網頁佈局和修飾的框架,利用它可以將網頁的內容和頁面結構分離,以達到頁面結構共享的目的。Sitemesh是由一個基於Web頁面佈局、裝飾以及與現存Web應用整合的框架。它能幫助我們在由大量頁面構成的項目中創建一致的頁面佈局和外觀,如一致的導航條,一致的banner,一致的版權,等等。
它不僅僅能處理動態的內容,如jsp,php,asp等產生的內容,它也能處理靜態的內容,如htm的內容,使得它的內容也符合你的頁面結構的要求。甚至於它能將HTML文件象include那樣將該文件作爲一個面板的形式嵌入到別的文件中去。

SiteMesh框架是OpenSymphony團隊開發的一個非常優秀的頁面裝飾器框架,它通過對用戶請求進行過濾,並對服務器向客戶端響應也進行過濾,然後給原始頁面加入一定的裝飾(header,footer等),然後把結果返回給客戶端。通過SiteMesh的頁面裝飾,可以提供更好的代碼複用,所有的頁面裝飾效果耦合在目標頁面中,無需再使用include指令來包含裝飾效果,目標頁與裝飾頁完全分離,如果所有頁面使用相同的裝飾器,可以是整個Web應用具有統一的風格。


項目主頁:

http://www.opensymphony.com/sitemesh/


官方:

What Is It?

  • SiteMesh is a web-page layout and decoration framework and web- application integration framework to aid in creating large sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required.

  • SiteMesh intercepts requests to any static or dynamically generated HTML page requested through the web-server, parses the page, obtains properties and data from the content and generates an appropriate final page with modifications to the original. This is based upon the well-known GangOfFour Decorator design pattern.

  • SiteMesh can also include entire HTML pages as a Panel within another page. This is similar to a Server-Side Include, except that the HTML document will be modified to create a visual window (using the document's Meta-data as an aid) within a page. Using this feature, Portal type web sites can be built very quickly and effectively. This is based upon the well-known GangOfFour Composite design pattern.

  • SiteMesh is built using Java 2 with Servlet, JSP and XML technologies. This makes it ideal for use with J2EE applications, however it can be integrated with server-side web architectures that are not Java based such as CGI (Perl/Python/C/C++/etc), PHP, Cold Fusion, etc...

  • SiteMesh is very extensible and is designed in a way in which it is easy to extend for custom needs.


     

發佈了26 篇原創文章 · 獲贊 1 · 訪問量 1669
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章