Common Patterns Flashcards
1
Q
What is an abstract factory?
A
An object creational pattern that focuses on the delegation of instantiation from one object to another
2
Q
What is a factory method?
A
A class creational pattern that focuses on the use of inheritance to decide the object to be instantiated
3
Q
What is a creational pattern?
A
A pattern that abstracts the object instantiation process. Hides how objects are create.
4
Q
What’s the idiom for creating new objects?
A
In PHP, new operator. In JS, the literal syntax or new.