| 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
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
----------------------------------------------------------
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]