Comp 426
Mid-Term Exam

Name:_________________________

The goal of this exam is to get you to think about a several key issues that we have discussed this semester associated with Web-based systems and to guide you in reading about and considering some of the issues that will be important in the second half of the course. 

The exam is "open book" and open notes -- you may consult printed and/or online material.  If you include such material in your answers, either by direct quote or by paraphrase, cite those sources in your answers.  However, you should NOT discuss the exam with others or get help from others until after you have turned in your exam.

Please prepare your exam online and return it to me by email no later than noon, Wednesday, October 27;  late submissions will not be accepted.


1.  [10 pts] What is a layered architecture?   Name and comment on several of the advantages and disadvantages of this architecture.

2.  [10 pts] What is the model - view - controller pattern?  Name and comment on several of the advantages and disadvantages of this design structure.  How does the m - v - c pattern relate to a layered architecture?

3.  [20 pts.] Describe the lifecycle of a JSP.  Include both the first time a JSP is accessed and subsequent times.  Include in your answer the sequence of steps/components a request goes through from the time it leaves a browser to the time it gets back.

4.  [20 pts] JDBC enables a Java object to interact with a relational database.  Whereas the function of the interaction can differ substantially depending on the SQL expression used in the query or update, the basic steps leading up to the query or update and those leading away from it in which the results are noted or processed are usually quite similar. 

List the 6 or 7 steps required for a complete JDBC interaction, include example code for each, and explain exactly what each step is doing and/or why it should be done.  Be sure to include the steps that should normally follow after the actual query or update.
 

The next few questions concern JavaServer Faces.  Some of the issues referred to in these questions will have been discussed in class; some will not have been.  You should use this exam as an opportunity to read further about JSF.  See the references include at the end of the JSF lesson, especially the three earliest articles by Richard Hightower, but you may also wish to search and read more broadly (e.g., the RoseIndia description of the JSF Life Cycle.)

5.  [20 pts.]  Discuss the  JSF lifecycle.  What are the major phases?  What are the major tasks that are carried out in each.  How do these JSF tasks/phases correspond to the tasks/phases that we developed in our Servlet-based front-to-back application?  Be explicit and relate each one that you can. 

6. [ 20 pts.]  JSF includes several different facilities for validating input data and reporting errors or deficiencies to the user.  Identify 3 or 4 such facilities.  Describe their capabilities and use.  Include in your discussion several types of data "problems" that could be determined by each and several that could not.


Pledge: I have neither given nor receive unauthorized aid on this exam.

Signed: __________________________