Re: RFC: Model-View-Controller



On Nov 16, 2011, at 9:22 PM, Benjamin Otte wrote:
> On Wed, Nov 16, 2011 at 9:37 AM, Kristian Rietveld <kris loopnest org> wrote:
>> If there are multiple views, which are changed by which controller?  What complicates thinking about this for me is that in MVC as I know it, there is 1 Model, 1 View and 1 Controller for each "thing".
>> 
> I  think this is where the misunderstanding is. I probably shouldn't
> have mentioned MVC in the email and named it "actions and actors" and
> just used the clutter terminology.

That is very likely ;)  I now also understand that all these objects would be allowed to do drawing for the widget they are connected to, etc.

Still it is a very good idea to get some prototyping going to get a feel for this and to see how much code it would save in the end.  I like the examples put forward by Federico: GtkButton/GtkScrollbar and text selection.

> you'd write a GtkTreeViewView object that'd draw a treeview. That's
> indeed kinda very useless.

If one would do *real* MVC, then something like a GtkButtonView does make sense and is definitely not useless.  The point is then that you have different implementations of GtkButtonView for e.g. normal displays, small displays, touch screen/tablet.  You would also have different implementations of a GtkButtonController according to the input method used (mouse vs. touchscreen is a good example).


regards,

-kris.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]