Gaia/System/Refactoring Plan: Difference between revisions

Line 34: Line 34:


== Stage.2 - Architecture love ==
== Stage.2 - Architecture love ==
1. Find out loading sequence and dependency relationships
# Find out loading sequence and dependency relationships
2. Do architecture review and rework case by case.
# Do architecture review and rework case by case.
 
** Find the unnecessary module coupling and remove it.
* Find the unnecessary module coupling and remove it.
** Split a single "heavy-loading" module into different modules with its specific responsibility
* Split a single "heavy-loading" module into different modules with its specific responsibility
*** For instance, split window manager into 3 pieces: manager, factory, and classes.
For instance, split window manager into 3 pieces: manager, factory, and classes.
** Move the static DOM elements into its responsible module and let the module render its own UI with whatever template engine.
* Move the static DOM elements into its responsible module and let the module render its own UI with whatever template engine.
** (optional) Use event emitter to replace DOM elements. (But we need to find out 'home' event replacement.)
* (optional) Use event emitter to replace DOM elements. (But we need to find out 'home' event replacement.)
** Find out patterns and figure out if we could group them.
* Find out patterns and figure out if we could group them.
*** For example many modules are depending on a specific settings to be ON/OFF. Maybe we could lazy load them in a SettingsOberver.
For example many modules are depending on a specific settings to be ON/OFF. Maybe we could lazy load them in a SettingsOberver.


Some candidate bugs for this stage:
Some candidate bugs for this stage:
 
# Clean widget-like cost control
1. Clean widget-like cost control
# Clean rocketbar
2. Clean rocketbar
# Manage hardware dependent modules together by feature detection
3. Manage hardware dependent modules together by feature detection
# Split lockscreen
4. Split lockscreen
# TrustedUI rework
5. TrustedUI rework
# Keyboard management rework
6. Keyboard management rework


== Stage.3 - Do experiments ==
== Stage.3 - Do experiments ==
Confirmed users
401

edits