You’re doing it wrong.

If you violate a basic principle of software development in order to implement your design pattern, you’re doing it wrong.

Take, for example, Model-View-Controller or its variants, from MVVM to VIPER.

None of these patterns for assembling a user interface application require that you violate the basic principles of object-oriented design, which is the construction of your code using reusable objects defined with will-defined public interfaces and privately maintained internal structures. Meaning if you create a view object where the “private” elements of that object are publicly manipulated or publicly instantiated, don’t use your design pattern as an excuse for violating principles of encapsulation.

You’re just a bad programmer who needs to brush up on the basics.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s