Benoit, thanks for the summary of your rules-of-thumb for CF modularisation.
I'll check out your site later. For now, could you clear up some terminology
for this no-CS-background designer-turned-coder? ;-)

I can hazard good guesses, but what do you mean by "view, controller and
model" layers?

Also, I know the idea of "business rules" from relational DB design - am I
right in saying you're using "business logic" here in a similar sense, to
apply to the CF application? That is, it refers to procedures and functions
mostly specific to the current application?

If this is so, am I right in saying that, given your personal rules,
cflib.org for sharing UDFs is useful, but cfczone.org for sharing CFC's is
less useful? I know it's fine to use CFC's for generic functions and
cfczone.org will probably become as useful as cflib.org, I'm just trying to
gauge the meaning of your rules with this analogy. If you use CFCs for
"business logic encapsulation", they may not be very portable - unless I'm
taking the term "business logic" in a too narrow sense.

- Gyrus

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~


----- Original Message -----
From: "Benoit Hediard" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, September 30, 2002 9:26 AM
Subject: UDF Vs CFC (was RE: So many problems with CFC scopes...)


> I agree with you Raymond.
> But it is true that is more "personal preference/coding style terms" than
> "performance/architecture terms".
>
> This are my personal rules :
> CUSTOM TAGS (ColdFusion Taglibs)
> - custom tags encapsulates presentation logic they always output content
> (usually HTML),
> - custom tags usually do not call the model or controller layer,
> - custom tags are only used by the presentation layer (page or pagelet
> scripts).
> >> They are used for presentation logic encapsulation.
>
> USER DEFINED FUNCTIONS (UDF)
> - user defined functions encapsulate generic logic and rarely output
content
> (except for string formatting purposes),
> - user defined functions do not call the model or controller layer,
> - user defined functions are used in any layer (view, controller or
model).
> >> They are used generic logic/function encapsulation.
>
> COLDFUSION COMPONENTS (CFC)
> - components encapsulate business/data access application logic and never
> output content,
> - components are called by the view layer only to read data,
> - components are called by the controller layer to create/update/delete
> data.
> >> They are used for business logic encapsulation.
>
> .. I've put some examples here
> http://www.benorama.com/coldfusion/patterns/part3.htm
>
> Benoit Hediard
> www.benorama.com

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to