Feb 13
I have been using fusebox for a few years now and really like it. I have a way of doing things which has become familiar and seems to do the job, but I wonder what other patterns there are. Here is mine.
I have a layout circuit which runs as a globalfuseaction, postprocess. This handles all the basic page stuff - HTML meta tags, linked css files, javascript files and including any constant elements of the page - title, footer, navigation etc. It will also pick up and render the main content generated by other circuits that have run for the current request. The circuit.xml file for this layout circuit will handle any logic to determine alternative layouts if required (such as popup windows or pages for print).
Business logic and database access is in cfcs.
All control of flow should be visible in the circuit files which means I will have some 'if' statements in the XML. Where possible I invoke cfc methods direct from the circuit.xml. I always use XFA's for all exit points from a fuseaction. One of my aims is that you should be able to open up the circuit.xml files only and understand the application at a reasonable level without the need to delve into actual code.
I would love to hear how other people commonly use fusebox.
I have a layout circuit which runs as a globalfuseaction, postprocess. This handles all the basic page stuff - HTML meta tags, linked css files, javascript files and including any constant elements of the page - title, footer, navigation etc. It will also pick up and render the main content generated by other circuits that have run for the current request. The circuit.xml file for this layout circuit will handle any logic to determine alternative layouts if required (such as popup windows or pages for print).
Business logic and database access is in cfcs.
All control of flow should be visible in the circuit files which means I will have some 'if' statements in the XML. Where possible I invoke cfc methods direct from the circuit.xml. I always use XFA's for all exit points from a fuseaction. One of my aims is that you should be able to open up the circuit.xml files only and understand the application at a reasonable level without the need to delve into actual code.
I would love to hear how other people commonly use fusebox.
Recent Comments