The goal of this assignment is to explore the use of a thick client application component situated within an overall Struts framework.
Many Web-based systems rely on conventional HTML pages and/or Forms to provide user interaction. That is, the user interacts with the system by inputting data to an HTML form, pressing a button, and receiving results or confirmation in the form of another Web page and/or form. Whereas Web pages can support some processing on the client side -- e.g., through JavaScript -- most form-based application processing is normally done on the server side.
Some applications, however, may be more efficient or may require more substantial processing on the client side. Reasons vary, including not wishing to transmit large quantities of data from client to server, not wanting to transmit especially sensitive data, not wanting to transmit large quantities of results -- e.g., graphic representations -- back from server to client, etc.
Such needs have resulted in the notion of a thick client, implemented in a conventional programming language such as Java, in contrast to a thin client, implemented as a small, easily transmitted Web page.
In the J2EE world, there are two basic approaches to delivering Java-based thick clients. The most common approach, and the one we will explore, is using the Java Applet framework. The other approach is based on delivering a stand-alone Java application to a client workstation; the user then invokes the conventional Java application which can open a socket connection with a server to support client/server interaction. This latter approach has been facilitated by a application distribution system, called Java Web Start, that enables automatic downloading of Java applications to remote client computers.
In this assignment, you will retain a basic Struts M - V - C framework, including Action and Model components, but replace the AB.jsp View component with a Java Swing Applet and replace the AB Action component with a conventional Servlet that provides similar control function, i.e., determining user intention, passing data to the Model, receiving and reviewing results, and sending the data to the View, in this case, the Applet.
Clean-up Earlier Components
Your Struts components should require only minor changes for this assignment. 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 Struts AddressBook should provide a similar 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 use Eclipse to support this Struts and Applet application and use it to develop your implementation.
- You should deploy your Struts and Applet-based 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 and taht your earlier Struts Addressbook also remains operational.
- Crate a Java Swing Applet that will replace your AB.jsp View.
- Create a Java Servlet that will replace your AB Action component.
- Use a Java URLConnection to communicate between the two.
- Define one or more DataBeans to carry requests from client/Applet to server/Servlet and return responses.
- Create an ABApplet.jsp page that includes an Applet tag to invoke your Applet View/client.
- Integrate these new resources into your Struts navigation structure.
- Be sure that you have current versions of Mozilla (=>1.7.3) and the Java Runtime & Plugin (=>1.5.0) installed on your client machine.
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 AddressBook into your Applet 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