Exercises
E1: The Magical Shopping Metaphor
Hopefully today's lecture gave your a better understanding of picturing MVC. The process is analogous to a customer coming to a shop, being greeted, and getting an item. See if you can match elements from each of the following two groups:
MVC componets
- Routes - routes to the appropriate Controller action when a URL is hit
- Controller - talks to Models & Views
- Model - stores abstract information about a resource
- View - displays data returned by the controller
- Database - stores instances/raw data of resources
Rails MVC components
- Inventory
- Product Displays
- Department Head
- Front Door Greater
- Product Specialist
Projects
Final Project Proposal
During your presentation, you got some feedback about your idea. Start tweaking it to reflect that feedback. Think about all the different types of users, and all the things that they might want to do. Start thinking about what the interface might look like, and also, now, what Models, Views, and Controllers that you might need. Most likely, you'll need a User resource. What else?
Spend time on the weekend finalizing your project idea and your groups.
On Monday night , you'll have to have your groups and projects decided! You also need to write a formal proposal that Micah and the TAs will approve. The proposal is extensive, however, so it's best to start earlier.
Here's an outline on what goes on the proposal (which may be written as a Google document or a markdown one), please address these points:
- Name of the product.
- All the members in your group.
- In one-two sentences, what your product does and what problem it solves—it should primarily be a Ruby on Rails application. We want you to keep this short so you have practice succinctly stating your idea.
- A list of existing, similar products in the market and why your app is better.
- Create 3 user personas. If you don't know what user personas are, Google them.
- Create a scenario for each persona.
- A features section that has the minimum number of features for the personas to reach their goals. The idea is to describe your minimum viable product (MVP).
- A design section that has mockups/sketches of all the pages of your website and how they might look. These should describe the user flow through your app from first visit to final goal.
- How the features/designs/tasks will be split up amongst the members of your group. You may assign each feature to a person, or split it up another way. While coding in pairs is often effectively, having three people writing the same code at the same time is not.
- A dependencies section that details any gems, APIs or other dependencies your product will need.
- This will be a long one: A code section that briefly outlines all the features you'll actually code, and any problems you can foresee. Then, go through what we did in class on the whiteboard by making models, describing their attributes and relations, and creating logical controller actions for each model. Drawings might help for this section as well.
- A timeline, with dates, of when you plan to have each feature done. Remember to plan to be finished a couple of days before you have to present—you can bet on having errors! Try to focus on one feature per day. Also leave some time to rehearse your presentation.
Best of luck!