JavaScript Assignment One:

Pick a Javascript script that you would like to add to your class project web site. If you don't have one that comes to mind, then go to the Day 1 outline, look at the function examples or a JS archive and select one. There are a number of Javascript archives listed that you may look in, any code is acceptable (copyright is not a problem for a class assignment).

I recommend that you DO NOT select an extremely complex function, so we will have the time to review the script you have selected in the class lab session.

a) Define an JS application to add to your web site

b) Locate as much existing JS code as you can to provide the functionality you have defined.

c) Create a detailed logic description for the rest of the application.

Due Date:

Email a preliminary copy of the assignment by Sun evening, 11/29. Show up in class with completed assignment.

Design Approach:

The goal is to select an application that fits your web site and is a complex enough to be challenging but simple enough to tailor to your site in 4-6 hours, including 1-2 hours in class. The class time is important only so far as we need to cover all programming techniques you need to understand for the assignment.

The first assignment does not necessarily include getting the JS programming fully working. What it does include is a written description of what the application is supposed to do and written 'pseudo-logic' for the application. Since there will probably be some JS that you do not yet understand, I do not expect you write that JS code yet. But you do need to detail what the code is to accomplish.

Pseudo logic: - this is the technique of writing a 'program' for each step of your application without worrying exactly how to do specific operations in JS -- just write out what operation is to take place using English. In pseudo-logic, you use simple JS-like statements concentrating on describing what is to happen, not the actual JS statements.

For example, one application has:

step one) Allow user to click on a time cell

step two) Open a form to select the time slot

Since step two is 'fill out a form' -- since this is all being done with JS, the code for step two needs to do the detailed steps such as:

2.1) Open form window

2.2) Create form in window for time slot

2.3) Set focus to form and activate for user data entry

Clearly step 2.2 has more detail as to what is happening, as does the whole of step one.

 

This is just a simple example to explain the pseudo-logic concept, this application has a number of other steps, each of which needed to be detailed to the point where JS can be written. In pseudo-logic, you take the process as close to JS as you can without necessarily writing the exact JS statements.