Abstract: One important difference between writing object-oriented software and writing procedural software is the notion of object construction. Objects must be instantiated before they can be used. This is much more than a technical detail, it is at the very core of OO's usefulness.
A key distinction—and therefore opportunity—of object-oriented programming over procedural programming is that objects have two phases in their lifecycle: creation and use. By separating these two phases so that certain kinds of tasks are done when an object is created, and other kinds of tasks are done later during usage, we can build software that’s more modular, independently verifiable, and extensible.
In this session, we’ll explore how you can leverage object instantiation to build more testable, decoupled, and maintainable systems. We’ll cover several common antipatterns in instantiation along with replacement patterns that drop the cost of ownership for software built in object-oriented languages such as Java, C Sharp, C++, etc.
Learning Outcomes: - Leverage object instantiation to write more decoupled and maintainable code
- Use the object-oriented programming model to build maintainable software
- Recognize and avoid instantiation anti-patterns that make code harder to extend
- Apply instantiation patterns that improve software’s testability and extensibility
- Know when to use factories to efficiently construct groups of objects that go together
- Encapsulate object construction to gain the benefits of a factory without extra work
Attachments: