Homework for 7B

Review

Topics Covered: Controllers; actions; HTTP verbs.


Exercises

E1: Once More Time

Believe it or not, repetition helps ingrain concepts. What we learned about models is a fundamental building block of learning Rails. Investing time now will pay off in great dividends later.

Please redo the questionnaire. Feel free to use the internet to research your answers. The only thing we ask, however, is you don't look at the answer key if you saved it from last time.

E2: Mapping Facebook

In today's class, we spent some time mapping out various parts of Twitter to figure out which routes/URLs and HTTP verbs map to which parts of each screen. Perform the same exercise again, but this time looking at the Facebook experience. Make sure to sketch out each screen you analyze, and annotate it with which URLs/Verbs you mapped for each component.

E3: Further Down the Amazon

Building off your amazon app from last time, go through our design process

  1. What routes (i.e. urls) make sense for interacting with your application for the actions you listed in Step 3 in 6B exercise 2? Let's call these our activities.
  2. What controller should each route go to? Does the activity always correlate nicely with a resource? If so, which one? If not, why not?
  3. What action in each controller should each activity go to? Is it something that shows a list of instances (index), shows a particular one (show), creates one (create), updates one (update) or deletes one (delete)?
  4. Draw a full map url -> controller -> action for each activity.