Java Refactoring Best Practices
1h 20mIntermediate2023-06-07
Authors
Maaike van Putten
Trainer and Developer for Java, Python, Spring Boot, and More
Course details
Being able to write Java is great, but it’s also vitally important to write code in a way that is maintainable—and future-proof. In this course, Maaike van Putten teaches you how to organize and reorganize code in a way that is easy to maintain, sharing best practices and techniques for refactoring Java code in order to improve its quality, maintainability, and performance. Maaike begins with an introduction to refactoring and technical debt, and covers tools and techniques for refactoring in Java. She then moves on to best practices for writing clean and maintainable code, including naming conventions, style guidelines, and tips for using whitespace and comments effectively. Join Maaike in this course to learn how to refactor existing code to clean it up and make it easier—and cheaper—to maintain.
Skills covered
Software ArchitectureJavaOracleProgramming LanguagesSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Why you need to refactor
- 02 - Base knowledge
1. Importance of Best Practices and Refactoring
- 03 - Technical debt and refactoring
- 04 - Tools and techniques for refactoring
- 05 - Tips to write clean code and avoiding technical debt
2. Best Practices - Simplicity and Readability
- 06 - Java style guide
- 07 - Java naming conventions
- 08 - Using spacing, brackets, and comments effectively
- 09 - Writing clean and maintainable Java classes
- 10 - Best practices for writing clear and concise methods
- 11 - Challenge - Applying basic best practices
- 12 - Solution - Applying basic best practices
3. Best Practices - Maintainable Code
- 13 - Handling exceptions
- 14 - Removing dead code and other unnecessary elements
- 15 - Java design patterns
- 16 - SOLID principles
- 17 - Testing your code
- 18 - Challenge - Applying exception handling and code clean-up
- 19 - Solution - Applying exception handling and code clean-up
4. Refactoring - Fixing Common Code Smells
- 20 - Refactoring bloaters
- 21 - Refactoring primitive obsession
- 22 - Refactoring incorrect object-oriented programming
- 23 - Refactoring excessive coupling
- 24 - Challenge - Refactor the legacy code
- 25 - Solution - Refactor the legacy code
Conclusion
- 26 - Resources for Java refactoring