>   On 8/16/06, Marc Funaro <[EMAIL PROTECTED]> wrote:
    >   > And, I just saw an example where the cfc's are 
    >   invoked directly from 
    >   > the controller circuit xml file.  This would seem to 
    >   be one step ABOVE 
    >   > placing them in a model circuit file... is this 
    >   recommended at ALL?

    >   
    >   I do that and I think Brian Kotek does too. Maybe quite 
    >   a few of us do.

I truly am curious to know how big a difference there is among everyone, on
how they are calling their model when using CFCs.  Hoping more people will
chime in on this one.

    >   
    >   > 1.  in act files, called using a model circuit xml file.
    >   
    >   Seems pointless complexity to me.
    >   
    >   > 2.  using <invoke> in the model circuit xml file, or
    >   
    >   Seems redundant.
    >   
    >   > 3.  using <invoke> directly in the controller circuit 
    >   xml file.
    >   
    >   My preference.

So then I guess the question is, if the MVC pattern is meant to truly
isolate the three functions, isn't placing the calls directly to the CFCs in
the controller circuit creating a situation where there's a dependency - the
controller is locked into a model that is built solely on CFCs, with no
other type of model possible in the future (such as the "other" model, where
there was a model circuit and act files).  What if someone wishes to mix
CFCs and the elder method of creating the 'model'?  (yeah, I know... How
likely is that... Either commit to the CFCs or not!, right? ;)

To rephrase, shouldn't the controller be sending messages to a central model
circuit, and have that circuit return back what's expected, without the
controller needing to understand the implementation used to get what is
returned to it?
    >   
    >   > It seems that if you are going to use true MVC 
    >   pattern, #3 is totally 
    >   > out,
    >   
    >   Why? Your controller talks to your model.
    >   
    >   > and #2 is iffy, based on what Simeon said - that 
    >   without using act 
    >   > files,
    >   
    >   Why?

Just referring back to what Simeon said:

"In general I consider this bad practice because (without lexicons and such)
you cant catch errors and you have limited choices in what you can do from
this point."

So at least one person here is using #2, and if he didn't want to venture
into what he considers to be "bad practice", would actually use #1.

    >   
    >   > Am i splitting to many hairs yet? :)
    >   
    >   You're definitely over-thinking the problem, in my opinion.

Understood.  Not trying to be contrary.  From my point of view, I am perhaps
just (over) examining what the MVC pattern is all about.  I prefer to know
when I am straying from "purity", if I am going to choose to do so... If a
super-experienced top-notch programmer tells me "put it in the controller"
(and one just has! ;)  then I am certainly going to lean that way first...
But these questions still seem pretty valid to me before I forge ahead with
that decision.  

However, I can also see that this is likely heading into off-topic territory
for this list at this point, too.

That all said, if nobody wants to continue this thread, I'll go ahead and
<invoke> directly from my controller and shut up now.  :)







-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to