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 incrementally refactoring legacy systems. This course explores functional and object seams and their role in improving code maintainability in Scala.
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 Processor Functionality
- Unit 4: Object Seams using Interface Breakdown
- Interface Segregation for Notification System
- Interface Segregation in Action
- Adding Two New Traits
- Interface Segregation in Notification System