Chapter Two - Part 5: Model View Controller
Warm-Up / Bellringer
- What command lets you check your resources from the command line?
Time to learn about the Model, View, Controller design pattern. Things you will learn in this section...
- What MVC is.
- The relationship between the model and the database
- The relationship between the controller and the view
Watch the video(s). Be prepared to answer the questions in the "Checks for Understanding" section below. Use the VLC player on your computer, pause, stop, scrub and play in order to follow along with the video.
Checks for Understanding
- What file holds the methods for index,show,new,destroy?
- When you view a Rails app on your browser the first place it goes to is?
- The second place?
- The third place place?
- The fourth place?
- The fith place?
- The sixth place?
- The seventh place?
- The eigth place?
FOLLOW AND DO what is on the video(s), Use the VLC player on your computer, pause, stop, scrub and play in order to follow along with the video.
- instance variable
On to Part 6
Extra Practice / Homework
- On this Rails guides page scroll down to section 4 "Hello, Rails!" I want you to take a look at the table RIGHT ABOVE this section. This File/Folder - Purpose table illustrates what each directory in a Rails app contains.
- You must know which folder contains the mvc folders, and which ones are related to your database connection.
- IMPORTANT! What is Active Record? Go visit RailsGuides to find out!