CS 412 Final Exam Study Guide
-
There will be true/false and essay questions.
-
You need to be familiar with the class assignments.
-
Remote Method Invocation
-
Major steps in creating a distributed system with RMI
-
Defining and implementing the remote interface
-
Defining and implementing the client
-
Compile, code placement and execution
-
Problems that we may face while trying to compile and execute a RMI based program. Including the problems we faced (or I explained) in the lab and how we solve them.
-
You may be ask to write a small program to show how RMI works
-
Java Database Connectivity
-
SQL basic syntax
-
Basics of Relational database model including operations such as join and projection
-
Using SQL to merge data from multiple tables
-
How to connect to databases, query, and display results
-
What are the drivers used for Oracle and Access connection
-
Be able to write a simple program to connect to a Oracle or Access database and do some queries
-
Servlets
-
What are the server side and the client side tools provided by Java?
-
What protocol is used for servlets?
-
How does servlet work? Overall view of the mechanism
-
Servlet Interface
-
What are the 2 major abstract classes that implement Servlet interface? What are the major methods and what do they do?
-
What is the main responsibility of “service” method?
-
How do doGet and doPost methods are called? What are Get and Post methods?
-
Know the main capabilities (methods) of HttpServletRequest and HttpServletResponse
-
What are the main steps we take for the deployment of our servlets?
-
What are the available tools for session tracking?
-
How do Session and Cookies work?
-
What are the possible problems we may face in running servlets and cookies?
-
What are Multitier applications? Describe a three tier application that uses servlet and JDBC technologies? What are the possible problems that we may face running such tree tier application?
-
JSP & Beans
-
Describe JSP architecture
-
What are the steps required for a JSP request?
-
Why use JSP? And compare JSP to Servlet
-
What are the main tags of JSP (five different types of tags)? Describe each one
-
What are the main types of directive tags? You need to know “page” and “include” directives
-
How do you set up an errorPage?
-
What are the action tags and how does Dynamic JSP Include work?
-
Write a “counter” JSP program similar to the example in the slides.
-
What are some of the important implicit objects available for JSP?
-
What is the logic behind using JavaBeans? Know the basics of bean implementation
-
JavaScript Study Guide (examples of what you might see in the exam)
Q: How do you add JavaScript to HTML? Provide an example.
A: Using the
External:
Q: Where does JavaScript run? What does this help with?
A: It runs on the client machine/browser. This helps ease processing power on the server.
Q: When should you NOT use JavaScript?
A: When accessing resources or when you need to worry about privacy.
Q: Give three examples of objects found in the DOM.
A: window, history, link, location, anchor, history, text, radio, checkbox, textarea, password, submit, reset, button, select, options, etc
Q: Where are Cookies stored? Say you have a site of your own. How do you delete a cookie for a user?
A: Client machine/browser. Set the expiration date before the current time or set to current time. Basically, expire the cookie.
Q: Using JavaScript’s Math object, find the square root of two.
A: Math.SQRT2 or Math.sqrt(2)
Q: How do you make a regular expression in JavaScript?
A: new RegEx(pattern, modifiers); or /pattern/modifiers;
Q: Write a constructor function for an object. Have the object have two variables
A: function x (y, z) { this.y = y; this.z = z; }
Q: Write a callable function that takes one input for an object. Write how you would call the function.
A: x.bar = function (foo) { document.write(foo); }; x.bar(“hey”);
Q1: What does the acronym AJAX stand for?
Answer: AJAX stands for Asynchronous Javascript and XML
Q2: What is the primary purpose of AJAX?
Answer: The primary purpose of AJAX is to dynamically update parts of a web page without having to reload the entire page.
Q3: Is AJAX a programming language? Explain:
Answer: No. AJAX is a mechanism based on several existing technologies and is implemented as an object within the web browser.
Q4: List some of the technologies utilized by AJAX.
Answer: AJAX uses XML (or other data exchange formats, such as JSON), the DOM, Javascript, and CSS.
Q5: What object is used to perform AJAX operations?
Answer: In Microsoft Internet Explorer versions prior to version 7, AJAX operations were performed on the ActiveX object named XMLHTTP. In all other supporting browsers, the XMLHttpRequest Javascript object is used.
Q6: List the parameters passed to the ‘open’ method of XMLHttpRequest:
Answer: The ‘open’ method of XMLHttpRequest requires three parameters. The first parameter indicates the request method, and can be POST, GET, or any other valid HTTP request method. The second parameter indicates the URL of the document to be retrieved by the AJAX request. The third parameter indicates whether or not the AJAX request should be made synchronously or asynchronously. Two additional parameters, a user name and password, can also be specified.
Q7: Once an AJAX request is created using the ‘open’ method of XMLHttpRequest, how is the request sent to the server?
Answer: The AJAX request, once created, is sent to the server using the ‘send’ method of XMLHttpRequest.
Q8: Can we add information to the HTTP request header with AJAX?
Answer: Yes. Information can be added to the HTTP request header using the ‘setRequestHeader(header, value)’ method of XMLHttpRequest.
Q9: Describe the two methods used for getting the AJAX response data.
Answer: ‘responseText’ contains the server response data when the data is not XML. ‘responseXML’ provides the server response data when the data is XML.
Q10: Describe the ‘readyState’ variable.
Answer: The ‘readyState’ variable of the XMLHttpRequest object contains the current state of the AJAX request.
Q11: What are the possible states of the ‘readyState’ variable?
Answer: 0 – Request not initialized
1 – Server connection established
2 – Request Received
3 – Processing request
4 – Request finished and response is ready
Q12: How can we monitor changes to ‘readyState’?
Answer: ‘readyState’ can be monitored for changes by assigning a function to the ‘onreadystatechange’ event.
Q13: With the understanding of what AJAX is used for, list several popular websites that make use of AJAX.
Answer: Some examples of websites that make use of AJAX are Gmail, YouTube, Google Maps, and many, many more!
Share with your friends: |