Pyramid of Refactoring (Java) - Clean Code Gradually
4.7 (30 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
160 students enrolled

Pyramid of Refactoring (Java) - Clean Code Gradually

Clean code gradually and notice emerging Design Patterns like Interpreter, Fluent Builder, Factory Methods
Bestseller
4.7 (30 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
160 students enrolled
Created by Włodek Krakowski
Last updated 4/2020
English
English
Current price: $16.99 Original price: $24.99 Discount: 32% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • 2 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Design Patterns
  • Clean Code
  • Refactoring
  • SOLID Principles
  • Working with Legacy Code
Course content
Expand all 19 lectures 02:03:29
+ Introduction
1 lecture 04:28

What will you learn and how you will learn it ater you download the source code and refactoring everything together with the trainer.

Preview 04:28
+ Refactoring Basics
3 lectures 08:06

What is refactoring and how it helps you to keep your code clean(er).

Business meaning of refactoring
01:53

My refactoring journey - learning practicing and teaching refactoring.

Pyramid of Refactoring - discovery journey
02:27

My main discovery on how to approach refactoring.

Preview 03:46
+ Climbing up the Pyramid of Refactoring
3 lectures 18:14

This lecture provides quick introduction to the source code that is used throughout the course. The student is expected to download the source code (in java language) and install the project into IntelliJ IDE. Community version of the IDE is enough.

Sources and Business Domain explained
03:45

In this lesson we quickly climb up the refactoring pyramid and go through its levels from the bottom into the top.

Preview 12:01

It is time to recap what pyramid of refactoring is and how we experienced it during the previous live refactoring.

Preview 02:28
+ Emerging Interpreter Design Pattern
2 lectures 17:07

We continue ending up with new classes by making use of Extract Delegate (extract class) functionality in IntelliJ and experience how it works.

Extract Delegate/Class - MaterialSpec
07:45

We continue with ways to extract new classes by using Extract Parameter Object functionality in IntelliJ and experience how it works.

Preview 09:22
+ Completed Interpreter Design Pattern
4 lectures 36:54

Haven't you used "Replace Method with Method Object" so far? It not, please practice it.

Replace Method with Method Object - PlacementSpec
08:17

Negation is part of logic tree, so it need to be implemented as well.

Not Spec - Avoid a queried placement
05:50

SOLID rules are still alive and very important. In this lecture you understand how SOLID rules help us to perform more sophisticated code transformation and in what sequence these SOLID principles should be applied to allow previous refactoring push subsequent refactoring.

SOLID Principles help to extract Spec implementations
09:36

And Criterion is search functionality should be as flexible as possible.

Generic AndSpec
13:11
+ Creational Design Patterns Support
3 lectures 30:47

Direct usage of constructors might be tedious. Especially when object creation requires prior creation of the parameter objects as this way some code will be duplicated in many places. Replacing constructor call with a single factory method might allow to keep code responsible for object creation in single place and avoid duplication.

Factory Methods hide direct usage of constructors
11:54

Fluent Builder is one of creational design patterns. We will replace direct usage of constructor with builder using IntellJ IDE features, but also have a look at one of Functional Interfaces - Predicate.

Fluent Builder supports AndSpec creation
11:54

Tests should also be refactored continuously with production code. Let's make our tests clean as well.

Tests Refactoring with Fluent Builder support
06:59
+ Clean your code continuously
3 lectures 07:53
Make refactoring part of your daily activities
04:41

Possessing technical skills is half of your success. The second half is ability to make it part of your software development process of your team, so the code is clean or at least becomes slightly cleaner after each commit to repository.

The most important slide to remember
01:59
Thank You!
01:13
Requirements
  • Java 1.8+
  • JUnit
  • IntelliJ Community Edition
  • Maven
Description

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

Who this course is for:
  • Software Developer
  • Software Architect
  • IT Team Leader