design
6 tutorials tagged “design”.
- Association, Aggregation and CompositionThree kinds of object relationship, loosest to strongest: association (uses), aggregation (has, can live apart) and composition (owns).
- Composition vs InheritanceWhen to extend a class and when to hold one as a field: the is-a test, fragile base classes, a wrong extends refactored, and a checklist.
- Coupling and Cohesion in JavaTwo measures of good design: low coupling between classes and high cohesion inside each. A tightly coupled order service refactored to depend on an interface.
- Design Patterns in JavaAll 23 classic design patterns in plain English: what each one is for, an everyday comparison, and where Java itself uses it.
- Private ConstructorsWhy you'd block new from outside: utility classes like Math, controlled creation with factory methods, and the singleton pattern.
- SOLID Principles in JavaThe five SOLID design principles explained with Java examples, and a god-class order manager refactored into small classes that are easy to change.