Seams are strategic points in code where behavior can be modified without altering the existing implementation. They are crucial for introducing changes safely, enabling testing, and refactoring legacy systems incrementally. This course explores functional, object, and preprocessor seams, and their role in improving code maintainability.
Overview
Syllabus
- Unit 1: Functional Seams with Functions as Parameters
- Refactoring Order Processing Logic
- Custom Order Calculation Made Simple
- Custom Discount Test Implementation
- Custom Order Pricing Test Implementation
- Unit 2: Functional Seams with Feature Flags
- Creating Order Calculation Modes
- Switch Expression for Order Calculations
- Optional Parameters for Order Processing
- Testing Order Processing Normal Mode
- Testing Order Discount Calculations
- Testing Order Surcharge Calculation
- Unit 3: Object Seams Using Inheritance
- Making Methods Ready for Inheritance
- Inherit and Override for Discounts
- Testing Discount Order Processing
- Testing Discount Order Processing Logic
- Unit 4: Object Seams using Interface Breakdown
- Interface Segregation for Notification System
- Interface Segregation in Action
- Adding Two New Interfaces
- Interface Segregation in Notification System