On 10/12/05, Jon A. Cruz <jon@...18...> wrote:
On Oct 12, 2005, at 1:01 AM, Ben Fowler wrote:
A bigger problem is that some people and I am in this camp, probably wrongly, ...
Then it sounds like you're not actually talking about MVC here.
i have no difficulty in accepting that I may be mistaken! See http://c2.com/cgi/wiki?ModelViewController : I guess that a lot of people are mistaken, to the annoyance of those who actually grasp the 'impressive lineage'.
In classic MVC, the View would be bound directly to the Model, with no layer in between.
Are you actually advocating that for Inkscape (or any other Gnome or GTK Application)? To me it seems to have the fatal drawback that the Model has a dependency on the View and must know how to drive each and every View that interested developers come up with.
[ snip ] In general the Controller and the View would both have tight dependencies on the Model. The Model, on the other hand, would have no clue as to what was actually connected to it.
Again, this would have the very large problem that cross-platform applications would be impossible, as a given View (GUI) would mate with only one Model.
I am looking for an architecture where the Model can drive any reasonable View.
[ snip ]
At this stage, I am not trying to tie down the meaning of these terms, I accept that similar words like Control and Controller are used in different and various contexts and often are used in unrelated senses, and quite possibly my internal understanding of 'Controller' is simply wrong, when checked against http://st-www.cs.uiuc.edu/users/smarch/st-docs/mvc.html (possibly the best tutorial on MVC, but entirely Smalltalk), and of course, http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html . Now I don't claim to understand every last detail, and I would also suggest careful reading of the relevant pages in the Portland Repository, which shows that the MVC has been re-invented several times (at least once independently).
Note that http://www.object-arts.com/EducationCentre/Overviews/MVC.htm has pictures which may be guide as to what I am thinking (even if I am wrong, and even if it doesn't lead to any benefit to Inkscape).
(I would be unhappy if an architecture gratuitously allowed the User Interface to update itself, its concrete View, without going through the Model).
All I am asking is for there to be Model, an API for Inkscape.
Note that whilst this may seem to be common sense, it is hardly ever seen in practice, see "Attempting to stitch these two worlds together in a hand coded method without architecture is very common, and results in the model object being polluted with knowledge of the interface, and vice-versa. This makes the code very inflexible and difficult to maintain. For this reason (among others), many programming shops develop the user interface design early in the process of design, and freeze the interface early. The unfortunate side effect of this is that the domain of the problem often isn't clearly understood by the programmers until late in the implementation process. Thus, just at the time that the developers are finally competent to create a good interface, they are kept from changing it. MVC models allow the code to be more flexible later in the development process, allowing for changes that make sense at the time it makes sense to make them."
http://www.absoluteastronomy.com/encyclopedia/m/mo/model-view-controller.htm
and yet this is nearly universal when using PHP in which user interface, presentation and data manipulation are intermingled in the same file!
Ben