Active Server Pages[Classic] - Quiz Explanation

The correct answers are indicated below, along with the text that explains the correct answers.
   
 
1. Perl is the most popular language for writing CGI scripts or programs. This is because:
Please select the best answer.
  A. It’s powerful and widely available
  B. CGI was designed to be written in Perl
  C. It’s the only language you can use with CGI
 

The correct answer is A.


Perl has powerful file-searching and pattern-matching strengths that make it a great fit for most Web programming. You can find Perl for UNIX, NT, the Mac, and many other Web platforms, so Perl scripts are remarkably portable.
B is incorrect because CGI was not designed with Perl in mind. C is incorrect because Perl was built long before the Web and CGI were.

2. The biggest advantage to using server side includes is:
Please select the best answer.
  A. Being able to write the program in any language
  B. Separating your code from the look and feel of your site
  C. Quicker execution time than CGI
  D. Security and stability for your Web server
 

The correct answer is B.


With server side includes, an HTML developer can edit the HTML around the include, without having to change a program. Or a programmer can change a program and not worry about the appearance of the Web site at all. A is incorrect, though you can write server side include programs in any language, because most of the other server-side solutions give you a choice of languages. C is incorrect because programs executed as part of a server side include are not faster than a CGI solution. D is incorrect because many Web hosting providers consider SSI execs to be among the most insecure and dangerous ways of running a program on the Web server.

3. ASP was developed to solve two key problems faced by Web developers. Which of these are they?
Please select all the correct answers.
  A. Maintaining state,Database access
  B. Supporting multiple server platforms
  C Writing easily-maintainable code
  D. Execution speed on the server
 

The correct answer is A .


Maintaining state and exchanging information with databases are the two tasks that ASP makes easiest.
B is incorrect because ASP solutions actually run on fewer platforms than CGI or servlets.
D is incorrect because ASP code is harder to maintain than other server-side technologies.
This is partly because it is mixed with HTML and partly because it is written using scripting languages, which are not as organized as languages like C, C++, or Java.
D is incorrect because VBscript and Javascript are slower than compiled languages like C, C++, or Java.