You are on page 1of 2

Department of Computer Science, Faculty of Science, UU.

Made available in electronic form by the T C of AEskwadraat B In 2006/2007, the course INFOINP was given by Lennart Herlaar.

Internetprogrammeren (INFOINP) 17 april 2007

This examination is closed book. You are not allowed to use your book, lecture notes, lecture slides, etc. during this examination. This examination consists of 15 subquestions in 5 categories. Each subquestion has the same weight and therefore accounts for 1/15th of your overall grade for this examination. Be clear and precise. Try to be compact. Note that you have two and a half hours to nish this examination. That is 10 minutes for each subquestion.

Question 1: PHP/JavaScript/Webdatabases
a) Explain how a PHP script works. (Some aspects to guide your answer: what is a PHP script? What is needed to run a PHP script? What happens when you open the URL of a PHP script? How is input for and output of the script handled? etc.) b) What are the main dierences between JavaScript and Java? How would you characterize each of these languages? c) Give an example (in pseudocode or in PHP) of a garbage collection mechanism on a state table. Explain your implementation.

Question XML/XSLT
a) Explain what RSS and Atom are and how these are related to XML. b) Explain what XSLT is and how it is related to XML.

a) What are the dierences between HTML and XHTML? Address in your answer both the syntactical dierences as well as the dierence in philosophy. b) Explain how conicting Cascading Style Sheets are dealt with. Furthermore, name the three locations where style information can be stored. c) What are the dierences between DHTML and AJAX? Be sure to name and explain the technologies that each of these standards is composed of.

Question 4: Server Side Scripting/Security/Regex

a) After a user logs into a web application, the application needs to be able to identify this user during subsequent page requests, preferably without the username and password being transferred again (and again). Describe at least two techniques that can be used for this purpose and explain how each of these techniques could be made as secure as possible. b) What is SQL injection? Illustrate your answer by means of an example. c) Provide a regular expression that matches current Dutch license plates (nummerborden), consisting of either a sequence of 2 digits, a dash, 2 capitals, a dash and 2 capitals (example: 01-AB-CD) or a sequence of 2 digits, a dash, 3 capitals, a dash and 1 digit (example: 01-ABC-2). Try to be as compact as possible. Explain your regular expression.

Question 5: AJAX/Web 2.0/Frameworks

a) Explain what xajax is and how this library diers from more conventional AJAX JavaScript libraries such as Feather AJAX and prototype. b) Explain what JSON is and how it is related to AJAX. What are the advantages and disadvantages of JSON? c) Name some of the characteristics that a modern website should have to be considered a so called Web 2.0 website. Give at least three examples of popular Web 2.0 websites. d) What is meant by POLS, DRY and Convention over Conguration? Explain how these principles are related to Ruby and Ruby on Rails.