Omg
Did someone say that OO can be overkill? 

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Charlie Arehart (lists account)
Sent: Tuesday, 28 August 2007 2:40 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Any way to get a list of all cftags?


Fair enough. I wasn't keeping in mind that this was about Transfer, so
naturally that would be appealing to Mark. Still, the simpler approach would
certainly be important to those solving a problem where a full OO solution
would be overkill. :-) 

/charlie

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Monday, August 27, 2007 11:42 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Any way to get a list of all cftags?


Well,

As much as I agree with Charlie, I'll also add that this is a good example
of how and when to use the Factory design pattern. As this is what its job
is good at, then with the interface and object inheritance (Strategy Design
Pattern) it would make for a perfect example of design patterns in use in
Coldfusion.

Adds a bit more code, but hey gives you that abstraction layer of improving
the exstensability of the code even further.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273



-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Charlie Arehart (lists account)
Sent: Tuesday, 28 August 2007 12:02 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Any way to get a list of all cftags?


I'll throw out that for the same reason, it wouldn't have worked if one
tried to say "if running cf8, do cfdbinfo, else do whatever". That, too,
would fail on other than CF8 because the appearance of the CFDBINFO in the
page would trigger the compile error.

I'll share a trick I figured out when needing to do things like this in my
former life with New Atlanta: you could do "if running cf8, cfinclude file
to do cfdbinfo, else do whatever".

I know some will doubt me, because they think that CFINCLUDE in a
compile-time directive that pulls code in, but it's not. It's a run-time
directive. If the IF test is not true, then the CFINCLUDE is not executed.
It also doesn't "pull code in" even at runtime, but I won't open that can of
worms. :-)

Anyway, this doesn't solve Mark's problem, I know, but it might serve as a
catalyst for someone to think of another solution. 

/charlie

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of MrBuzzy
Sent: Monday, August 27, 2007 4:32 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Any way to get a list of all cftags?


I don't think that would work... you'd hit a just in time compile error (on
CF7). The cfcatch wouldn't ever get to run.

On 8/27/07, Andrew Scott <[EMAIL PROTECTED]> wrote:
> Dale,
>
> I was going to suggest that, and it might be the only way to 
> succesfully do the trick.
>
>
>
> On 8/27/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
> >
> >
> > Could you at application start or some other point do (for the tags 
> > you
> want
> > to use)
> >
> > <cfset isDbInfo = true />
> >
> > <cftry>
> >        <cfdbinfo ...>
> >        <cfcatch type="any">
> >                <cfset isDbInfo = false />
> >        </cfcatch>
> > </cftry>
> >
> > There are probably only a small number of tags that you want to use 
> > that won't be in all versions.
> >
> > Then you could say
> >
> > <cfif isDbInfo>
> >
> > And you don't need to code against specific products (assuming they 
> > all catch).
> >
> >
> > Regards
> > Dale Fraser










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