Dan Tech Academy
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.

What this lesson covers
  1. 01Lesson Goal
  2. 02Part 1: The Old Way Looked Classes Up By Name
  3. 03Part 2: An Explicit List
  4. 04Part 3: FeatureRegistry Rejects A Wrong List
  5. 05Part 4: Tests Keep The List Correct
  6. 06Practice Exercise
  7. 07Code Reading Path
  8. 08Signs To Avoid
  9. 09References
  10. 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
Sign in