States are already stored in a Tree structure, but the StateProvider manages most of the tasks of manipulating this structure.
This could be cleaned up by delegating more responsibility to the a state class (mimicing an OO class).
That allows for simpler code when e.g. looking up states (using recursion) ect... It also allows functions to operate in the scope of the state rather than the while tree.
StateClass, StateFactory, StateBrowser and StateRules classes has all been added to make it easier to maintain and also test in the future as it seperates concern into smaller enteties.
States are already stored in a Tree structure, but the StateProvider manages most of the tasks of manipulating this structure.
This could be cleaned up by delegating more responsibility to the a state class (mimicing an OO class).
That allows for simpler code when e.g. looking up states (using recursion) ect... It also allows functions to operate in the scope of the state rather than the while tree.
(Routes could use the same treatment)