Re: CFINCLUDES and RE: CFC Performance Best Practice
On Monday, Mar 24, 2003, at 10:01 US/Pacific, Mike Brunt wrote: > With regard to coding bad practice I have no > doubts that multiple layers of nested includes-custom tags are bad > practice > as they make code very hard to read and follow. Hmm, it isn't the multiple layers that make code hard to read per se so it must something else. It is generally accepted best practice in software engineering to break code down into smaller, reusable chunks. In CF, that has historically translated into includes and custom tags (and now it's UDFs, custom tags and CFCs). If this is done properly, it should be very readable and easy to maintain. That means using good, clear naming and an 'obvious' decomposition into smaller parts. If you choose a bad decomposition then of course you get unreadable code! Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFINCLUDES and RE: CFC Performance Best Practice
Actually I disagree with this. It is true that breaking up code into smaller blocks that are contained in several files can make code hard to follow. Sometime you go from template -> includes -> tags -> storedprocs -> to database -> triggers.. which can be pretty confusing. However the benefit of this approch becomes evident when you start changing code. And good documentation will help you here... Of course there is a difference between good abstraction and just writting spaghetti code, and I've written both:-) WG -Original Message- From: Mike Brunt [mailto:[EMAIL PROTECTED] Sent: 24 March 2003 18:01 To: CF-Talk Subject: RE: CFINCLUDES and RE: CFC Performance Best Practice Ok Sean, on the performance I read that somewhere but cannot recall where, when I do I will point it out. With regard to coding bad practice I have no doubts that multiple layers of nested includes-custom tags are bad practice as they make code very hard to read and follow. Our opinion here at Webapper is that all who see our code should be able to fully understand what we did, how and why and even with the best of commenting multi-level nested includes are very hard to follow. Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper -Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 9:35 AM To: CF-Talk Subject: Re: CFINCLUDES and RE: CFC Performance Best Practice On Monday, Mar 24, 2003, at 09:30 US/Pacific, Mike Brunt wrote: > Am I right in my assumption that nested CFINCLUDES/CUSTOM TAGS cause > performance issues in CFMX? I am fully aware that they are bad coding > practice but just wanted to clarify this point. News to me... both that they supposedly cause performance issues and that they are bad coding practice... could you clarify for me? Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFINCLUDES and RE: CFC Performance Best Practice
Ok Sean, on the performance I read that somewhere but cannot recall where, when I do I will point it out. With regard to coding bad practice I have no doubts that multiple layers of nested includes-custom tags are bad practice as they make code very hard to read and follow. Our opinion here at Webapper is that all who see our code should be able to fully understand what we did, how and why and even with the best of commenting multi-level nested includes are very hard to follow. Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper -Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 9:35 AM To: CF-Talk Subject: Re: CFINCLUDES and RE: CFC Performance Best Practice On Monday, Mar 24, 2003, at 09:30 US/Pacific, Mike Brunt wrote: > Am I right in my assumption that nested CFINCLUDES/CUSTOM TAGS cause > performance issues in CFMX? I am fully aware that they are bad coding > practice but just wanted to clarify this point. News to me... both that they supposedly cause performance issues and that they are bad coding practice... could you clarify for me? Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFINCLUDES and RE: CFC Performance Best Practice
On Monday, Mar 24, 2003, at 09:30 US/Pacific, Mike Brunt wrote: > Am I right in my assumption that nested CFINCLUDES/CUSTOM TAGS cause > performance issues in CFMX? I am fully aware that they are bad coding > practice but just wanted to clarify this point. News to me... both that they supposedly cause performance issues and that they are bad coding practice... could you clarify for me? Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFINCLUDES and RE: CFC Performance Best Practice
Sean just wanted to revisit something, which is sort of related in a way. Am I right in my assumption that nested CFINCLUDES/CUSTOM TAGS cause performance issues in CFMX? I am fully aware that they are bad coding practice but just wanted to clarify this point. Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper -Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 8:37 AM To: CF-Talk Subject: Re: CFC Performance Best Practice On Monday, Mar 24, 2003, at 07:24 US/Pacific, Ian Skinner wrote: > The question I have, is there any performance advantages and/or > disadvantages to one large CFC file versus several smaller ones? Not really (in terms of real-world, "under load" performance). > Currently I have everything in one CFC file. The tasks could probably > be > logically broken up into three or four smaller CFC files by function > type. In terms of maintainability and readability - which should generally be overwhelming concerns - you almost certainly want to break your CFC up into more logical components. Whilst I don't want to minimize performance issues, they really should take a back seat to maintainability issues. Remember that macromedia.com's back end is built heavily on CFCs using design patterns and a lot of good OO practice - and it handles over 15,000 active sessions during peak traffic. Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4