paint-brush
Open Closed Principle With Service Locator Patternby@esca
465 reads
465 reads

Open Closed Principle With Service Locator Pattern

by Esca3mMay 20th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Open closed principle is the most simple one in the list of software design principles I understand. "Open for extension, close for modification" - the idea seems quite straightforward. When a new message type comes in, you have to change this class again to support the new type. This approach violates the open closed principle. To deal with this, we use the ServiceLocatorFactoryFactoryBean provided by Spring framework to support new validation without changing the existing code. By this approach, your code will look much cleaner and become easier to maintain.
featured image - Open Closed Principle With Service Locator Pattern
Esca HackerNoon profile picture
Esca

Esca

@esca

L O A D I N G
. . . comments & more!

About Author

Esca HackerNoon profile picture
Esca@esca

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Learnrepo
Coffee-web
Freesion