On 10/11/05, Jon A. Cruz <jon@...18...> wrote:
On Oct 11, 2005, at 2:38 AM, Ben Fowler wrote:
... and second that Inkscape does (or will in the future) use the Model-View-Controller pattern ...
Personally, I think the MVC pattern is a bit overblown and unwieldy.
It may be 'blown', but like the possibly apocryphal "Too many notes, my dear Mozart" http://www.guardian.co.uk/arts/fridayreview/story/0,12102,1230395,00.html , maybe not to excess.
A modified M-VC approach is more often better.
The key difference being no required separation between view and controller.
At this stage, all I am looking for is a complete separation between the model (producing an inkscape API) and 'everything else'. It would not surprise me if the inkview and inkboard projects need this.
A bigger problem is that some people and I am in this camp, probably wrongly, call the thin layer that mediates between the model and the view, or represents tools acting between them, the controller.
I have no objection to this layer being called the 'mediator' or 'arbitrator' (I think that this term is used in hot-plugging), or 'toolbox' or similar, particularly if this results in greater clarity or understanding.
The purpose of this layer is to ensure that there are no dependencies between the model and the view, and it may be quite complex. Some applications, and this could well be the case for inkscape will have the User preferences in this layer; Also 'Undo' can be thought of as something under the User's control rather than part of the data model.
Certainly when I speak of the 'View' layer I am thinking not just of the display, but the display, the mouse cursor, keyboard and extended input.
A full MVC architecture (perhaps I was on thin ice to speak of it as a pattern) may be unwieldy but it is not always unncessary!
Ben