This is the second module of series called Pyramid of Refactoring dedicated to achieving Clean Code.
Although Refactoring to Chain of Responsibility is not mentioned in the core refactoring books ( Refactoring & Refactoring to Patterns ) the techniques described in these books allow to create a plan for such a refactoring journey.
The goal of the course is to disentangle the codebase from a set of deeply nested conditional if/else statements. It is a very common case – and if it is left for a long time – then it leads to a very complex legacy code after subsequent code extensions.
We use refactoring techniques and perform all the changes live. The partititants download the source code and performs all the changes together with the trainer – step by step. In this sample we make use of Chain of Responsibility Design Pattern as goal of our refactoring journey.
The journey into Chain of Responsibility allows the attendees to practice code transformations like :
Merge If Statements
Merge Nested
If Statements
Extract Methods
Replace Temp with Query
Move Methods
Inline Methods
Extract Class / Extract Delegate
Extract Interface– Rename Methods & Variables
The course ends up with Homework, where the participants can experience the difference between implementing additional requirements within Clean Code and within Legacy Code. This is the difference between skipping and applying Preparatory Refactoring.
Instructor Details
Courses : 2
Specification: Refactoring into Chain of Responsibility & Clean Code
|
5 reviews for Refactoring into Chain of Responsibility & Clean Code
Add a review Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Price | $9.99 |
---|---|
Provider | |
Duration | 2 hours |
Year | 2020 |
Level | Intermediate |
Language | English |
Certificate | Yes |
Quizzes | No |
$19.99 $9.99
Piotr Kubowicz –
There was a great explanation of the need of refactoring in the language of business. The course structure is clear.
Anna Kurman –
Really nice course. Step by step you refactor the code to Chain of Responsibility, with great explanation WHY and how do we do it. The instructor shows us some very useful shortcuts in Intellij I always forget about inline and it is super useful! During the course the instructor uses Linux/Windows shortcut but shows and repeats them for Mac. Also finally I understand Poker!
Jacek Stobiecki –
This course presents a very nice, clean, gradual refactoring journey from a very nasty combination of if else statements into a few concise single responsibility classes. The follow along format and clear explanations make it easy to understand and do yourself while watching, already putting the muscle memory in place. The fact that all the transformations are made using built in IntelliJ features only makes everything easier. The trainer also makes sure to highlight the shortcuts you can use, to make the work progress even faster. Overall, I feel like it was a good use of my time! Will surely apply in everyday work.
Murat AKIN –
Very nice course! it’s purely practice oriented. The instructor is trying to achieve an elegant solution by refactoring code step by step. Learning about refactoring theorically is not so difficult but applying them is little bit challenging. I think given ‘Poker Hand’ example is really good choise for ‘chain of responsibility’ to practise. Presentation and coding parts are very clear and easy to follow. Besides i learning some refactoring concepts, i started to use intellij more effectively thanks to him. I am very satisfied and also recommend the other course ‘Pyramid of Refactoring (Java) Cleaning Code Gradually’. Thank you so much. 🙂
Nacho Cougil –
Very good course and very enjoyable! Step by step, very well explained and being able to see each of the refactor steps applied in a simple and easy to follow way ; ) I’ve really enjoyed it… and I want more!