Hi
Nando,
Agreed
100% with everything except for the idea that having a facade to the model
creates spaghetti code.
There
are two distinct functions the controller usually handles in an HTML app - all
the HTML specific stuff, and orchestration. If you have only one controller
layer that always calls functions to get session information, check for cookies
and the like, try calling that using a web service or flash remoting and see
what happens. Of course, you could replicate your orchestration code in the
flash movie and in your HTML controller and have flash access your model
directly, but then if your business rules for orchestration changes, you have to
change them in two places.
To me,
it just makes perfect sense to have a facade to handle orchestration and to have
a seperate controller to handle all of the HTML specific stuff if you're ever
going to expose your business methods to non-HTML consumers. And it's not like
this is a pattern or approach I made up out of thin air - I'd say it's a pretty
well established pattern for enterprise architecture.
While
you're pointing to resources, I'd also add Martin Fowler for some less CF
specific, but interesting articles.
Best
Wishes,
Peter ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org 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/cfcdev@cfczone.org |
Title: Message
- [CFCDev] Do I Really Need A Controller? Aaron Roberson
- Re: [CFCDev] Do I Really Need A Controller? Dustin Tinney
- Re: [CFCDev] Do I Really Need A Controller? Aaron Roberson
- Re: [CFCDev] Do I Really Need A Controller? Dustin Tinney
- Re: [CFCDev] Do I Really Need A Controller... Aaron Roberson
- Re: [CFCDev] Do I Really Need A Contr... Dustin Tinney
- Re: [CFCDev] Do I Really Need A C... Aaron Roberson
- RE: [CFCDev] Do I Really Need... Peter Bell
- Re: [CFCDev] Do I Really Need... Nando
- RE: [CFCDev] Do I Really Need... Peter Bell
- Re: [CFCDev] Do I Really Need... Nando
- RE: [CFCDev] Do I Really Need... Peter Bell
- RE: [CFCDev] Do I Really Need... Peter Bell
- RE: [CFCDev] Do I Really Need... Peter Bell
- Re: [CFCDev] Do I Really Need... Joe Rinehart
- RE: [CFCDev] Do I Really Need... Peter Bell
- Re: [CFCDev] Do I Really Need A Controller... Cody Caughlan
- RE: [CFCDev] Do I Really Need A Controller? Peter Bell
- FW: [CFCDev] Do I Really Need A Controller? Peter Bell