Lee,

Would you recommend using that technique in a situation
where there was no existing code to be ported?

Patrick


----------------------------------
Patrick McElhaney              <><
Intranet / Web Site Developer
American City Business Journals
704-973-1019    704-236-8351 (cell)

> -----Original Message-----
> From: lee borkman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 6:05 PM
> To: Fusebox
> Subject: Re: inheritance of fuseactions
>
>
> Hi Ken,
>
> The standard answer around here is "if you want OO, use Java or
> CFObjects."
>
> BUT...
>
> I have recently adapted a large FuseBox app (around 4000 fuses) so that I
> could create multiple near-clones which could inherit almost all
> functionality from the master.
>
> In effect, I have the apps inheriting Fuses (not FuseActions).  XFB makes
> this very simple.  All you do is make the location of every Fuse
> a variable.
>   Then you use normal XFB variable inheritance and overriding to set the
> location of your fuses.
>
> So, I have a home app, which has a complete set of fuses.  In
> myGlobals, I
> set a variable for the location of each fuse, pointing to the appropriate
> fuse in the master app.
>
> My clones are circuit apps, which MAY contain nothing but index.cfm,
> circuits.cfm and myGlobals.cfm.  Index.cfm is copied from the
> master app.
> myGlobals overrides the locations of any fuses which need to be
> customised, but inherits the vast majority of the fuse locations from the
> home app.
>
> A typical fuseaction, therefore, looks like this:
> <CFCASE VALUE="productDetail">
>   <CFINCLUDE TEMPLATE="#request.qry_product_fuse#">
>   <CFINCLUDE TEMPLATE="#request.dsp_product_fuse#">
> </CFCASE>
>
> The qry_ fuse is normally inherited from the master, but the dsp_
> fuse uses
> a customised version specific to this clone (ie circuit).  In
> practice, it's
> usually the dsp_ fuses that get overridden.
>
> Now I know this is a pretty out-there technique, but I couldn't
> think of an
> easier way to roll-out hundreds (yippee!!) copies of a large application,
> while still allowing unrestricted customisations.
>
> Anyway, it's working like a dream.  I can roll out customised clones, but
> continue to enhance/maintain the master application, and see my
> changes get
> propogated through all of the clones.  Normal common-sense rules
> apply here
> of course ;-)
>
> Is that any help?
>
> Lee Bjork Borkman
>
>
>
> >From: Ken Beard <[EMAIL PROTECTED]>
> >
> >cfset in the app_locals/app_globals (myGlobals, whatever) provides for
> >inheritance and overriding properties... but what about inheritance and
> >overriding of methods (fuseactions)?  any good ideas on how?
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to