Design Pattern — Quotes
askdmaslsdaljdaljdlajdalsdjaljdaljdlajdajdaljdlajdaljdlajdlajdlajsdlajdlsajdlajdlajdlajdlajskdjasldjasldjalsdjaljdajdlkajdlajdlajdlajdlajsdlasjdlajdlasjdlajdlasjdlajsdlajsldjasdlakjsdlajdadalkd akjsdadakdakdadadkadhakjhdajdhakdhakdhakdhakhdakhdakhdkahdakshdakhdkashdaskdhkahdkahd hello world testing
- Interface is the baby-step to better design.
- Interface caused inheritance.
- Inheritance is static. Inheritance is like English, it creates new word to new meaning instead of reuse-compose existing words. i.e: “eleven” instead of “ten-one”.
- Composition. Holding a reference to target object. Take full controls/responsibility on target object. Also known as wrapper.
- Inheritance vs Composition. We use interface as type matching, composition to get new behaviour.
- Reference. Represent field/variable/property/attribute of a Class. Usually, pass in via Class constructor.
- Decorator. Takes in a reference (behaviour) and act like disguise/double/agent. Enforced by Interface. A decorator is linked to another decorator via reference. Decorator is a linked-list of algorithms.
- Abstract. Interface that can be instantiated(new).