Mar 31, 2021
When we create an instance of a class, we often need to do some initialization. Constructors and initializers achieve this goal. These are two different ways to get our data into an instance and are an essential part of our design. In this episode, we examine the design decisions we need to make as we decide how to...
Mar 29, 2021
In this episode, we look at how to use static attributes and methods in our class design. These are important but can be over-used. They can even be a supported way to break the object-oriented nature of our program. We can "static" our way into a design that can not be extended. Therefore, we need to use these...
Mar 26, 2021
We have spent a few episodes looking at cohesion and coupling. Now it is time to find balance in these two software design approaches. Each approach has strengths and weaknesses. Therefore, our best approach is to combine the strengths while offsetting the weaknesses. This best-fit approach is not as difficult to...
Mar 24, 2021
In object-oriented software, we talk about the concept of coupling. Put simply; this is a small object approach to our solution. It is the opposite end of the spectrum from large-object, or monolithic, designs. In my experience, a developer's bias towards cohesion or coupling often comes from their background. Those...
Mar 22, 2021
This episode focuses on cohesion and the idea of using fewer large objects to solve a problem. This approach is often considered the opposite of using more smaller objects. We will find out that there are ways to combine these two different approaches as a best-fit method.
We have already defined...