Tagged articles
Open/Closed Principle
25 articles · Page 1 of 1
This article breaks down Palantir's four prioritized ontology modeling principles—domain-driven design, DRY with Rule of Three, open/closed extension, and composition over inheritance—illustrating each with concrete anti-patterns and a practical 12-question review checklist to prevent model fragmentation as teams scale.
Composition Over InheritanceDRYData Modeling
0 likes · 20 min read

The article explains the Open‑Closed Principle, shows how Spring leaves empty hook methods like onRefresh() for extensions, demonstrates the concept with a Java demo, compares inheritance‑based and interface‑based extension approaches, and discusses trade‑offs and practical guidelines for designing extension points.
Extension HooksJavaOpen/Closed Principle
0 likes · 10 min read

The article explains how the Strategy design pattern solves the maintenance nightmare of tangled if‑else or switch statements by extracting each algorithm into its own strategy class, detailing the roles, selection mechanisms, Java examples, and when the pattern is appropriate.
ComparatorJavaOpen/Closed Principle
0 likes · 14 min read

The article explains the Abstract Factory pattern by contrasting product families with product hierarchies, showing why the Factory Method fails for bundled products, presenting the pattern's structure and code, and detailing its open‑closed principle tilt and appropriate usage scenarios.
Abstract FactoryJavaOpen/Closed Principle
0 likes · 17 min read

After years of piling logging, caching, and security directly into Spring Boot services, the author shows how applying the Decorator pattern—implemented via dedicated @Service beans and @Primary/@Qualifier wiring—creates a clean, extensible chain that respects the Open/Closed Principle, while outlining practical steps, trade‑offs, and pitfalls.
Decorator PatternJavaOpen/Closed Principle
0 likes · 10 min read

Spring Boot’s @Configuration annotation serves as a practical implementation of the Open/Closed Principle by providing declarative, type‑safe bean definitions, enabling closed‑for‑modification business logic while remaining open for extension through modular configuration, conditional beans, and auto‑configuration mechanisms.
Auto-configurationConfigurationOpen/Closed Principle
0 likes · 7 min read

The article explains why traditional switch statements violate the Open/Closed principle in JavaScript, outlines the maintenance problems they cause in large front‑end codebases, and demonstrates how object literals or Map structures provide cleaner, more extensible alternatives.
Code MaintainabilityOpen/Closed Principlemap
0 likes · 5 min read

This article explores the Open‑Closed Principle (OCP) in depth, covering its definition, evolution, practical applications, common misconceptions, code comparisons, and best‑practice guidelines to help developers balance extensibility with simplicity in modern software design.
Open/Closed PrincipleSOLIDTypeScript
0 likes · 19 min read

This article explains how the Open‑Closed Principle applies to React development, demonstrating anti‑patterns and refactoring techniques—including base components, composition, higher‑order components, and custom hooks—to create extensible, maintainable UI elements while keeping tests simple.
CompositionCustom HooksHigher-Order Components
0 likes · 7 min read

This article demonstrates how to replace tightly‑coupled if‑else or switch‑case logic with the Service Locator Pattern in a Spring application, allowing new file‑type parsers such as XML to be added without modifying client code, thereby adhering to the Open/Closed principle.
Factory BeanJavaOpen/Closed Principle
0 likes · 7 min read

This article explains how to apply the Strategy design pattern together with the Open‑Closed Principle in Laravel, showing step‑by‑step code examples for defining a strategy interface, implementing concrete payment strategies, and creating a context class that dynamically selects the appropriate payment gateway while keeping the system extensible and maintainable.
LaravelOpen/Closed PrincipleStrategy Pattern
0 likes · 12 min read

This article explains the Visitor design pattern, illustrates its structure, and provides a complete Java implementation that lets HR and finance departments process full‑time and part‑time employee data in an OA system without modifying existing classes.
JavaOA SystemOpen/Closed Principle
0 likes · 11 min read

This article demonstrates how to generate website sitemap.xml files in Java by combining four design patterns—Strategy, Factory, Template Method, and Builder—along with the Open/Closed Principle, providing extensible, maintainable code illustrated with enums, configuration classes, and concrete implementations.
Factory PatternJavaOpen/Closed Principle
0 likes · 16 min read

The article examines how applying the open‑closed principle and domain‑driven design in software architecture can lower programmers' cognitive load, streamline development, and enable cost‑effective, scalable evolution of complex systems, especially in fast‑iteration internet services.
DDDOpen/Closed Principlecognitive load
0 likes · 16 min read

The article explains the six SOLID design principles, emphasizes the importance of the Open‑Closed principle, and demonstrates how to achieve extensible database schemas and APIs using type fields, extendable JSON columns, bitmap role encoding, and strategy/template patterns with concrete Java code examples.
Database DesignOpen/Closed PrincipleStrategy Pattern
0 likes · 15 min read


21CTOJan 3, 2022 · Frontend Development
This article explores how core software engineering concepts—Open‑Closed Principle, functional programming, and message mechanisms—are applied in modern front‑end development, illustrating each with real‑world frameworks like React, Ant Design, and Redux, and providing code examples to deepen understanding.
Open/Closed Principlefunctional programmingmessage-passing
0 likes · 18 min read

The article demonstrates how to replace cumbersome if‑else statements with a clean enum‑based design in Java, showing abstract rule classes, concrete channel implementations, and a matching method that adheres to the Open‑Closed Principle for scalable data processing across multiple channels.
BackendDesign PatternEnum
0 likes · 5 min read


21CTOAug 19, 2020 · Backend Development
This article demonstrates how to replace cumbersome if‑else statements with a clean enum‑driven design in Java, using an abstract rule class, concrete channel implementations, and an enhanced enumeration that binds each channel to its processing logic, adhering to the open‑closed principle.
Design PatternEnumJava
0 likes · 5 min read

This article explains the Strategy pattern with Java, showing how to refactor a naïve pricing module into a flexible, open‑closed design, and then extends the concept to payment processing and thread‑pool rejection handling, complete with code samples and UML diagrams.
Open/Closed PrincipleStrategy Patterndesign patterns
0 likes · 28 min read

This article explains the Strategy design pattern, demonstrates its use through a quote‑management example and various Java implementations, discusses the open‑closed principle, shows how to apply the pattern to different scenarios such as payment processing and thread‑pool rejection handling, and outlines its advantages and drawbacks.
JavaOOPOpen/Closed Principle
0 likes · 26 min read

This article explains the concept of interface‑oriented programming, using everyday analogies and Java code examples to show how defining contracts via interfaces decouples components, improves extensibility, and follows solid design principles such as the Open‑Closed Principle.
Open/Closed Principledependency inversioninterface programming
0 likes · 11 min read

This article explains the Open‑Closed Principle of design patterns, illustrates it with Java code that models a hospital’s medicine‑selling process, compares naive and extensible implementations, and shows how to keep software open for extension while closed for modification.
JavaOOPOpen/Closed Principle
0 likes · 9 min read

This article explains how to apply common design patterns such as Singleton and Observer in front‑end JavaScript, demonstrating practical extensions using Function.prototype, discussing the Open‑Closed Principle, and providing code examples for flexible, maintainable code without invasive modifications.
JavaScriptOpen/Closed Principledesign patterns
0 likes · 10 min read

At SpringOne, Credera engineers Jason Goth, Micah Blalock, and Patricia Anderson explained how they leveraged Conway’s Law to redesign a client’s technical architecture and processes, overcoming productivity decline by restructuring teams, applying the open/closed principle, and introducing new communication roles, ultimately accelerating high‑quality code delivery.
AgileConway's LawOpen/Closed Principle
0 likes · 6 min read


DevOpsSep 5, 2016 · Backend Development
The article explains how a framework acts as a semi‑finished product that relies on abstract classes, the Open‑Closed principle, reflection, XML or annotation configuration, and conventions to let developers extend functionality while keeping the core immutable.
AnnotationsJavaOpen/Closed Principle
0 likes · 7 min read
