CSE 3901 Final - Rails EXAM Questions with 100%
Correct Answers | Verified | Updated (Actual
Exam)
Save
Terms in this set (45)
A pattern that separates a program into the data, the
observer and the controller
Model
- The data (i.e. state)
- Methods for accessing and modifying state
View
MVC Pattern
- Renders contents of model for user
- When model changes, view must be updated
Controller
- Translates user actions (i.e. interactions with view)
into operations on the model
- Example user actions: button clicks, menu selections
, Model
- Database (table with rows)
- Classes that wrap database operations (class with
instances)
View
MVC in basic web - HTML (+ CSS, JavaScript) files rendered by client's
application browser
- Skeleton files used by server to generate these
HTML files
Controller
- Receives HTTP requests via web server
- Orchestrates activity (model and view)
General strategy for OO languages:
- Table in database - a class
Mapping table to objects
- Table columns - attributes of the class
- Table rows - instances of class (objects)
Database is a collection of tables
Each table has a list of columns
Database tables
Each column has a name and a type
A table has a list of rows
Programmatic way for application to interact with
database
- Model = a Ruby class
- Extends ApplicationRecord
Models - Found in app/models
Each class corresponds to a table
- Note: Models are singular (tables are plural)
- Includes attributes corresponding to columns
implicitly
Correct Answers | Verified | Updated (Actual
Exam)
Save
Terms in this set (45)
A pattern that separates a program into the data, the
observer and the controller
Model
- The data (i.e. state)
- Methods for accessing and modifying state
View
MVC Pattern
- Renders contents of model for user
- When model changes, view must be updated
Controller
- Translates user actions (i.e. interactions with view)
into operations on the model
- Example user actions: button clicks, menu selections
, Model
- Database (table with rows)
- Classes that wrap database operations (class with
instances)
View
MVC in basic web - HTML (+ CSS, JavaScript) files rendered by client's
application browser
- Skeleton files used by server to generate these
HTML files
Controller
- Receives HTTP requests via web server
- Orchestrates activity (model and view)
General strategy for OO languages:
- Table in database - a class
Mapping table to objects
- Table columns - attributes of the class
- Table rows - instances of class (objects)
Database is a collection of tables
Each table has a list of columns
Database tables
Each column has a name and a type
A table has a list of rows
Programmatic way for application to interact with
database
- Model = a Ruby class
- Extends ApplicationRecord
Models - Found in app/models
Each class corresponds to a table
- Note: Models are singular (tables are plural)
- Includes attributes corresponding to columns
implicitly