Friday, February 18, 2011

Depilatory programming

My Shadowrun Dice Simulator vexes me in several ways, all to do with object-oriented design:
  • the user's choice of test affects the user interface as well as the object representing the test data
  • the user's choice of test parameters affects the user interface as well as the object representing the test data
  • accordingly, the construction of the user interface depends on a number of conditions
  • similarly, the construction of the object representing the test data depends on a number of conditions
  • this raises the consequent question of how the MVC architecture can be satisfactorily implemented
Well, I'm on the cusp of something. I don't know what it is but my mockups - JFrames, JDialogs, etc - make for a nice application. It's a matter of applying object-oriented design principles properly. Goodness knows how I am going to do that, with Stackoverflow.com unhelpful on such things.

Encapsulate what varies: the choice of test, the choice of test parameters, the user interface, the object representing the test data.