Please complete it using a word processor or ascii text editor. Print
out your answers and either:
place it in my mailbox in Claxton 203, or
give it to the receptionist in Claxton 203
You may be surprised by the format of this exam because it involves no
coding. I figure that you got that experience doing the homework
problems. In this exam I want to know if you have mastered the
higher level concepts about scripting languages, if you understand
when it is appropriate to use each one, and if you understand the
tradeoffs between conventional languages and scripting languages.
Hence the essay and fill in the blank problems.
Unless otherwise noted, limit your answers to essay questions to no
more than 4 sentences. Do not try to circumvent this limit by
using long, rambling sentences. More credit will be given to crisp,
well reasoned answers.
(15 points): Fill in the blanks for the following questions:
_____________________ The object model in Javascript is not called
a class-instance model but is instead called what?
_____________________ If you simply need to make a single pass through
an XML document to convert the tags
from one set of names to a
different set of names, which XML parser should
you use?
_____________________ Which PHP XML parser allows you to accomplish 80%
of what you want to do with 20% of the effort?
_____________________ Which language, among the languages we discussed
in this course, allows you to dynamically add
new properties or methods to an object?
_____________________ What XML tool allows you to specify both the
structure of an XML document and the data types
of elements in that XML document?
(20 points) Choose the best answer from the following set of choices:
compiled language, like C
HTML
CSS
XML
SQL
XPath
Perl
Javascript
PhP
DTD
Schema
Regular Expressions
_____________ The query language for XML.
_____________ The best language to use for client-side scripting.
_____________ The best language to use for computationally intensive
problems.
_____________ The best and simplest language for specifying the
structure of a web page.
_____________ The language to use for specifying the appearance of a
web page.
_____________ The most modern language for perform server-side scripting.
_____________ The language best used for marking up the data content
of a document.
_____________ The language best used to store your data when your
data is well organized
into a consistent set of fields and efficiency is of
the essence.
_____________ The language that along with TCL ushered in the era
of scripting languages. Also known for its report
extraction capabilities via regular expressions.
_____________ A compact notation that allows you to easily specify
type checking expressions for data.
(5 points) In three sentences or less, explain the importance
of AJAX to web scripting (please do not tell me what the acronymn stands
for).
(12 points) Early in the semester we discussed a number of features
of scripting languages that allow programmers to more rapidly develop
and debug code than with corresponding conventional languages. List 4
of these features, and for each one describe how it makes program
development more efficient.
(8 points): Why does a language like Javascript allow the case
branches of switch statements to contain numbers, strings, and variables,
while a compiled language like C allows only integers?
(5 points): What makes PHP a better language than Perl for
creating dynamic web pages?
(15 points): This question has two parts:
Describe two client-side and two server-side
solutions to keeping session information using PHP, and describe the
advantages of each. Use no more than three sentences for each solution.
Is it better
to keep session information on the client-side or the server-side?
Why?
(10 points): Describe what advantages XML has over a database
and what advantages a database has over XML.
(10 points): This question has three parts:
What are the advantages of using cascading style
sheets to create the appearance and page layout of a web document
over specifying the appearance in each html document?
Are cascading style sheets better at specifying the visual
appearance of a web document or the page layout of a web document?
Justify your answer.
What element in HTML is often used to perform page layout and
may well be superior to anything that CSS offers?