Content deleted Content added
m Fix link to Java portal (via WP:JWB) |
|||
(10 intermediate revisions by 5 users not shown) | |||
Line 1:
{{Short description|Programming language and libraries}}
'''Java view technologies and frameworks''' are [[web-based]] [[software libraries]] that provide the [[user interface]], or "[[Model–view–controller|view-layer]]", of [[Java (programming language)|Java]] [[web application]]s. Such [[application framework]]s are used for defining [[web page]]s and handling the [[HTTP]] [[List of HTTP header fields#Requests|requests]] (clicks) generated by those web pages. As a sub-category of [[web framework]]s, view-layer frameworks often overlap to varying degrees with web frameworks that provide other functionality for Java web applications.
Line 6 ⟶ 7:
{| class="wikitable"
|-
! Action-based frameworks:
| [[Apache Struts]], [[Spring Framework|Spring MVC]]
|-
! Component-based frameworks:
| [[Apache Click]], [[Apache Tapestry]], [[Apache Wicket]], [[
|-
! Web template systems:
| [[Apache Tiles]],
|-
|}
* [[
* In contrast, Struts and the [[Spring Framework|Spring MVC Framework]] are action-oriented frameworks that provide a thinner [[abstraction layer]] over the servlet [[API]].
* Apache Tiles is a templating framework designed to work with Struts.
* [[Facelets]] is a view definition and templating technology designed to work with JSF.
*
* Facelets, Tapestry and Wicket have their own templating approaches based on [[HTML]]/[[XHTML]].
* [[Apache Click]] uses HTML based [[Apache Velocity]] templates and [[
==Servlet API==
{{main
The Servlet API is the foundation of almost all Java Web View technologies. Servlet provides the basic mechanism for writing Java [[
==
{{main
* Built on top of the Servlet API, JSP provides a document-centric, tag-based templates, server programming model which can generate many forms of textual content.
Line 37 ⟶ 38:
==Apache Struts==
{{main
* Struts provides for a [[
* Requests are received by a Java Class (Controller) which can decide which View to display.
* The actual View can be written in different view technologies, like JSP, free marker template, velocity template etc.
Line 46 ⟶ 47:
==Apache Tapestry==
{{main
* A component-based view framework.
Line 55 ⟶ 56:
* Changed component classes are live-reloaded into running application for faster development.
* Uses the [[Post/Redirect/Get]] navigation pattern for form submission.
* '''Competitor''': Wicket, JSF
==Apache Tiles==
{{see also |d:Special:EntityPage/Q28912908|l1=Apache Tiles}}
* This is an HTML templating framework based on the [[composite pattern]].
* It allows for the HTML page to be broken up into multiple "pagelets", called Templates, Definitions and Composing pages.
* At [[runtime (program lifecycle phase)|runtime]] the pagelets are stitched together to generate the final HTML. Pages are written in JSP.
* '''Competitor''': SiteMesh
==Apache Wicket==
{{main
* A component-based view framework.
Line 66 ⟶ 75:
* Compared to JSPs, enforces a clear separation of [[HTML element|HTML markup]] and Java code.
* Web page components are 'pushed' into the HTML markup from the code.
* '''Competitor''': Tapestry, JSF
==
{{main
* A specification for component-based view frameworks.
* [[Eclipse Mojarra]] and [[Apache MyFaces]] implementations are available
* Typically uses Facelets for XML/XHTML-based templating.
* Classes are written as POJOs, with Annotations or XML configuration files used to associate them with page and component templates.
Line 82 ⟶ 91:
==SiteMesh==
{{main
* SiteMesh is an HTML templating framework based on the "Decoration" model.
Line 92 ⟶ 101:
==Spark==
{{main
* Spark a micro web framework built around a simple routing system
* It runs on an embedded [[Jetty (web server)|Jetty]] web server by default, but can be configured to run on other webservers.
* It supports three different templates engines: [[Apache Velocity
* It aims to facilitate rapid development, and does not make use of annotations or proprietary solutions.
==See also==
{{Portal|
* [[List of web service frameworks]]
* [[List of Java frameworks]]
[[Category:Java (programming language)]]
|