Udemy

Refactoring into Chain of Responsibility from Legacy Code

Enroll Now
  • 729 Students
  • Updated 9/2023
  • Certificate Available
4.3
(106 Ratings)
CTgoodjobs selects quality courses to enhance professionals' competitiveness. By purchasing courses through links on our site, we may receive an affiliate commission.

Course Information

Registration period
Year-round Recruitment
Course Level
Study Mode
Duration
1 Hour(s) 58 Minute(s)
Language
English
Taught by
Włodek Krakowski
Certificate
  • Available
  • *The delivery and distribution of the certificate are subject to the policies and arrangements of the course provider.
Rating
4.3
(106 Ratings)

Course Overview

Refactoring into Chain of Responsibility from Legacy Code

Replace nested & messed-up if-else statements with Chain of Responsibility using Refactoring Pyramid & Clean Code rules.

This is the second module of series dedicated to turning Legacy Code into 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 particitants 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.


Course Content

  • 5 section(s)
  • 15 lecture(s)
  • Section 1 Introduction to the course
  • Section 2 First refactoring activities
  • Section 3 FInalize building blocks of the core logic
  • Section 4 Single Responsibility Principle - Classes
  • Section 5 Summary

What You’ll Learn

  • Refactoring
  • Clean Code
  • Design Patterns
  • SOLID Principles
  • Working with Legacy Code

Skills covered in this course


Reviews

  • K
    Krzysztof Tomaszewski
    5.0

    Well-chosen example and excellent explanation! It was great fun!

  • V
    Vicky Anand
    5.0

    This course is more like an art. It's like solving puzzle and instructor has explained it very well. I really recommend this course to every developer and would advise to apply this techique of refactoring in their industries. Best of luck & well done Włodek to bring this out . Hope to see more of your lectures.

  • V
    Vinicius Pacheco Vieira
    5.0

    Never thought how a simple approach starting by removing else statements could become so powerful when it comes to refactoring! 5 star!

  • R
    Ruben Lara
    5.0

    The Trainer could explain in a simple manner how refactoring process does happen. He got very quickly rid from an ugly code to an elegant one. Nice.

Start FollowingSee all

We use cookies to enhance your experience on our website. Please read and confirm your agreement to our Privacy Policy and Terms and Conditions before continue to browse our website.

Read and Agreed