Java view technologies and frameworks: Difference between revisions

Content deleted Content added
added main article links and changed references (edited with ProveIt)
Line 26:
 
==Servlet API==
{{main article | Java Servlet API}}
 
The Servlet API is the foundation of almost all Java Web View technologies. ServletsServlet provides the basic mechanism for writing Java [[Class (computer programming)|classes]] for web applications. Servlets can respond to HTTP requests, create cookies and maintain sessions.
 
==JavaServer Pages (JSP) ==
{{main article | JavaServer Pages}}
* Built on top of the Servlet API, JSP provides for a document-centric, tag-based templates, server programming model which can generate many forms of textual content.
 
* Built on top of the Servlet API, JSP provides for a document-centric, tag-based templates, server programming model which can generate many forms of textual content.
* Java code may be embedded in JSP files and is compiled and executed when a request is received.
 
==Apache Struts==
{{main article | Apache Struts 2}}
 
* Struts provides for a [[Coupling (computer programming)|decoupling]] of the Controller and the View.
* Requests are received by a Java Class (Controller) which can decide which View to display.
Line 41 ⟶ 46:
 
==Apache Tapestry==
{{main article | Apache Tapestry}}
 
* A component-based view framework.
* Classes are written as POJOs and byte-code transformed at run timeruntime
* Configured with annotations and naming conventions rather than XML
* Compared to JSPs, enforces a clear separation of [[HTML element|HTML markup]] and Java code.
* HTML templates arecan be directly previewablepreviewed by web designers
* Changed component classes are live-reloaded into running application for faster development.
* Uses the [[Post/Redirect/Get]] navigation pattern for form submission.
Line 51 ⟶ 58:
 
==Apache Wicket==
{{main article | Apache Wicket}}
 
* A component-based view framework.
* Pages directly interact with stateful Java components on the server.
Line 60 ⟶ 69:
 
==JavaServer Faces (JSF) and Facelets==
{{main article | JavaServer Faces | Facelets}}
 
* A specification for component-based view frameworks.
* Mojarra and Apache MyFaces implementations are available
Line 71 ⟶ 82:
 
==SiteMesh==
{{main article | SiteMesh}}
* [[SiteMesh]] is an HTML templating framework based on the "Decoration" model.
 
* [[SiteMesh]] is an HTML templating framework based on the "Decoration" model.
* It allows for the creation of a 'decoration' template which is then applied to any other HTML to generate a new HTML.
* The newly generated HTML contains elements from the original HTML blended into the template.
Line 79 ⟶ 92:
 
==Spark==
*{{main article | [[Spark (software) |}}

* Spark ]] is 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 | Velocity]], [[FreeMarker]] and [[Mustache (template_system) | Mustache]]
Line 88 ⟶ 103:
==See also==
{{Portal|Java}}
* [[List of web service frameworks]]
* [[Java Servlet]] Technology (http://java.sun.com/products/servlet/) Java Servlet Technology ]
 
* [http://java.sun.com/products/jsp/ JavaServer Pages Technology]
==References==
* [http://struts.apache.org/2.1.6/docs/home.html Apache Struts 2 Documentation]
* [[Java Servlet]] Technology (http://java.sun.com/products/servlet/)
* [http://tiles.apache.org/ Apache Tiles]
* [[JavaServer Pages]] Technology (http://java.sun.com/products/jsp/)
* [[Apache Struts]] 2 Documentation (http://strutsincubator.apache.org/2.1.6click/docs/home.html) Click Framework Project Documentation]
* Apache Tiles ([http://tileswicket.apache.org/) Apache Wicket]
* [[Click Framework]] Project Documentation (http://incubator.apache.org/click/)
* Apache Wicket (http://wicket.apache.org/)
* [http://tapestry.apache.org/ Tapestry Home Page]
* [http://www.hybridjava.com/ HybridJava Home Page]