> >So it's basically a hack to break the fusebox model
> >when it saves 30 seconds of coding? Doesn't that create
> >an ugly hybrid that's impossible to maintain?
> 
> What would there be to maintain? You drop the new file in the directory,
> its done. There is nothing to maintain.

Well, it's not impossible to maintain, but more 
difficult to maintain. Most of the advantages of
Fusebox are thrown out the window. The beauty of
Fusebox is that it abstracts the task from the 
steps taken to complete the task. Using the 
suggested technique, you can't mix and match 
steps (fuses), and you can't change the steps 
involved in a task without changing the way the 
task is called.

To illustrate, suppose you quickly throw together
a file, dsp_widgetStats.cfm, to view Widget 
Statistics. You call it like this:

index.cfm?file=dsp_widgetStats.cfm&widgetID=xxx

It's a nifty little tool, and you end up linking 
to it in a dozen different places. In fact, some
people have bookmarked and linked to the stats on 
their favorite widgets. A couple of other related
applications have also tapped into it.

Now suppose that step gets more complicated. In
the interest of making the code modular, you 
break out the query into another file (maybe that
file already exists), qry_widgetStats.cfm, and
now you have to perform some calculations on
the data before presenting it (act_calcWidgetStats.cfm).

I challenge you to explain how you would plug
in the new code without disrupting the rest of
the world, adding a new layer of complexity, 
retrofitting the app for backwards compatibility,
causing the need for major changes to the
documenation, etc. 

(I know in the real world this situation is highly
unlikely, but I wanted to illustrate as many of
the disavantages of the pattern suggested as 
possible in a single example.)

Patrick

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