> Can I get some input here. > We are using mostly CF 4.5, with one 5.0 server and several CFMX servers > on > the way. For now though the question is, which is the best, most > productive, > lowest load and overhead method to use for reusable application code? > There > is some debate here as to the viability of using custom cf tags instead of > implementing them as modules (or, in some cases, as includes).
What's most efficient for the server isn't always what's most intuitive for developers. I'm partial to both includes and custom tags but for different purposes, and I rarely (if ever) use the <cf_tag> syntax. I almost invariably call custom tags using <cfmodule template="../relative/path/to.cfm"> syntax. The reason for this is two-fold: first to avoid confusion with local tags which might occlude tags in the custom tags director(y|ies) and second because I antiscipate my software being used on shared hosting servers, which makes it all the more important that it be very explicite about what code it needs and where. That being said, custom tags do require more overhead if for no other reason than the fact that the cf-server has to create an environmental "bubble" for the custom tag to execute within. The cf-server actually does this to a much smaller degree with included files as well. It's less work for an include tho because the environment is less separated, i.e. the attributes and caller scopes, etc. If you're primary concern is efficiency for the server, stick with includes for anything you can reasonably manage with them. Resort to custom tags only if you need recursion. On CF 5 you can get some recursion out of UDF's ( I've done this for display of nested tree components ) -- on CFMX you can probably get anything you would get out of a custom tag out of a function in one way or another using <cffunction> syntax. I can't say what the performance differences would be tho. I would expect the function to perform better, but I'd have to test it to know. S. Isaac Dealey Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

