티스토리 뷰

프로그래밍

[Spring 3] MVC: Tiles Plugin

앙망 2011. 4. 11. 14:41

Tiles is a composite view framework: it allows to reuse page pieces across the application.

 

http://tiles.apache.org/
http://tiles.apache.org/framework/tiles-jsp/tlddoc/index.html 

Composit View Pattern
비슷한 구조를 가지고 생성되는 페이지들의 전형적인 사용법을 공식화 한다.
The "classic layout", a typical structure of a web page.
 
The body changes, while the rest remains the same.

다른 페이지들이지만 다른 점은 오직 body부분 뿐이다. 
composite view pattern을 사용해서 다른 부분들은 재활용되고 레이아웃의 지속성이 보존한다.  

Aspect Composite View Decorator
Reusability The different parts of the
page (template and pieces) can
be reused across the whole
application.
Each decorator can be
reused, but the decoration
itself can be applied to
one page at a time.
Ease of
configuration
Each page must be defined
explicitly.
The decorator can be
applied even to the entire
application.
Runtime
configuration
The pages can be configured
and organized at runtime
Since one page is decorated
at a time, this feature is
not present.
Performances Low overhead for composition. The page to be decorated
has to be parsed.


참고 :  Core J2EE Patterns - Composite View

필요한 JAR 파일들
 tiles-api-2.2.2.jar
 tiles-core-2.2.2.jar 
 tiles-jsp-2.2.2.jar
 tiles-servlet-2.2.2.jar 
 tiles-template-2.2.2.jar 
 commons-beanutils-1.8.0.jar  commons-digester-2.0.jar 
 log4j-1.2.16
다운로드 사이트 
http://tiles.apache.org/download.html
http://logging.apache.org/log4j/1.2/download.html
http://www.slf4j.org/ 

댓글