After this lesson you will
- Explain why Class.forName was replaced by an explicit list in AppFeatures.kt
- Read how FeatureRegistry and FeatureNavigationRegistry reject empty or duplicate lists
- Use AppFeaturesTest and FeatureRegistryTest to keep the feature list correct
Duration25 min
DifficultyIntermediate
Explicit Feature Registration
Why the repo lists features in AppFeatures.kt instead of using Class.forName, how FeatureRegistry rejects a wrong list, and the tests that keep it correct.
- 01Lesson Goal
- 02Part 1: The Old Way Looked Classes Up By Name
- 03Part 2: An Explicit List
- 04Part 3: FeatureRegistry Rejects A Wrong List
- 05Part 4: Tests Keep The List Correct
- 06Practice Exercise
- 07Code Reading Path
- 08Signs To Avoid
- 09References
- 10Key Points
Topics: kotlin, 07-dependency-injection
10 sections left in this lessonUnlock all of Mobile Action ProLesson Goal, Part 1: The Old Way Looked Classes Up By Name, … — plus 69 lessons in this course, source code and checklists.
Unlock Mobile Action ProOne-time payment — lifetime access — 7-day money-back. Already purchased? Sign in