The controller should be a far more lightweight than most people
(myself included) make it.  It's job description is AMAZINGLY minimal.
 Pretty much just "delegate page requests to a view template, after
fetching the needed data from the application proper".  This is one of
the reasons that as much of an OO guy I am, I don't use Mach-II.  It's
a friggin' howitzer where all you need is a slingshot.

I look back at stuff I wrote even a couple years ago and cringe at how
heavy the controller was.  But that was at the dawn of CFCs, and now
CFCs are coming into their own.  Very exciting times, I think, though
definitely not without their pain and suffering.

Here's how I look at it.  If it doesn't directly relate to the UI,
then it doesn't belong in the controller, because it's part of the
application proper, and has the potential to be reused across multiple
UIs.  I know most apps don't have multiple UIs, but that's going to
change, particularly as content syndication becomes more prevalent. 
Dual HTML/Flash apps aren't going to happen; there's no reason to do
both.  But pairing one of those formats with RSS or Atom is happening
more and more, and that absolutely qualifies as two UIs on a single
app.  So as academic as this type of abstraction might seem, it's
going to become real-world for a lot of people real quick, and from an
unexpected direction.  And really, that's all abstraction is about,
isolating your code from future changes that don't directly influence
it, so that you save time and money down the road when those changes
invariably happen.

cheers,
barneyb

On Thu, 10 Mar 2005 14:57:38 -0600, Jeff Chastain <[EMAIL PROTECTED]> wrote:
> 
> Interesting approach, I like it.  I always picture the controller doing what
> you have the controller doing plus what you have the service layer doing
> which makes the controller have to do and know a lot more.
> 
> This will definitely warrant some more investigation.
> 
> Thanks
> -- Jeff

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to