WebFund 2013W Midterm Review
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
- What is the biggest constrain on the performance of web applications? (one word)
- What is the standard that allows web servers to call external programs? (acronym)
- What HTTP command is normally used to request the contents of a page?
- HTTP cookies are only sent to a web server when explicitly requested. (true or false)
- Cookies are normally parsed by client-side JavaScript. (true or false)
- In modern browsers, Which is more of a security risk, browser plug-ins or browser extensions? (plug-ins or extensions)
- NPAPI and "Pepper" are standards for browser plug-ins. (true or false)
- AJAX potentially increases the performance of web servers by offloading computation onto clients. (true or false)
Lecture 5
- Every object in JavaScript has a prototype property. (true/false)
- The prototype property is used when updating and retrieving an object's properties. (true/false)
- 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
- In git, which is the term used for making a local copy of a remote repository, branch, clone, or fork? (one word)
- 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)
- Augmenting a built-in type in JavaScript uses the same syntax as adding a method to a regular object. (true/false)
- 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)
- 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
- In the method invocation pattern, a function returns what value if there is no explicit return statement? (one word)
- In the constructor invocation pattern, a function returns what value if there is no explicit return statement? (one word)
- In the function invocation pattern, this is bound to which object? (one word)
- The apply function invocation pattern does not allow you to set the value of this. (true/false)
- The use of that is to get around the limitations of the function invocation pattern. (true/false)
- 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)
- 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
- 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)
- This form validates on every keypress. (true/false)
- The form validates only if you enter a pre-defined country. (true/false)
- The "control group" class is used by the core jQuery code. (true/false)
- In the context of FormExample(), $ is a global variable. (true/false)
Lecture 10
- Express gives you a static file server by default. (true/false)
- In express, URLs are all automatically resolved by looking for the appropriately named file. (true/false)
- In node, modules declare public functions by assigning them to which object?
- Jade templates only allow you to access a restricted subset of HTML. (true/false)
- 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
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):