samedi 15 juin 2019

Using design patterns and spring framework

I m new to Design patterns. I have read this book(refactoring improving the design of existing code) recently, I want to use 'Replace Conditional with Polymorphism to eliminate the switch statement' to refactoring my business code while I m using spring framework. Here is the point, all the example from this book is not using spring framework, and I think is not easy to refactor it while using spring, because I always give consideration to @Autowird and @Component annotations. And I came a question from my mind, is there a confliction between spring and some design patterns? I mean when we use some design patterns then do not give the class to Spring framework to manage. If I was wrong, please give me some example that design patterns and spring rightly coexist. (use 'Replace Conditional with Polymorphism to eliminate the switch statement' will be better)

Aucun commentaire:

Enregistrer un commentaire