[Mono-list] Windows Forms...wah

Tum tum@veridicus.com
Sun, 22 Sep 2002 12:46:44 +1200


That's why MVC would be good.  By implementing it the MVC way, you can
immediately support both styles of programming.
 
Labels, buttons etc will by default construct their own standard models.

I think people who are against MVC don't understand that you can supply
and use default models.
 
With MVC, you could do this:

// Default model is used.

Button button = new Button("Hello World");


_Or_ this:

// User supplied model.

Button button = new Button(new MyButtonModel());


MVC gives you the choice of having both systems.  Currently, Windows
Forms does not use MVC for things like listboxes (not even internally).
That sucks cause even though you can create an MVC wrapper model around
it, you'll still have the problem of the listbox storing your data
twice.  You can't efficiently add MVC to a non-MVC system, but you can
efficiently add non-MVC looking models to an MVC system.


::Tum

> -----Original Message-----
> From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]
On
> Behalf Of Rodrigo Moya
> Sent: Sunday, 22 September 2002 5:19 a.m.
> To: fssc
> Cc: Mono List
> Subject: Re: [Mono-list] Windows Forms...wah
> 
> On Sat, 2002-09-21 at 04:49, fssc wrote:
> > I think a number of you are putting words in to my email, did I say
> anywhere
> > that mono ui should not be using MVC??? That would be crazy! The
basic
> lists
> > boxes etc that I talk about use an MVC model, it's just
internalised, it
> you
> > want to externalise it you can.
> >
> > >From what people are suggestiing even the humble label should have
an
> > external model, are they serious? Do they know how many labels some
> forms
> > have? I would much rather simple change the caption propoerty on the
> object
> > inspector rather than drag another control on to the form which will
be
> > responsible for storing the caption string, and then hook up the
label
> to
> > the caption model component. That is not a sensibile way to do
things.
> > Perhaps there is a difference between a visual design environment
and a
> > command line approach to designing GUIs, but I don't understand why
> pople
> > insist that all GUI controls must use an external model instead when
> > sometimes an internal model will do just fine.
> >
> I don't know about what other people are advocating, but I'm myself
> talking about having both systems, so that you can use the non-MVC
> approach and the MVC one whenever you need one or the other.
> 
> Of course, for creating labels in a form, usually, you just want to
set
> the caption and that's all, but it's very useful to have the option to
> use MVC whenever you want.
> 
> cheers
> --
> Rodrigo Moya <rodrigo@ximian.com>
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list