Results 1 to 6 of 6

Thread: Do you fusebox??

  1. #1
    Senior Member
    Join Date
    Jan 2002
    Posts
    682

    Do you fusebox??

    i'd like to introduce you to a little friend of mine...it's called fusebox..and if you develop complex sites you should have a look..

    what it is:

    not a language but a methodology...it was intially dev'd for coldfusion (cfm) but it's applicable to almost any web dev language...asp, php, jsp...as long as it can do dynamic includes...

    i'm no experts at it (yet)...but i have dev'd several sites using it and i can tell you that once you "get" how it works it makes prog'ing for the web soooooo much easier

    the basics

    every file "goes thru" a single file index.cfm (or php or whatever)


    you have a file called fbx_circuits which sets the layout of the site

    <cfset fusebox.Circuits.home="home">
    <cfset fusebox.Circuits.admin="home/admin">

    then you have a file called fbx_switch which acts as the ..well..switch...

    <cfswitch>
    <cfcase value = "main">
    <cfinclude template="dsp/dsp_navigation.cfm">
    <cfinclude template="dsp/dsp_maincontent.cfm">
    </cfcase>

    <cfcase value = "login">
    <cfinclude template="act/act_login_processor.cfm">
    </cfcase>

    </cfswitch>

    then you reference your url like

    http://www.mysite.com/index.cfm?fuseaction=home.main

    which gives you whatever includes you've added to the "main" switch, in this case
    dsp_navigation.cfm and dsp_maincontent.cfm

    if you have a call to the admin circuit

    http://www.mysite.com/index.cfm?fuseaction=admin.login

    then the circuit knows the dir path home/admin so it know to look there and then it process files in the login part of the switch.

    so why is this good...

    for one thing...you can work on very complex pages in small chunks...each include is a section

    for instance, if you dev a new search feature which you want everywhere...instead of regen'ing code on all you pages, you just add the include to you switch box...and boom it's on every page referenced by the switch. entire site design change can be made with the upload of one file...

    another part of the methodology is the use of prefixes for files types..

    dsp_file - a display file, what users will see
    act_file - an action file, does something, sql inserts, form processing etc..users don't see usually
    qry_file - query files to pull info from the backend

    this makes editing and dev so much easier..and allows for reuse of code

    i had an static ecomm site with over 1500 individual html pages, i can do it all using fusebox with less than a couple hundred...and it's much easier to dev...

    look into it...it's free...it's easy...once you get the concept...and it's coooool

    check out fusebox.org for the source framework (cfm and php only yet...more to come i expect)..and your on your way..

    http://www.fusebox.org/index.cfm?fuseaction=learn.menu

    http://bombusbee.com/index.php?fusea...cles.view&id=4
    http://sourceforge.net/projects/php-fusebox/
    I used to be With IT. But then they changed what IT was. Now what I'm with isn't IT, and what's IT seems scary and weird." - Abe Simpson

  2. #2
    Senior Member
    Join Date
    Dec 2001
    Posts
    884
    This is sort of neat...thanks for the links and info.

  3. #3
    Senior Member
    Join Date
    Sep 2001
    Posts
    201
    Sounds good. Any info on languages it being developed for? I am starting to learn a new language called escapade (.esp) which is meant to make scripting easier (remains to be seen) for database driven sites.

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Posts
    682
    i had a quick peek at the escapade tut on its site and it looks like it might be a candidate for fusebox...it can do includes...which is key...however, i don't know whether anyones dev'ing the framework...

    btw the framework for cfm and php already exist...it is basically a set of about six core files which make up the fusebox api...

    bit of history..
    the original cfm fusebox specification was dev'd mostly by Steve Nelson (he's the guy who wrote the book...literally...) the original spec was just a loose method guide...dev'ers who started to use this saw that it could be something that was worth dev'ing to a more refined level. the fusebox 3 spec is a methodology, but key to the methodology is the core api files...which are just a set of about 6 cfm or php pages written to handle common actions...they in fact handle the fuseaction...the framework api for cfm and php is open source available at fusebox.org...

    you can have a look at the source for the framework and see if it looks like its portable to whatever language you are interested in...btw this framework exists in less than 500 lines cfm or php code..so its not necessarily an impossible task...depends on your lang of choice...

    check out

    www.secretagents.com
    steve nelsons page..you can get his book there...

    www.halhelms.com
    hal has been a force in codifying the fusebox 3 standard...lots of good writings there..

    www.bombusbee.com
    david huyck's page - the main force behind porting fusebox to php..there's also a good tut on what he faced in the port..
    I used to be With IT. But then they changed what IT was. Now what I'm with isn't IT, and what's IT seems scary and weird." - Abe Simpson

  5. #5
    Senior Member
    Join Date
    Sep 2001
    Posts
    201
    cool! Zigar are you on the fusebox dev team?? you seem to be plugging it alot!

  6. #6
    Senior Member
    Join Date
    Jan 2002
    Posts
    682
    cool! Zigar are you on the fusebox dev team?? you seem to be plugging it alot!

    hehe...nope...just tryin to get the word out...fusebox has cut down on dev time for me by...well...i don't know...but i just finished a new user control panel app for one of my sites in just over a day...just plug in some code from another project...add a bit here and there...and go drink beer...it is so nice to know that everytime i write a new procedure, i can reuse it sometime in the future with only a bit of mod...rather than a complete rewrite...

    if i had more time i could even visualize a way to dev a core system which you can pick an choose modules and parts of modules to plug into a site...

    next on my list is a complete shopping cart system...one module at a time...
    I used to be With IT. But then they changed what IT was. Now what I'm with isn't IT, and what's IT seems scary and weird." - Abe Simpson

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •