> As you stated, this can be done without a one-to-one 
> relationship between pages and components, but I want the 
> one-to-one relationship because that is what you have in the 
> MVC design pattern.

It's not required to have a separate controller for each view in MVC. In
fact, I suspect that most MVC implementations do not have a separate
controller for each view.

> So in ColdFusion we can:
> 1. Invoke a component and init the constructor on page 
> request 2. Invoke a components methods on form submission

Yes, you can do both of those. In addition, it's not necessary to treat the
component as stateful, so you don't necessarily even need to initialize
anything.

> It seems that these two things really perform all of the Page 
> Directive and Post Back functionality of .NET's Code-Behind 
> technique.
>
> ...
>
> You are right, using components versus using a template for 
> your controller layer really won't change the user's 
> experience. However, I really don't understand Microsoft's 
> boast in that regard either because Post Back requires a page 
> refresh.

It all has to do with the Microsoft model of web app development, which is
quite unlike everyone else's model. Microsoft's goal, with postback etc, is
to provide the illusion that web development works like desktop development.
If you've ever built a desktop application in, say, Visual Basic, the way
you'd do that is to design your form - and here, by form, I mean the entire
interface of your application, since it typically just sits in front of the
user the whole time they're interacting with the application - then wire the
things on your form together with each other, and with your database, by
adding event handlers to those things. Of course, HTML applications don't
really work that way (although Flex applications do!), so Microsoft put a
lot of work into an interface that would let it seem like they do work that
way, thus allowing desktop developers to leverage their existing skills
without having to relearn everything.

And, honestly, I think this is a pretty good idea - for Microsoft. They had
a vast base of existing desktop developers, and this helped them move to the
web. Unfortunately, this model breaks down when you get to the details, and
so to be a competent web developer you end up having to learn how web
applications differ from desktop applications anyway, eventually. And, of
course, for people like you and me, this model isn't especially useful since
we already know how web applications work.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262162
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to