I'd only modify it a little: Straight on CFM Page
Should Contain: UI or presentation code. HTML, JavaScript, simple ColdFusion to implement UI/Presentation (IE; does var.foo exist output etc..). Should Not Contain: Application Logic. Processes or functions. Includes Should Contain: reusable ui code that doesn't require inputs (IE: headers, footers, sidebars, etc) Should Not Contain: Application Logic. Processes or functions. Custom Tags Should Contain: Reusable, Dynamic UI or presentation code. (IE generic headers that accept passed parameters for customization) 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 be dependent on any scoped variables Should Not Contain: UI or presentation code. On Fri, Nov 12, 2010 at 10:23 AM, Paul Alkema <[email protected]> wrote: > > 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:339134 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

