Hugo,

Thanks for the thoughts. Yeah, I got out the ColdFusion MX Bible last night
(which is also a fairly good book) and re-read the two chapters on FuseBox
which does have (more or less) a large index.cfm file with lots of switch
activity. Right now, something about it doesn't sit well with me, but that's
probably just ignorance :)

Thanks for the advice.

......................
Ben Nadel 
Web Developer
Nylon Technology
6 West 14th Street
New York, NY 10011
212.691.1134
212.691.3477 fax
www.nylontechnology.com

"Vote for Pedro"

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Hugo Ahlenius
Sent: Thursday, December 08, 2005 9:44 AM
To: [email protected]
Subject: RE: [CFCDev] MVC exploration questions

| It just seems that in an MVC world, the Controller would want to 
| perform a Server transfer rather than a CFLocation so that it would be

| directly deciding which view to return to the browser, rather than the

| indirect way of sending a path request that would then send an 
| additional page request??

In it's simplest form for MVC the controller would call the model for
whatever data is needed, and that would be collected as queries,
structures and objects, that would then be processed ("dressed up") by
the views for presentation in a browser.

How would the controller do this? Yes, includes is one way, or calling
methods on business objects is another, then calling the views in
similar ways (custom tag calls, includes or methods calls). All this is
within one request.

I am not sure what you mean by an indirect way of sending a path request
-- from the above, you will see that a 302 redirect would not be a good
way to process the transition from model to view (business logic to
presentation). Neither would a forward() thing -- you want to keep this
within one request, and you want to play with heavy content in the
request (objects, structures, queries). Note that a 302 redirect passes
the control back to the user's browser as well.

I think the absolute simplest form of MVC (which is not very flexible)
is to have a index.cfm with one big cfswitch based on a "action"
parameter. Each cfcase call would contain a few calls to the model
(model.getItems() - get me info on all items in a query) put things in
the request scope, and then cfinclude one or more views to present
things in the query.

/Hugo 



----------------------------------------------------------
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