Functional SOLID, Part 2

by Matt Stine

September 2012

In this issue we continue our short series on the intersection of the SOLID principles of object-oriented design and programming with the functional programming paradigm. First we'll focus on the Open-Closed Principle, which tells us that modules should be open for extension, but closed for modification. We achieve open-closed designs through the use of abstraction, which in object-oriented languages is typically achieved through the use of inheritance. While inheritance can be a very powerful tool, it can also be a very dangerous one if used inappropriately. We'll learn some of the characteristics of good inheritance hierarchies from the OCP's sister principle, the Liskov Substitution Principle. Finally, we’ll examine how the use of functional composition will allow us to create modules which comply with the OCP without flirting with the dangers of inheritance hierarchies and violations of the Liskov Substitution Principle.

About Matt Stine

Global CTO - Software Architecture at Pivotal

Matt Stine is an 18 year veteran of the enterprise IT industry, with nine of those years spent as a consulting solutions architect for multiple Fortune 500 companies, as well as the not-for-profit St. Jude Children's Research Hospital. He is the author of Migrating to Cloud-Native Application Architectures from O'Reilly, and the host of the Software Architecture Radio podcast.

Matt is obsessed with the idea that enterprise IT “doesn’t have to suck,” and spends much of his time thinking about lean/agile software development methodologies, DevOps, architectural principles/patterns/practices, and programming paradigms, in an attempt to find the perfect storm of techniques that will allow corporate IT departments to not only function like startup companies but also create software that delights users while maintaining a high degree of conceptual integrity. He is currently the Global CTO of Architecture at Pivotal, and spends much of his time advising IT leadership on the effective adoption of cloud-native architectures.

Matt has spoken at conferences ranging from JavaOne to OSCON to YOW! and is a nine-year member of the No Fluff Just Stuff tour. Matt is also the founder and past president of the Memphis Java User Group.