I agree.

I am currently the lead developer and architect for a rather large project
with structures as complex as you have, Grant.  I have been very strict with
ensuring that the structures are initialised properly with sane default
values as it saves a lot of heartache in the long run.  I understand where
you are comming from but all I can say is don't be lazy cause it will bite
you on the arse later

I do have some exceptions when a CFC is being loaded into the session scope
to persist it along with the session data it relates to (I said that bit so
Peter doesn't ask me why I don't just shove it in the application scope)
then I do use isDefined and isSimpleValue to see if the CFC needs to be
created and initialised.

For anyone that is interested, we have a 30 Gig database and 70 Gigs of
files to process in our application.  Performance is a huge issue.  Having
said that we have been able to tune the database (Postgresql) so we can sub
second response from tables with 150 million rows in them.

Cheers,
Simon

On 05/06/07, Haikal Saadh <[EMAIL PROTECTED]> wrote:
>
>
> Seems to be 6 of one and 1/2 dozen of another... but if you initialise
> it properly in one place, and it saves you from doing the check in 2 or
> more places, you've come out ahead.
>
> grant wrote:
> > @Dale: It throws.
> > @Haikal: Good Point. It's that laziness again - setting up and
> > maintaining defaults can be rather tiresome.
> >
> > On 05/06/07, *Haikal Saadh * <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >
> >     Personally, I favour sane defaults rather than having to check for
> >     presence of variables all the time. And the bigger and more
> >     complicated
> >     your data structs get, I think having to check to see if a variable
> >     exists is a quick path to insanity.
> >
> >     Side effect of eating too much spaghetti...
> >
> >     grant wrote:
> >     > Wow thanks for the response people. My question is really out of
> >     pure
> >     > laziness - I have a huge struct that i need to check a key for -
> >     the
> >     > actual key path is
> >     > session.currentuser.currentreport.filters.currentfilter.filterset,
> >     > where filters, currentfilter and filterset may not be present.
> >     so it's
> >     > heaps easier to do a
> >     > isDefined("
> >     session.currentuser.currentreport.filters.currentfilter.filterset")
> >     > than structKeyExists(session.currentuser.currentreport ,
> "filters")
> >     > and structKeyExists(session.currentuser.currentreport.filters ,
> >     > "currentfilter") and so on.
> >     >
> >     > or am i missing something?
> >     >
> >     > On 05/06/07, * Haikal Saadh* <[EMAIL PROTECTED]
> >     <mailto:[EMAIL PROTECTED]>
> >     > <mailto: [EMAIL PROTECTED]
> >     <mailto:[EMAIL PROTECTED]>>> wrote:
> >     >
> >     >
> >     >     Having seen more than my fair share of request scope abuse,
> >     I can see
> >     >     why he would.
> >     >
> >     >     I think easy access to request in CF can cause poor code.
> >     But then
> >     >     again, guns don't kill people,  people kill people, right?
> >     >
> >     >     Peter Tilbrook wrote:
> >     >     > I agree (disciplined) but he then bagged the "request"
> >     scope so
> >     >     now I
> >     >     > am not so sure.
> >     >     >
> >     >     >
> >     >
> >     >
> >     >
> >     >     >
> >
> >
> >
> >
> > >
>
>
> >
>


-- 
Cheers
Simon Haddon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to