WebFund 2013W Midterm Review

From Soma-notes
Jump to navigation Jump to search

Midterm

The midterm is here (without answers).

Audio

Audio from the review on February 12, 2013 is here.

Lecture Questions

Here is a consolidated list of lecture questions. Expect these to reappear on the midterm in some form - potentially identical to that below, but also potentially different. Don't memorize the answers, make sure you know the underlying concepts, associated vocabulary, and key details.

Expect lecture questions to make up about half of the marks of the midterm.

Lecture 3

  1. What is the biggest constrain on the performance of web applications? (one word)
  2. What is the standard that allows web servers to call external programs? (acronym)
  3. What HTTP command is normally used to request the contents of a page?
  4. HTTP cookies are only sent to a web server when explicitly requested. (true or false)
  5. Cookies are normally parsed by client-side JavaScript. (true or false)
  6. In modern browsers, Which is more of a security risk, browser plug-ins or browser extensions? (plug-ins or extensions)
  7. NPAPI and "Pepper" are standards for browser plug-ins. (true or false)
  8. AJAX potentially increases the performance of web servers by offloading computation onto clients. (true or false)

Lecture 5

  1. Every object in JavaScript has a prototype property. (true/false)
  2. The prototype property is used when updating and retrieving an object's properties. (true/false)
  3. The for in construct in JavaScript is not so useful because it loops over all of the accessible properties of an object. (true/false)

Lecture 6

  1. In git, which is the term used for making a local copy of a remote repository, branch, clone, or fork? (one word)
  2. In git, pushes to the main repository can be dangerous because they can cause file conflicts, add unwanted changes, and cannot be easily undone. (true/false)
  3. Augmenting a built-in type in JavaScript uses the same syntax as adding a method to a regular object. (true/false)
  4. Read access to unqualified symbols are resolved by looking at the symbols defined in the inner most function context outward until the global function context is reached. (true/false)
  5. Read access to object properties are resolved by looking at the object's properties and then by looking at the chain of objects pointed to by the objects on the prototype chain. (true/false)

Lecture 7

  1. In the method invocation pattern, a function returns what value if there is no explicit return statement? (one word)
  2. In the constructor invocation pattern, a function returns what value if there is no explicit return statement? (one word)
  3. In the function invocation pattern, this is bound to which object? (one word)
  4. The apply function invocation pattern does not allow you to set the value of this. (true/false)
  5. The use of that is to get around the limitations of the function invocation pattern. (true/false)
  6. When an exception is thrown in JavaScript with throw and handled with a try/catch statement, what is the type of the exception message (i.e., the type of the parameter to the catch clause)? (one word)
  7. Current versions of JavaScript are tail recursive. (true/false)

Lecture 8

1. For the following, choose one of the following terms and match it with the appropriate description:

 node json http html jade stylus express connect jquery ajax css
  • client-side JavaScript library for abstracting browser-specific behavior when accessing DOM elements
  • standard for encoding data, particularly for transport, using JavaScript-like syntax
  • node.js framework for creating web applications
  • node.js extensible http server middleware (i.e., supports plugins to add web server functionality)
  • html template engine for node
  • cleaner CSS syntax for node

2. Sessions impose a strict ordering on HTTP requests in web applications (true/false)

Lecture 9

  1. The form will work fine from the server's perspective even if you remove all the script and link lines the page's head. (true/false)
  2. This form validates on every keypress. (true/false)
  3. The form validates only if you enter a pre-defined country. (true/false)
  4. The "control group" class is used by the core jQuery code. (true/false)
  5. In the context of FormExample(), $ is a global variable. (true/false)

Lecture 10

  1. Express gives you a static file server by default. (true/false)
  2. In express, URLs are all automatically resolved by looking for the appropriately named file. (true/false)
  3. In node, modules declare public functions by assigning them to which object?
  4. Jade templates only allow you to access a restricted subset of HTML. (true/false)
  5. In an HTML form, if I want to return a value called "country", which parameter do I set to "country": id, name, class, for, or type?

Other Questions

Make sure to review Chapters 3-5 in JavaScript: The Good Parts.

Expect to see code (functions and fragments) that you will have to answer questions about, with at least one client-side example and one server-side (node) one. The best way to study for these is to look back at the code presented in the tutorials.

There will also be questions on JavaScript scoping rules and closures. Expect to be able to identify the scope of symbols in different contexts.

There will also be a few short answer conceptual questions that expand on the concepts covered in lecture. Here are some example ones (will be developed in class):