You need to sign in or sign up before continuing.
gui: Make gui-view-model independent of common
Context
common
types are always fine but GUI has specific needs (observability, difference in mutability, favours String types). Having the two kinds of types accessible is confusing because one does not know whether to use the common type or a specific gui-view-model
type.
So to simplify, don't expose transitively common
types from gui-view-model
. Actually, don't even use it in its implementation: Instead, make gui-controller
and gui-presenter
performs the necessary conversions, acting as an anti-corruption layer.
See also this interesting blog post and the associated video. Related to #39 (closed). Closes this comment on the main MR.
What has changed?
Main Changes
common
- Removed types and methods only used by GUI.
gui-view-model
- Added
GridCoord
types (sibling ofcommon's
GridPosition
) - Moved
DictionaryKey
fromcommon
- Explicitly removed dependency to
common
frommodule-info
andbuild.gradle
gui-controller
, gui-presenter
- Convert types from
gui-view-model
tocommon
and vice-versa
gui-view
- Adjustements to use new
gui-view-model
types