4.9 out of 5
4.9
25 reviews on Udemy

Pyramid of Refactoring (Java) – Clean Code into Chain

Replace nested & messed-up if-else statements with Chain of Responsibility using Refactoring Pyramid & Clean Code rules.
Instructor:
Włodek Krakowski
159 students enrolled
English
Refactoring
Clean Code
Design Patterns
SOLID Principles
Working with Legacy Code

This is the second module of series called “Pyramid of Refactoring” dedicated to achieving Clean Code.

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 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.

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

Introduction to the course

1
Why this couse?
2
Refactoring facilitates earning money
3
Chain of Responsibility Pattern

First refactoring activities

1
Business domain explained
2
Java sources explained
3
Duplicated code extracted into first methods
4
First methods made cohesive

FInalize building blocks of the core logic

1
Third method extracted and made cohesive
2
Fourth of the core methods extracted
3
Fourth method made generic and reusable

Single Responsibility Principle - Classes

1
Composed Methods
2
Single Responsibility Principle Classes
3
Fasten Classes into a Chain of Responsibility

Summary

1
Recap of Refactoring Pyramid
2
Homework
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.9
4.9 out of 5
25 Ratings

Detailed Rating

Stars 5
19
Stars 4
6
Stars 3
0
Stars 2
0
Stars 1
0
13ce155ad5bcc29d52aa1f362f524766
30-Day Money-Back Guarantee

Includes

2 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion