From: brett l. <bre...@gm...> - 2010-09-02 20:20:03
|
On Thu, Sep 2, 2010 at 11:46 AM, Erik Vos <eri...@xs...> wrote: > Turn-based boardgames are effectively state machines. I'm not sure I > can think of a model object that should be stateless. > > Certain parts of the view (in an MVC world) can and should be > stateless, but the model *is* the state of the application (read: > game). > > [EV] Of course there is always some form of state behind a model, but often > it is not a single state. For instance, the views that give you a list of > available trains, or the player worth, or a share percentage, have models > that depend on some calculated value, which is not an independent state > itself. Correct. This is where MVC tends to be an improvement to just an MV design. Typically, the controller possesses the "business rules" that derives those calculated values from the model. Originally, we started with a Model-View design. It's probably time to work on cleaning up the distinction between Model and Controller, and making that distinction to help clarify which is which. > > Erik. > ---Brett. |