>I wouldn't use a blanket request scope, changing all form and url to
>request scoped variables.
Request scope is the best place to keep all actor message variables because
like URL, FORM and FLASH structures Request structure is global.
The discussion might be, "Why should an application transform URL, FORM and
FLASH to Request?" I have two responses to that question. First, security.
All incoming messages should be checked for hack syntax, like
cf_inputfilter. In our code, this is run before any application
logic. After the checks, all messages are moved to Request scope. This way
any programmer working on the application does not have hack check
attributes.
Second. Ubiquitous namespace availability for actor messages. This means
that actor messages exist everywhere and are available to any scope in the
application. On http://www.cflib.org/udf.cfm?ID=976 is a UDF,
RequestInOut, that copies URL, FORM and FLASH to Request.IN structure. In
doing so, the application programmer can focus on message content without
concern for which input structure did CF use.
One topic not discussed much is the actor output structures. RequestInOut
prepares Request.OUT structure for response messages to the actor. For
example, in the FLASH interface, a statement, FLASH.Result =
Request.OUT, moves the application output to FLASH. Even HTML style code
benefits from Request.OUT structures when using separate display layers and
logic layers.
I have heard the comment "overloading the request scope" When programming
for actor messages, this statement is nonsense. In fact, CF benefits from
qualified variables. It is better to code, <input type="text" name="name"
value="#Request.OUT.name#">
Understand, I am not saying use Request.IN or Request.OUT, that is a
programming style. What I am saying it that Request scope, because it is
global, is the best place to handle actor messages for both incoming and
response messages.
Moving actor message to Attributes scope? If using the Request scope, that
would be redundant.
>
>----------
>[
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

