Today is a good day to code

Thinking In The Box

Posted: December 31st, 1969 | Author: | Filed under: Uncategorized | No Comments »

Thinking In The Box

Picture of Irv Owens Web DeveloperWell, yesterday I wrote my first real 100% fusebox program. You can check it out here. It allows a user to type notes into a text field, while broswing for instance, then come back to the site and load up their notes again. The implementation is completely devoid of any database use, and is unique to each user visiting the site. How was this accomplished, you ask? I used ColdFusion session variables to hold arrays with the titles and content of each of the memos. Since session variables are unique to each user's session, they are mostly private, and completely editable and deletable. Session variables timeout, and the length I have set for this application is 2 hours.

Client variables would have been optimal for this since the burden of data storage would have been on the user's systm, however client variables in ColdFusion only allow simple data types. This is actually good for Macromedia's PR because the last thing they need is for a bunch of developers to go hog-wild with client variables and begin storing entire applications in cookies on the user's computer.

The application was written for those times when you are going around the internet gathering information, and you start down a trail of sites. If you want the source, you can download it here.

I am sharing it with the public, but please let me know if you use it in your applications at irvin@owensperformance.com, I am curious about how others would implement this little app. Where was I, oh yes… You often find yourself deep down your trail, with no idea of where the trail originated. Or, as frequently happens to myself, I will be working on a web application and get a call from a client or friend and lose my train of thought. It will take me hours to get back to where I was again.

I am sure that right now you are thinking, why wouldn't I use notepad or its Mac equivalent TextEdit? There is no reason you shouldn't except notepad isn't on the web, it takes time to load up and save, and it wasn't written using the Fusebox methodology. What does Fusebox have to do with little notepad apps? Well, nothing really. This was an exercise to force me to write an application using Fusebox, which I have criticized for a long time. I still have a few issues with it that aren't really with it, rather they are with the way some search engines lack the ability to properly index sites that use includes heavily. But, any trouble caused by using a methodology such as this are miniscule compared to the failure rate of custom enterprise software.

I am not going to go into deep detail about how to code fusebox, other sites have done a far better job than I could. fusebox.org, secretagents.com, and halhelms.com are just a few of the sites that deal with fusebox and its related lifecycle management methodology FLiP. I do like the fusebox way of doing things because it remains very flexible with keeping everything modular and dynamic, but really any system of programming that breaks display, data, and control code up into separate little well-documented bits is very helpful. I especially like fusedocs.

Fusedocs are an XML based way of structuring documentation so that a machine can read it and convert it into good framework documents, or another developer can easily pick up the file and figure out what is going on. I find that most of the code I see is terribly underdocumented. I have done it myself, thinking that I am the only one who has to look at the code, so why should I document it? Several large applications, and long nights of Mountain Dew later I find myself creating copious documentation for all of the new code I write, as well as the revisions and bug fixes to the existing code.

I probably wouldn't recommend going through and rewriting all of your existing applications in Fusebox if they are working, but I would recommend writing all of your new features and auxilliary applications in it, since I have found the even those applications are suspect to revision feature creep.

It is hard to make a developer write software using Fusebox and its associated Fusedocs, because good developers are often that way because they are lazy. I don't say that in a derogatory way, many good developers take the simplest and clearest path to the end, which is often not the fanciest way, but it is the easiest to understand and in my opinion the best. The downside to that is that it usually excludes documentation and limits the scalability of the application. Using fusebox just makes sure that the applications you write today will be easier to rewrite tomorrow, which all developers will have to do eventually. For those just beginning with Fusebox, I hope the source helps you, I was glad that I had source available when I was just starting to figure it out, and for those who are new to ColdFusion, start working with Fusebox sooner rather than later, and save yourself those long nights with Mountain Dew and Jolt as a chaser.