
Data Hiding – Practical Accessors
We have discussed the accessor levels of our data. In most environments, the three levels are public, protected, and private. In this episode, we go deeper into these concepts and a practical approach to data hiding. The Private Access Level This level of access should be our default. It can be considered the critical step in data hiding. Private hides our data and methods. I find a physical example often works best for the goal of this approach. When we purchase a physical device, we prefer fewer buttons and interface widgets over more. The Apple iPod was a perfect example of this. There were very few controls, so the interface was easy to understand. Our software should follow the same... Read more