Hi,

When you're modelling your application, how much attention do you pay to
minimizing the number of objects instantiated?  Obviously CF has a higher
object creation overhead than some other languages.  OTOH, the gist of much
OO practice (and many patterns) is to create lots of fine grained objects.
I often read that a typical noob error is creating too few objects with too
many responsibilities.

So, how often do you find yourself thinking "well, in Java or Smalltalk I'd
do xyz, but in CF I'd better not because I'd end up with too many objects"?
Which is another way of asking to what extent we need to modify existing OO
practices to allow for CF's limitations.

A couple of points of reference:
1. This post was prompted by a discussion with Mark Mandel on the
transferdev list.  I'd spotted an issue purely because of the massive
slowdown that occurred when 700 objects were inadvertently created.  That
issue has been resolved, but it left me wondering, if I can't instantiate
700 objects how many can I create?  10?  50?  This has huge implications for
how we architect our apps.

2. I have a Dolphin Smalltalk image that, from a fresh install, reports
instantiating 160,000 objects.  Obviously with an object system this slick
you don't worry much about throwing in a few hundred more.  Given that CF's
comfort zone is probably a couple of orders of magnitude lower, maybe a lot
of the standard advice on OO design just doesn't apply to CF?

Any thoughts appreciated.
Jaime Metcher


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to