Web development Flashcards
1
Q
What is MVC?
A
Model-View-Controller
Software development architectural pattern which separates applications into 4 different layers:
- Data layer: the database which serves a web application.
- Model layer: interacts with the database, transforms stored data into a form understandable by the application. Each model object represents a table in the relational database.
a. Logic for accessing and processing data.
b. Input validation for data security.
c. Eg. ORM. - View layer: displays data to the user in an interface and accepts user input. View objects may be a template (eg. HTML) which can be filled with relevant information.
a. Controller layer: interacts with the model and view layers to transmit data between the two, as well as carry out business logic based on the inputs/data.
2
Q
What are the advantages of the MVC method?
A
Advantages:
a. Well-understood and highly-implemented paradigm - can be quickly understood by new developers to aid development and debugging.
b. Separation of concerns improves speed of writing code (reuse of components) as well as data security (isolation of data away from access points).
3
Q
Name 3 examples of web development frameworks which use the MVC architecture
A
- Djando (Python)
- Ruby on rails (Ruby)
- SpringMVC (Java)