To Lecture Notes

IT 231 -- 11/8/12

Review Questions

  1. What is state for a website?
    Ans: The state of a web session is information that is valid for multiple request and response exchanges between the client and the server. The state might include the logged-in status of a client, the number of times a page has been visited, customer information a logged in client, etc.
     
  2. How do the session variables help keep track of state?
    Ans: State information can be stored as a session variables, as shown in the following question.
     
  3. How do you set the session variable with key :logged_in to true.

     
  4. What do you think is printed?
  5. What is the value of a session variable that has not been set.
    Ans: nil
     
  6. Design a scaffold-based website that implements a shopping cart. Use these models: Customer, CatalogItem, ShoppingCart, LineItem

 

Migrations

 

Error Handling for Validations