Extract Class – Codecast
Blog post series
This blog post is part of a series about legacy coderetreat and legacy code techniques you can apply during your work. Please click to see more sessions about legacy code.
Code Cast
This is a code cast in Java.
In the previous episodes we restructured some parts of the code base. We also extracted pure functions and applied The Rule of Three when restructuring the code.
Because we have extracted some pure functions, now we need to think if those pure functions belong to new classes. So we structure the functions in a way that they belong together from the point of view of their responsibilities. After structuring the functions we extract the class.
Learn from this video how to extract a class in legacy code in such a way that you do not introduce side-effects to the existing behaviour.
Read here more about this concept in my blog post.