You're right that the latest MVC fad is basically
the same as regular old Fusebox, especially in FuseQ.

It basically allows us to get around the limitations
imposed by the simple circuit->fuseaction->fuse 
relationship. For example, if I have three fuses 
that are used together in several fuseaction the
duplication drives me nuts. There's a strong 
temptation to put them all behind another fuse, but
the practice of fuses including fuses is frowned
upon. With MVC I can put them all in a fuseaction
and call that fuseaction instead.

It allows us to reuse code across circuits without 
breaking the encapsulation of each circuit. For 
example, our intranet has over 70 circuits and 
probably half of them need to find information about 
a user. I would hate to put the qry_user fuse in all 
of those circuits, and I also don't want one 
circuit messing with another circuit's fuse files.
I'm also not a big fan having separate block/queries 
directories. Instead, I have a user circuit with
fuseactions like getUser, updateUser, addUser, etc
that the other circuits use. I don't have to keep
track of where the circuit is physically located,
and I can change the implementation (fusefiles) 
without affecting the public interface (fuseactions).

My fuseactions are a lot smaller and easier to test
now. The ability to point to a "model" fuseaction in 
my browser, along with some attributes in the URL, 
and have the results dumped to the browser is a 
tremendous help.

Personally, I haven't found much reason to keep the
view and the controller separate, as there's almost
always a one-to-one relationship between the two, 
so I'm not /really/ using MVC. And I wouldn't say
that MVC (or M-VC) is appropriate for every
application, but if you're having problems with 
duplication it's a great help.


Patrick

 



> -----Original Message-----
> From: craig girard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 4:46 PM
> To: [EMAIL PROTECTED]
> Subject: Can you give me the 'why's' of MVC?
> 
> 
> I have been working with MVC for the past couple of days and 
> what has dawned
> on me is that I am really replicating what I have been doing 
> in regular
> fusebox all along.  Separating code into views, models, and 
> controllers.
> The difference seems to be now I am separating them into 
> their respective
> directories, which I am not seeing the need for.
> 
> This has got me wondering is MVC truley solving a problem, or 
> is it just the
> latest 'thing' to do?
> 
> When faced with this question I always ask "why should I use this
> 'technology'?"  And many time comes out that its overkill for 
> what I wanna
> do.
> 
> Why do I want 3 separate directory structures?
> Why is model/view/controller an advantage over basic fusebox?
> 
> Can you give me the whys?
> 
> Thanks,
> 
> Craig
> 
> 

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================

Reply via email to