Java Server Faces (JSF) is a MVC (Model View Control) framework for (dynamic) Web-Pages. Facelets is using x-Html pages and Templates to replace JSP (Java Server Pages) for Java Server Faces. It completes the picture and creates a REAL MCV concept (One could use java code within JSP pages). This document tries to explain how JSF with Facelets works, and give a few short directions on how to get it to work. It will also cover how Web 2.0 can be used, and what this means for SVG (Scalable Vector Graphics). All Example-Code within this document is taken from the SVG-Paint Project.
SVG-Paint is a web-based painting program based on SVG and Javascript. It features serveral pre-defined forms as rectangular, circle and line, as well as the possibility to draw free-hand. Drawn objects can be changed, deleted and - in the case of the pre-defined forms - moved and zoomed. Paintings can be saved and loaded. To understand how SVG-Paint works, one first has to understand the techniques used for creating it, which will be presented below.
Java Server Faces with Facelets
MVC
The Model View Control concept tries to seperate the code into 3 layers, so each part of it can be changed easily without affecting the others:
• Model. Here resides everything that actually does the work - all the functions, and all the data structures.
• View. This layer is the one the user can see - it displays the results of the program.
• Control. This last layer controls the workflow of the program. It calls the functions in the model, and uses the functions from the view to display the data
Download pdf SVG-Paint: Java Server Faces, Facelets and Web 2.0 for SVG
Related Searches: scalable vector graphics, jsp java server pages, java server pages, dynamic web pages, paint project
RSS feed for comments on this post · TrackBack URI
Leave a reply