RE: CFC Performance Best Practice

2003-03-24 Thread Ryan Emerle
Your best bet is to separate CFCs into their logical parts.  This will aid in 
usuability and readablity.  Performance differences would be negligable(sp?).

Remember that CFCs are components and most developers will see them as that.  So 
instead of having one big CFC for ecommerce app, you would have a component for each 
component of the ecommerce application (customers,orders,cart,etc..).

My $0.02
--
Ryan Emerle



-Original Message-
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 10:25 AM
To: CF-Talk
Subject: CFC Performance Best Practice


The question I have, is there any performance advantages and/or
disadvantages to one large CFC file versus several smaller ones?  I'm
writing an application using a CFC for all my administration database tasks.
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.
My question is there any performance reason to do this?  The single large
file will probably top out at about 20K, does this add to the overhead of
any template calling on the CFC?

--
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: CFC Performance Best Practice

2003-03-24 Thread Sean A Corfield
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=subscribeforumid=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.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFC Performance Best Practice

2003-03-24 Thread Tim Blair
 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.

Speaking of which, is there going to be a run down of how it was
developed?  Showing best practices etc in developing large sites with
CFMX, CFCs, Flash etc?  Or is there one already that I've missed?  I've
seen the info on what's been done, but not HOW it's been done?

Tim.


---
RAWNET LTD - Internet, New Media and ebusiness Gurus.
Visit our new website at http://www.rawnet.com for
more information about our company, or call us anytime
on 01344 393 040.
---
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: CFC Performance Best Practice

2003-03-24 Thread Sean A Corfield
On Monday, Mar 24, 2003, at 08:52 US/Pacific, Tim Blair wrote:
 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.
 Speaking of which, is there going to be a run down of how it was
 developed?  Showing best practices etc in developing large sites with
 CFMX, CFCs, Flash etc?  Or is there one already that I've missed?  I've
 seen the info on what's been done, but not HOW it's been done?

Yes, we will be publishing a series of articles on Macromedia DevNet. 
My article on facades hints at some of the structure behind the site 
(at a very high level):

http://www.macromedia.com/devnet/mx/flashremoting/articles/facades.html

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim/iChat: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.macromedia.com/go/arch_blog

Announcing Macromedia DevNet Subscriptions
Maximize your power with our new premium software subscription
Find out more: http://www.macromedia.com/go/devnetsubs

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



CFINCLUDES and RE: CFC Performance Best Practice

2003-03-24 Thread Mike Brunt
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 Web Application Specialists

-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=subscribeforumid=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

2003-03-24 Thread Sean A Corfield
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=subscribeforumid=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

2003-03-24 Thread Mike Brunt
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 Web Application Specialists

-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=subscribeforumid=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

2003-03-24 Thread webguy
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 Web Application Specialists

-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=subscribeforumid=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

2003-03-24 Thread Sean A Corfield
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=subscribeforumid=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