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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -