Re: MVC philosopy question
David Sharp <mytrashaccount02@gmail.com> writes:
When you're constructing an application, do you envision the
model as a persistent monolithic entity that represents the
current application state?
To me, it is more like a ?layer?: A set of objects.
The model of an individual button might be just a
single object, but the whole application usually
has more than just on object in the model.
Or do you envision the model as an transient entity, related
only to the current page (resulting in one model per page).
For an application, in general, the term ?page? or ?current
page?, has no meaning. Some applications might have entities
called ?pages?.
Until recently, I've always thought of the model as the current
overall application state (as expressed by the database), and
the web pages were all simply methods of manipulating that
state.
In the general case, an application is not necessarily related
to web pages. Although, there might be some applications, also
known as ?web applications? that are related to web pages.
In the first case, the model exists as a set of interrelated
data records in the database.
In the general case, an application does not necessarily
use a ?data base?. Some applications might do so.