Java view technologies and frameworks
Appearance
Following is list of various view technologies available for the Java platform, and the frameworks which support them.
- Servlet API: This is the foundation of almost all Java View technologies. It provides the basic framework for writing Java classes that can respond to HTTP Requests, create Cookies and maintain Sessions.
- JSP: Built on top of the Servlet API, JSP provides for a HTML centric Server programming model. Java code is embedded in the JSP files and is executed when a request is received.
- Apache Struts2: Built on top of the Servlet API, Struts2 provides for decoupling between the Controller and the View. Requests are received by a Java Class (COntroller) which can decide which View to display. An XML configuration file is used to specify the flow of the request to the appropriate Controller, and which View to display based on the outcome of the Controller.
- Apache Struts-Tiles: This is a HTML templating framework based on the "Composite" model. It allows for the HTML page to be nroken up into multiple pagelets, called Templates, Definitions and Composing pages. At run time thee pagelets are stitched together to generate the final HTML. Pages are written in JSP.
- Wicket: Provides a 'Component' view technology - meaning the Request-Response Stateless paradigm of HTTP is abstracted away to give rise to a Object Oriented Stateful paradigm. Pages now directly interact with Stateful Java Components on the server. Components and their State are managed by the Wicket framework, freeing the application developer from having to use HttpSession directly to manage state themselves. Further, Wicket provides for a clear separation of HTML markup from code, and there are no XML configuration files to manage.