David Bernstein: Patterns of Instantiation
Details
About this talk:
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 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 and extensible.
In this session, we’ll explore how you can leverage object instantiation to build more decoupled, extensible, 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.
Benefits:
• Leverage object instantiation to write more decoupled and testable code
• Learn how to use the object-oriented model to build maintainable software
• Recognize instantiation anti-patterns that make code harder to extend
• Apply instantiation patterns that improve testability and extensibility
• Know when to use factories and how to construct them efficiently
• Encapsulate construction to improve an object’s testability and extensibility
Bio:
David Scott Bernstein is the author of the book Beyond Legacy Code: Nine Practices to Extend the Life (and Value) of Your Software. It’s an insider’s view of the software industry drawn from his decades of hands-on experience as a software developer, trainer, and consultant to some of the biggest players in the business. David’s continuing passion for software design and construction has led him to train more than 10,000 professional software developers since 1989 at hundreds of companies around the world including Amazon, Yahoo, and Microsoft—where his book’s advice has been successfully applied. His consulting firm, To Be Agile (http://ToBeAgile.com), helps developers adopt Extreme Programming practices such as test-first development, pair programming, and refactoring.
Seattle Code Crafters Slack channel: http://bit.ly/SeattleSoftwareCrafterSlack
