Claude Schneegans wrote:

>>>It is a big deal if it made your job easier and your project more successful.
>>>      
>>>
>
>My point is that it DOES NOT make my job easy.
>Apparently, at least for the product I'm thinking of, it made easier for the 
>programmers to make an inefficient system that repeats 5 times the same query 
>in the same page, etc. And it is a commercial product.
>And no, trying to find my way in a structure that includes 100 templates DOES 
>NOT make my job easier.
>
I tend to stay out of the fusebox arguments and have since in the 
inception of FB3, which is frankly a right old mess and deserves the 
criticism it deserves when, in my opinion (which probably isn't worth a 
damn), it lost sight one of the original core concepts of Fusebox; 
readability.  It became illegible to the casual code browser and the 
core code was quite capable of generating spaghetti without adding 
anything extra to the application. This said, Mach-ii does intrigue me 
and given appropriate time I will be taking a look at it. 

This all aside, well a written Fusebox application, whatever version you 
use be it FB2, xFB, FB3, FB4 or Mach-ii (not strictly FB, but an 
off-shoot all the same), should NOT call the same query in the same page 
5 times.  That is just plain bad application design and development and 
is not a function of Fusebox.

Breaking an application into lots of small templates that are only 
included when required and controlled by conditions is actually very 
efficient in version of CF prior to CFMX.  The reason being that in 
previous version of CF included files are only ever interpreted when a 
surrounding condition was found to be true. 

For example :
<cfif somecondition>
    <cfinclude template="thisfile.cfm">
<cfelse>
    <cfinclude template="thatfile.cfm">
</cfif>

If somecondition is true then thisfile.cfm is picked up and interpreted, 
but thatfile.cfm is ignored.  If these templates are actually quite 
large and the code was inline in the condition above, then every single 
line of code would have to be interpreted, rather than only the code 
that is required for the given condition.

This doesn't forgive bad layout of conditions and poor naming for files, 
but with readable code, sensible filenames and a fuseaction you should 
be able to isolate the file you need to one or two files at the most 
fairly quickly.  Unfortunately, FB3 does not lend itself well to this 
simple concept because it attempts to make life easy for you by allowing 
you to map circuits in the fbx_Circuits.cfm file and having 300 lines of 
code in one of 5 files in order to work all that out.

I still use an enhanced/extended version of fb2 after all these years.  
I can go back to an application that I haven't looked at in years or 
look at any number of applications written by a number of colleagues 
around the country and within minutes I can follow the code and find the 
files I need.  (I may cringe at some of the code I wrote way-back-when, 
but that soon repaired if needs be)

Anyway, after all that, my point is that your problem with this 
application that you mention is unlikely to due to the fact that it is a 
Fusebox framework application and more to do with shoddy workmanship.  
You should have been able to add a new circuit for your new 
functionality and simple change a few display templates in order to add 
the appropriate links to the new actions in your new circuit.
Fusebox really is just a simple hub/spoke procedural framework at the 
end of the day.

Other than that, I agree with a lot of what you've said.  Other than for 
code re-use, I still don't quite understand why OO is being forced onto 
a concept that is inherently procedural.

Stephen


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185671
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to