oop - Is there an object-oriented design paradigm that allows for a variable GUI and data model? -
my dice simulator vexes me in several ways, object-oriented design:
- the user's choice of dice test affects should displayed in user interface should form part of object representing test data
- the user's choice of test parameters affects should displayed in user interface should form part of object representing test data
in other words, gui variable , data model variable - both depend on number of potential conditions received in input user. conventional method have been using handle variation switches , if statements, these confusing, bulky , nested.
is there object-oriented design paradigm allows variations in gui , model?
as problems solution adding more layers of abstraction :)
have @ mvc, mvp , mvvm*. these patterns designed separate responsibilities between ui , data. because want switch @ run-time between models (data) , ui (view) might need create abstraction, contract, allow view bind (or specific subset of) data.
*this link definitly not source searching web (and of course stack overflow) grips these patterns.
Comments
Post a Comment