* My inclination so far has been that only the controllers should be
accessing session data. Those values should be passed to views via
other variable names.
Views should be completely "isolated" from your "applicationlogic" or
global variables which sessions consist of. While some people don't
totally agree with that approach, it makes it easy to use the view in
other areas of your application and "layer" them onto one another.
* Is it appropriate for view files to access config variables, or
should those values be passed as different variable names from
controllers?
See answer #1
* What if I want to consume a web service, be it SOAP, RSS, or some
other flavor of XML/JSON? Should I create a model that handles that
data interaction?
Web services are to me considered business logic and as such belong in
models. having them at the controller layer is not very DRY as other
controllers might need the functionality as well. When consuming most
web services you need to "massage" the data and response to fit your
application logic and that is what your model is for. Also ask
yourself this: isn't retrieving data from a web service basically the
same thing retrieving data from a databases? Sure there different
setting and methods of retrieval, but the idea is the same: your
requesting data so it should go in the model layer.
* Helpers are pretty cool because they act as a standardized UDF
library. I see a lot of potential of downloading UDFs from places like
CFLib.org and just pasting them into the helper file(s). This is
getting me pretty stoked about writing a chapter about helpers.
There is no reason why we couldn't use the basic logic behind the
pluginmanager and tweak it to work with
cflib.org. all your doing is
cfhttping a page, grabbing data from it and throwing it into a file.
Which brings up an interesting thing: you could host something on
cfwheels.org that bridges the pluginmanager to different sources, such
as
cflib.org, the wheels plugin page,
riaforge.org or other resources.
* Does Wheels make custom tags obsolete? I've found myself taking
custom tags and doing some work to turn them into helpers/controller
methods. I've done this with the reCAPTCHA tag on
cfwheels.org Docs
section. (
http://recaptcha.riaforge.org/) The part that displays the
tag is a helper, and the part that does validation is a method in my
base controllers.Controller.
I was thinking the same thing, but after reading raul's response, I
sort of salivated a little. What i think he is dreaming of is a
template language for wheels. While I wish we could do this is
straight cfscript and functions, we can't since cf doesn't support the
concept of blocks at the function level, but it does at the tag level.
This means if we wanted to write something of a template language, we
would have to do it in tags, which to me isn't such a bad thing. That
said, whoever uses or codes CFX tags nowadays should be SHOT!