Application Architecture, MVC Design Pattern
2021-8-16 About 1 min
# Application Architecture, MVC Design Pattern
1. What are the Pillars of Object Oriented Programming (OOP
)?
Encapsulation
Abstraction
Inheritance
Polymorphism
1
2
3
4
5
2
3
4
5
2. How would you access the name
of the below object using the property
variable?
let staff = {
name: "Tim",
age: 26,
job: "Code Monkey"
}
let property = 'name'
1
2
3
4
5
6
2
3
4
5
6
staff.property
1
3. What is Encapsulation?
A way to restrict access to data. The state is stored privately and only the objects methods can change it.
1
4. What does the S stand for in the SOLID
principles?
Single Responsibility
1
5. What the difference between a class
and an instance of a class
?
A class is a blueprint where you can create an object. An instance of a class is the object.
1
6. What is a Proxy
object?
An object that wraps another object and intercepts the fundamental operations of that object.
1
7. What is the purpose of the MVC
pattern?
It is an architectural pattern that separates the application into three logical components. It cleans up the look of the application and makes it easier to modify and look at the code.
1
8. What is the job of the Controller
in the MVC
Pattern?
Accepts input and converts it to commands for the model or view.
1
9. What is the job of the Service
in MVC
?
Mediates communication between a controller and repository layer.
1
10. What is the job of the Model
in MVC
?
Central Component. It is independent of user interface and directly manages data and logic.
1