Rip's Domain

FuseboxCFC: my take.

Posted in ColdFusion, Frameworks by rip747 on February 2, 2007

Even though I didn’t attend the Frameworks conference this year (I wanted to really bad), I have watched the presentation of FuseboxCFC that Webapper has online once Ray posted the link to it in his blog. This has been something that I have been anticipating since this whole debate about using XML config files in frameworks started.

After watching all 4 videos, I thought that I would give you my take on it.

I can see why he is choosing to use CFC method calls directly with the cfinvoke tag rather then XML. If you really think about it writing event nodes with an XML document is just mimicking calling a CFC method. You write an event node for user.list and have some sort of CFC behind it to get a list of users for you and pass it back to the framework. This approach just cuts out the XML middleman and call the CFC method directly. In excess this will give you a performance boost to the application since you’re eliminating a layer. Also this method is being used in some other already existing frameworks.

Why I understand the speed benefits of this approach, I could see right away that it is very hard to follow the flow of your application without opening up multiple files and mentally piecing your application together in your head. Even though using XML does slow your application down a little, it is nice to just be able to open up a single file and seeing how the application flows and pieces together.

The other thing I noticed was the use of cfinclude tags with the CFCs to grab the views. I saw from Ray’s post that this didn’t sit well with some people because of the whole var scoping your variables thing. I will agree that this doesn’t sit well with me either, however there are ways of generating content from within CFCs that are scope safe.

Probably the most common method is using the CFSAVECONTENT tag to wrap it around the content you want returned from the CFC method as you can assign an already properly scoped variable to the result. This approach does have it draw backs as the CFC can gets pretty long and I remember a blog post (that I can’t find at the moment, could someone point it out to me) where someone said that a component could only have 4096 lines in it.

Steve has pointed out that the var scoping issue is a bug and should be fixed, I agree whole hearted, but until then maybe some other approach could be used that would make everyone happy.

His experiment does follow the whole MVC directory layout. I have seen other frameworks that don’t and although this is a trivial matter, it would turn me away from even looking at it if it didn’t.

There was some FuseBox 1.0 nostalgia with the whole putting each query into a file. Though I can see why we did this in the old CF4.0 days, I would probably use Reactor for handling all the database stuff.

All and all, a good first draft, I’m impressed. Does it have some work, sure, but that’s expected, nothing is right the first time around.

If you haven’t watch the videos, I would suggest you do. Draw your own opinions. The presentations online are really good at explaining everything.

One Response

Subscribe to comments with RSS.

  1. […] 2nd, 2007 In my last post, I gave my insight into the FuseBoxCFC framework that was presented at the frameworks […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: