trisweb
05-05-2009, 06:06 PM
Ok, this is a pretty silly argument, but my friend and I decided to take it to a forum instead of arguing the point without any resolution.
So we have an MVC-based application in Flex, and there's a model which is a fairly deep object graph. We use properties and property chains to access parts of the model in our view (such as foo.bar.baz[n].property).
Our argument is essentially on a point of wording. I will attempt to give fair explanation to both sides...
I say that the access of the model 'foo.bar.baz[n].property' or even anything as simple as 'foo.property' is part of the view. I say this because by definition, the model is simply a graph of connected objects which does not care which parts of it are in use at any given time. Thus by definition a "usage of the model" cannot be called "the model" because a usage implies some state.
My friend says that this part of the model is Model by definition, because it's a part of the model, regardless of how that part is accessed, and the model is still model regardless of which part of it you're looking at. So he says 'foo.bar.baz[n].property' is called 'model' through and through.
My contention is that any context or state of the model cannot be "the model" by definition. The model is this pure set of objects which is completely separate from its usage by the controller or view. So I have trouble calling any property access a part of the "model." I see his point of view in that by simple categorization, an access of the model might as well be called model itself.
What do you think? Is 'foo.bar.baz[n].property' Model or View?
So we have an MVC-based application in Flex, and there's a model which is a fairly deep object graph. We use properties and property chains to access parts of the model in our view (such as foo.bar.baz[n].property).
Our argument is essentially on a point of wording. I will attempt to give fair explanation to both sides...
I say that the access of the model 'foo.bar.baz[n].property' or even anything as simple as 'foo.property' is part of the view. I say this because by definition, the model is simply a graph of connected objects which does not care which parts of it are in use at any given time. Thus by definition a "usage of the model" cannot be called "the model" because a usage implies some state.
My friend says that this part of the model is Model by definition, because it's a part of the model, regardless of how that part is accessed, and the model is still model regardless of which part of it you're looking at. So he says 'foo.bar.baz[n].property' is called 'model' through and through.
My contention is that any context or state of the model cannot be "the model" by definition. The model is this pure set of objects which is completely separate from its usage by the controller or view. So I have trouble calling any property access a part of the "model." I see his point of view in that by simple categorization, an access of the model might as well be called model itself.
What do you think? Is 'foo.bar.baz[n].property' Model or View?