Michael:

I'll admit that I don't have years of OO experience behind me, but in my
experience I've found that many of the applications I've designed/built
share a very common paradigm: objects that require a line-item view
(e.g. lists and search results) and a zoomed-in or "detailed" view
(often used for full view of a single object or an edit/modify page of
that object). 

With that assumption, I think it makes the most sense to reserve object
instantiation for those full views of your object while creating other
CFC's that simply build queries for search results. I suppose the better
question to ask is - why would I need all the glorious details and
methods of a particular object if all I can really do in a line-item
sort of view is click on it?

Again, I'm not an OO expert by any means, so if someone out there can
enlighten us further, I'd look forward to it. I just try to use business
(or more specifically end-user) goals to drive the design.

-Rich

-----Original Message-----
From: Pacella, Michael [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 11:37 AM
To: CF-Talk
Subject: CFC performance difficulties

Has anyone experienced slow downs when passing around several CFCs as
objects ?

Here's the problem we have run in to:

To encapsulate information about all of the Campuses in our database, a
CFC
was created to act sort of like a Java object representing campus
(complete
with properties such as campusName, campusCode, campusBeginDate,
campusContact, etc.. -- and settors and gettors to retrieve them)...

Another CFC was created to access the database, performing functionality
such as "search". Search would query the DB, and then step thru the
results,
creating Campus CFC objects for EACH campus returned. The end result of
the
function would be a Structure whose Keys were the CampusCode and whose
Value
were the actual, aforementioned Campus CFC object. 

Passing around over 100 of these CFC objects encapsulated in a Structure
causes a massive performance hit....Using GetTickCount(), it was
determined
that simply writing a query and looping through it took about 27
milliseconds. Whereas, creating this structure of Campus CFCs, looping
through that and having an actual OO programmatic concept took about 563
milliseconds.

That seems a little bit excessive. The question is, (1) am I
misconstruing
the power of CFCs (2) can/have they been implemented in a similar
fashion
(3) was it intended for several to be encapsulated in structures (which
old
Java guys might look at as Hashtables whose values are Objects)...

Any insight here would be extremely helpful -- Thanks !
<http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=3&thre
adid
=643548> 
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

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

Reply via email to