The goal of this assignment is to explore the use of the Faces framework for developing M - V - C systems. Faces is a more recent framework than Struts. Whereas Struts is very "protocol oriented," Faces is more object oriented and presents a programming model that resembles Java's event-listener architecture.
As with earlier assignment, you should see the benefits of the M -V - C architecture and the clean separation of function into components with respect to reuse. You should be able to reuse most of the code from the Struts and/or Applet exercises but reconfigured and reconceived into a different architecture. You will see similar function being renamed and recast into an alternative set of component classes.
Since the Faces assignment extends concepts introduced earlier, you should look for common elements among their designs and implementations. Thus, you should try to answer the following questions:
- What are the fundamental components and functions present in the architectures and their implementation?
- How are these components related to one another?
- What is the trace of interaction among them generated by users' actions?
With respect to Faces, itself, more immediate goals include:
- learning the Faces architecture
- understanding how to design a simple M-V-C system that uses the Faces framework and components
- setting up an IDE (i.e., Eclipse) for Faces development
- configuring a JavaServer for Faces applications
- deploying a Faces system from an IDE to a JavaServer
Clean-up Earlier Components
Your model components should not require changes for this assignment and your view and large portions of your control and view components can be reused. Use this occasion to edit and refine your code for these modules and complete any deficiencies and/or correct any errors from your earlier assignments.
Requirements
- The basic application remains the same. Your Faces AddressBook should provide a similar, if not identical, appearance as earlier implementations, and it should provide the same function.
- You can use the same database tables, but you may wish to implement another set of tables for debugging purposes so that your previous AddressBooks remains operational. (Do keep those applications working.)
- You should set-up Eclipse to support Faces applications and use it to develop your implementation.
- You should set-up your JavaServer to support Faces applications and you should deploy your application to it and test it there before deploying to the production server (wwwj).
- Deploy your application to the production server (wwwj) when it is thoroughly tested and be sure that it works in that environment.
- Modify your JSPs to use the Faces taglibs.
- Put your JSPs in a subdirectory for this assignment.
- Define an appropriate set of ManagedBean classes that replace Servlets or Struts Actions as the basic control components.
- Study and understand the various Eclipse-generated configuration files, especially the faces-config.xml and web.xml files.
Documentation
Be sure to update your documentation for this project. Be sure that your Project Description describes the application and provides user instructions for using your system. (It should be 1-2 pages in length.) Similarly, you should update your System description, describing your components, the relationships among them, and key implementation details. You should also comment on steps taken to transform your Struts and Applet AddressBooks into your Faces AddressBook and any problems and/or insights you encounter along the way. Also, be sure to include/update comments in your code.
Run the Application