I'll say this: the first few times I tried to implement MVC, I wound up with
the biggest, ugliest, over-engineered mess ever.
Don't try to implement MVC just because all the cool kids are doing it.
Patterns are there to solve problems. When you know them well, suddenly one
day you'll be doing something and a light will go on and you'll see the
situation in front of you and how such and such a pattern will make it a lot
simpler. 
Unfortunately, "getting to know them well" often means building a few big
over-engineered messes (at least for me it did).
One good way of getting to know good frameworks and pattern use is to study
existing implementations. ARP is a great starting point, and the Cairngorm
framework is really cool too. 
Keith

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Alias
> Sent: Thursday, November 24, 2005 3:47 PM
> To: Open Source Flash Mailing List
> Subject: Re: [osflash] Model View Control
> 
> Hello Jim,
> 
> The Model View Controller pattern is quite an old "paradigm" 
> (or thingy), and it is widely used. There are many cases 
> where it is appropriate, and some where it is not. I wouldn't 
> describe a design pattern as a "paradigm", but more as a 
> "mental roadmap".
> 
> It's important to consider that Flash itself is, to a certain 
> extent, your view tier, which is unusual when reading 
> articles written for a more traditional coding audience. It's 
> easy to get into over-engineering and replicating stuff 
> that's already there.
> 
> The basic idea is that you can have an abstract model, which 
> keeps your data, and a view which is completely independant 
> from the model.
> This means you can re-use the model, and display the same 
> data in different ways. The role of the controller is 
> somewhat more murky, and you will find differing opinions on 
> where/how/why/what it should and should not do or be able to 
> do. I'm not familiar with all of the different variations, 
> but there are many different approaches to the same thing.
> 
> See:
> http://c2.com/cgi/wiki?ModelViewController
> for angry,heated wikidebate on what should & shouldn't be done...
> 
> The important thing to understand is that with design 
> patterns, there is no "exactly right" way to do any of them. 
> They're simply ways of describing commonly used solutions to 
> commonly occurring problems. You shouldn't start slavishly 
> using patterns just for the sake of it. The most important 
> thing with design patterns is to try to implement them 
> yourself, and learn the various advantages/disadvantages of 
> the approach.
> 
> A good book which is often recommended by Aral is "Head First 
> Design Patterns" which will cover MVC, and a whole load of 
> other patterns as well.
> 
> http://www.amazon.com/gp/product/0596007124/102-7563523-499452
> 6?v=glance&n=283155&n=507846&s=books&v=glance
> 
> 
> Hope this helps.
> Alias
> 
> On 11/24/05, Jim Tann <[EMAIL PROTECTED]> wrote:
> > Hello again all,
> >
> > This isn't really a flash question but I think you guys can 
> answer it. 
> > I have for the past few months been getting into the swing of OOP 
> > after being a scripting programmer for years. I have a good 
> grasp of a 
> > lot of it now I think inheritance, interfaces, callbacks and events 
> > have all fallen before me.
> >
> > The main ting that still confuses me is the whole thing 
> with patterns. 
> > I first read 
> > 
> http://www.amazon.com/gp/product/0735713804/104-4438281-6539939?v=glan
> > ce &n=283155&v=glance OOP with AS2.0. This introduced me to the MVC 
> > paradigm. I have since read several papers and article's each 
> > referencing the MVC thingy (I feel silly using words like 
> paradigm so 
> > I now call it a thingy) each of them uses it in a different 
> way. Some 
> > say the view can read the model & cant even see the 
> controller while 
> > the controller fires events to the model that is just a database. 
> > Others say that the controller is a go-between for the 
> model & view so 
> > there are no direct calls between them. Others tell me yet more 
> > descriptions of apparently the same thing.
> >
> > What I want to know is if there is a good all round tutorial not 
> > necessarily in any programming language just a good 
> description of how 
> > best the MVC thingy works? Or if one of you guys has a solid 
> > understanding, can you give me a rundown of how it should 
> be working?
> >
> > Thanks in advance
> > Jim
> >
> > _______________________________________________
> > osflash mailing list
> > [email protected]
> > http://osflash.org/mailman/listinfo/osflash_osflash.org
> >
> 
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
> 
> 
> 


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to