It does turn the CFC into a type of controller page, but not necessarily a
display page.  If the CFC is just performing the action and then doing a
cflocation then it's not a display page.

I'm not saying I like this technique--I don't--but if you're looking into
using CFC's as actions for forms, as Ian asked about, then Pollster is one
application where this is used and used effectively.

Todd's point about losing form variables is a very good one.  If you need to
redisplay the form with error messages, this technique doesn't hold up well.
I don't remember what Pollster does about this.

Pollster is basically set up so it has display CFM's, business logic and
data CFC's, and handler CFC's.  All of business logic and data management is
confined to the appropriate CFC's--they do their thing and return results.
These CFC's are called either by the display CFM's or by the handler CFC's.
There are two handler CFC's, one for form submissions and another for Flash
Remoting requests.

The one thing I don't like is that there are multiple types of
controllers/handlers.  The display CFM's accept GET requests themselves and
display appropriate pages, and there are CFC's that handle form post
requests, process and relocate.  With a hybrid HTML/Flash applciation such
as pollster you need to have both a CFM controller for regular HTML pages
and a CFC controller for Flash Remoting requests, but I would prefer that
these are just proxies to a centralized controller, which can be either cfm
or cfc--separate argument.

My $0.02.

Sam

----------------------------------------------
Blog:  http://www.rewindlife.com
Chart: http://www.blinex.com/products/charting
----------------------------------------------


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Bryan F. Hogan
> Sent: Tuesday, September 23, 2003 3:01 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Using a CFC as the action of a form.
>
>
> "Pollster in DRK4 uses CFCs as the action for all of it's forms.
> It uses a
> technique where the CFC form handlers have a return type of void and do
> their processing.  After processing it does cflocation back to a cfm to
> display results."
>
> I'm not saying that Christian did this the wrong way, but I don't
> understand
> why. Doesn't using your CFC as your action page turn that action
> page into a
> display page?

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

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

Reply via email to