1 The tendency of Object-Oriented Programming towards increased system complexity
In this chapter, we explore the tendency of OO systems to be complex.
This complexity is not related to the syntax or the semantics of a specific OO language. It is something that is inherent to OO’s fundamental insight that programs should be composed from objects that consist of some state together with methods for accessing and manipulating that state.
In this chapter, we illustrate how some fundamental aspects of OO tend to increase the complexity of a system.
Over the years, OO ecosystems have alleviated this complexity increase by adding new features to the language (e.g. anonymous classes and anonymous functions) and by developing frameworks that hide part of this complexity by providing a simpler interface to the developers (e.g. Spring and Jackson in Java). Internally, they rely on advanced features of the language (like reflection and custom annotations).
This chapter is not meant to be read as a critics of OO programming. Its purpose is to raise awareness of the tendency towards increased complexity of OO as a programming paradigm and to motivate you to discover a different programming paradigm where the system complexity tends to be reduced present, namely Data Oriented programming.
As we mentioned in Chapter 0, DO principles are language agnostic: if one choose to build a OO system that adheres to DO principles, the system will be less complex.