The goal is to modularize.
Examples: Objective-C, Java, Swift
A Class is the blueprint for an Object.
An Object includes Properties, Actions, and Events.
Class | Outside of Class |
---|---|
Methods | Functions |
Properties | Constants/Variables |
Objects encapsulate complexity.
Design pattern: the best practice solution to a common problem
Model: structures the data
View: what the user sees on screen
Controller: communicates between the view and the model
Simple Analogy:
data = ingredients
model = chef
controller = waiter
view = dinner plate
Advantages
-
Provides structure
-
Recognizable by third parties
-
Code reuse
-
Multitasking