Fusebox: Difference between revisions
Brian Wilson (talk | contribs) m →Intro |
Brian Wilson (talk | contribs) |
||
Line 31: | Line 31: | ||
Next I have to "define a circuit" which is fusebox talk for "set up an application." | Next I have to "define a circuit" which is fusebox talk for "set up an application." | ||
It looks like I am supposed to define my application name in index.php, the default being 'cacheddata' for some inexplicable reason. If there is no app defined then parsed/app_cacheddata.php is created the first time you hit the index.php file with a browser. Alas, it will be empty... | |||
I have to write the files that comprise the application. |
Revision as of 23:22, 3 January 2006
Intro
Fusebox is a framework that allows you to break a Web application into pieces to enable separation of the database gunk from the presentation gunk. (To use technical talk.)
You define your application(s) in XML and it parses them into the server language and runs it.
There are ColdFusion and PHP versions. Here is a tutorial on the CF version. My notes on the ColdFusion version are on the city's firewalled server.
http://tutorial389.easycfm.com/
Here is a presentation on the PHP version (which I think is for an older version of Fusebox but hey! Go with what is available.
http://www.cllrnet.ca/sdg/tutorials/PHP_Fusebox_Tutorial.ppt
I have put a PHP version up here: http://fusebox.wildsong.biz/
Notes on the PHP version
I like the PHP version because I can program in PHP already so I can read the code. So I am trying it out first. Once I have a grip on it I will scurry over to the CF version since that is my actual project. This is just a clever dodge.
Installation
I downloaded and unzipped the file (for version 4.1) and then set up a DNS entry and Apache config. Then I looked in index.php and decided it wants a subdirectory writeable by the apache user called "parsed" where it can stash its compiled code. (use of the word "compiled" is somewhat dubious here)
index.php sets up a couple variables then loads fusebox4.runtime.php4.php which does the heavy lifting. It sets up variables, recompiles your app if needed, then invokes your app.
Hello, Fusebox
Next I have to "define a circuit" which is fusebox talk for "set up an application."
It looks like I am supposed to define my application name in index.php, the default being 'cacheddata' for some inexplicable reason. If there is no app defined then parsed/app_cacheddata.php is created the first time you hit the index.php file with a browser. Alas, it will be empty...
I have to write the files that comprise the application.