-
Notifications
You must be signed in to change notification settings - Fork 72
Magellan 1.x Why Magellan?
Ryan Moelter edited this page Jul 18, 2021
·
1 revision
The foundation Google wants you to use for making Android apps consists of Activity
s and Fragment
s. Unfortunately, there are significant problems with these foundational components. Magellan is our attempt to provide a foundation for building great Android apps, without the problems associated with Activity
s and Fragment
s.
The best explanation of why Fragments are hard to use is probably Advocating Against Android Fragments by Pierre-Yves Ricau.
Here is a summary of the main issues:
- Ridiculously complex lifecycle
- Passing objects between
Activity
s/Fragment
s requires serialization - Handling rotation is a pain
- Poor control of the backstack
- Hard to test
Magellan attempts to avoid the problems with Activity
s and Fragment
s by:
- Reducing interaction with
Activity
s/Fragment
s by using a SingleActivity
Architecture - Creating a simple, consistent lifecycle for
Screen
s - Letting
Screen
s survive rotation, but not views - Using our own navigation system to avoid annoying serialization
- Making
Screen
s simple, easy-to-test java objects - Separating the logic from the views for simpler testing
Made with 💚 by the Wealthfront Android Team.