Pyramid of Refactoring (Java) – Clean Code Gradually
This is the first module of (planned) series called “Pyramid of Refactoring” dedicated to achieving Clean Code.
We use refactoring techniques and perform all the changes live. The student downloads the source code and performs all the changes together with the trainer – step by step. In this sample we make use of Interpreter Design Pattern as goal of our refactoring journey. The Interpreter Pattern is accompanied by two creational design patterns – Factory Method and Fluent Builder, which are also result of refactoring activities.
SOLID Principles will be explained in practice instead of teaching the sole theory.
The journey allows us practice code transformations like :
– Replace Loop with Stream
– Extract Delegate / Class
– Extract Interface
– Extract Parameter Object
– Replace Method with Method Object
– Extract Method / Variable
– Move Method
– Inline Method / Variable