Simplify configuration initialization #14
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current situation
Currently, when developers initialize an instance of
Configuration
forSceneBox
, they need to distribute not only states from product aspect, but also unique identifiers for them, which is meaningless for developers, we want developers keep focusing on states from product level, since that this time we simplify the while process for initialization ofSceneBox
andConfiguration
.Changes
Based on conclusions as above, we deleted the process about distribution unique identifiers and bind them with state of scenes. Meanwhile,
lazyAdd
APIs fromSceneBox
switched to usescene state
rather thanidentifier
.Further more, we believe the
navigationController
assignment inConfiguration
was also a redundant process, due to developers already set navigation controller for the first scene inentry
block.Lastly, in order to organize the setting steps of
SceneBox
into one place, this time we introduced a new typeConfigurationFile
, which can make you to put all your configurations into one place, and be easier to reuse it just like a file, in thisConfigurationFile
, you can distribute your scene states and decide which extensions will be enabled forSceneBox
.