Hi,
 I see the source of confusion. Separating display logic and business logic
is not about separating HTML and CFML. It is separating data showing and
collection (including business sanity checks) logic from business flow
logic and data update/seek layers. If you need to use cfml to collect data
so be it. For instance in PHP world, one can use smarty to make display
templates or even PHP. Using PHP  on display by itself doesn't mean that
you are mixing up logic with display. What you use PHP for is the
determinant.

-nitish

2012/1/26 Jason King <[email protected]>

> Hi Peter,
>
> Thanks, that's what I thought. I never really saw anyway around it, but I
> figured I'd clear that from the back of my mind while framework and coding
> style was up in discussion.
>
> Another question..
>
> Sometimes when I have a form that I'm writing up ad-hoc, I'll have a
> single page, that simply includes the form/display at the end of it. In the
> original page, I will declare all my variables, may all my sql calls, etc.
> and just do a cfinclude for the form document. Is that ok? It's ad-hoc. I
> was thinking I should have 3 documents. Core doc which includes a seperate
> document for the data logic followed by an include of the form.
>
> -Jason
>
>
> On Thu, Jan 26, 2012 at 11:47 AM, Peter J. Farrell <[email protected]>wrote:
>
>> Jason King said the following on 01/26/2012 11:15 AM:
>>
>>  Probably a stupid question really, but what about cfml in the form
>>> itself? For instance, I may want a different form field displayed based on
>>> a user's account setting, so in many forms, the display code itself also
>>> has cfml if/then's based on supplied variables.
>>>
>> That's display logic and CFML is perfectly fine there.  It would be a
>> different story if you had to use sq in the middle of the form to retrieve
>> some user value - you'd do that in the controller talking to the model
>> layer.
>>
>>
>> --
>> Peter J. Farrell
>> [email protected]
>> [email protected]
>> http://blog.maestropublishing.**com <http://blog.maestropublishing.com>
>> Identi.ca / Twitter: @maestrofjp
>>
>> --
>> online documentation: http://openbd.org/manual/
>>  google+ hints/tips: 
>> https://plus.google.com/**115990347459711259462<https://plus.google.com/115990347459711259462>
>>    
>> http://groups.google.com/**group/openbd?hl=en<http://groups.google.com/group/openbd?hl=en>
>>
>>    Join us @ http://www.OpenCFsummit.org/ Dallas, Feb 2012
>>
>
>  --
> online documentation: http://openbd.org/manual/
> google+ hints/tips: https://plus.google.com/115990347459711259462
> http://groups.google.com/group/openbd?hl=en
>
> Join us @ http://www.OpenCFsummit.org/ Dallas, Feb 2012
>



-- 
-Nitish
"Faith is a free Option"
http://www.forcesofindia.com/profiles/np

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en

     Join us @ http://www.OpenCFsummit.org/ Dallas, Feb 2012

Reply via email to