Java: Refactoring to Design Patterns
Knowing design patterns is an essential skill in software craftsmanship. But how do you go about learning them when there are so many? Watch this course to quickly learn how to refactor messy code to the most useful and frequently used patterns.
What you'll learn
Challenges arise as software grows in size and complexity, and design patterns offer common solutions to them. In this course, Java: Refactoring to Design Patterns, you will gain the ability to convert typical procedural code into the most useful and frequently used design patterns. First, you will learn how to encapsulate object creation with so-called factories that greatly reduce future maintenance cost. Next, you will discover how to get rid of long if-else statements and reduce conditional complexity using behavioral patterns. Finally, you will explore how structural patterns help you better organize your code. When you are finished with this course, you will have the skills to write code that is organized, maintainable, and pleasant to work with.
Table of contents
- Understanding Factories 2m
- Project Overview 2m
- Fixing No-arg Constructors with Dependency Injection 5m
- Encapsulating with Static Factory Methods 4m
- More Benefits with Static Factory Methods 3m
- Moving Creation to a Dedicated Factory Class 4m
- Refactoring to Factory Method Pattern 4m
- What We Didn't Cover 1m
- Summary 1m
- Why Fix Conditional Complexity 3m
- Fix Low-level Branching Code First 3m
- Replace Conditionals with Polymorphism 4m
- Understand the Strategy Pattern 1m
- Refactor to Strategy 5m
- Strategy Becomes Insufficient 3m
- Replace Strategy with Functional Programming 3m
- Object-oriented vs. Functional Programming 3m
- What We Didn't Cover 1m
- Summary 2m