Hi All,

I recently had a discussion with some other programmers on my team dealing
with where to put application code and when. This is a small little guide I
wrote that I try to use and I wanted some second opinions on my coding
logic.

 

Thanks,

Paul

 

----------------------------------------------------------------------------
-----------------------------------------

 

When to put your code where. In my opinion this is the IDEAL location for
code. 

 

Straight on CFM Page

Should Contain: UI or presentation code. HTML, JavaScript, simple ColdFusion
(IE; does var.foo exist output etc..).

Should Not Contain: Application Logic. Processes or functions.

 

Includes

Should Contain:  Code should contain same type of code as CFM pages however
includes should be used to split large CFM pages into smaller segments. 

Should Not Contain: Application Logic. Processes or functions.

 

Custom Tags

Should Contain: Reusable UI or presentation code. HTML, JavaScript, simple
ColdFusion. Code that's going to be used more than once.

Should Not Contain: Application Logic. Processes or functions.

 

CFC's

Should Contain: Application Logic. Processes or functions.

Should Not Contain: UI or presentation code.

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339132
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to