Day one with FW/1


Aside from fun jQuery projects, I have really been meaning to pickup Framework One and really check it out.  After using XML controllers for a while not having to worry about defining all the behaviors is nice.  Best of all, it is really intuitive to work with.  After installing the FW/1 package I immediately deleted all the example applications and the introduction folder, that is just how I roll.

Then I started with a minimum framework: a default layout, a default view and a default controller.  I had everything up and running quickly.  Next I decided to write a sample application.  Nothing too fancy, enter a first and last name in a form and a submit button.  I could have went with the typical “Hello World” application, but I am kinda finicky about form processing.  The framework I use does not automatically append the form scope into the request context. Generally I default all my form values for my view in the controller and then roll the form scope in,  overwriting my defaults with any values that might be in the form scope.  If validation fails, I can always fall back to my submission page and have form values defaulted.  It did take me a little while to adjust to FW/1’s way of doing things, but it was not a large adjustment.

I also like how FW/1 allows for a startItem, endItem for controller methods.  It allows you to easily handle validation before the main method gets called.  I suppose the validation could be handled in the main method but I find it a little clearer when I break the logic into distinct pieces.

Finally I setup a simple “user” service.  In this case, it was just to return a string letting me know the user’s first and last name that was entered on the form.  The whole thing came together in less than an hour from start to finish, including time spent looking over the documentation when I did not fully understand something.

Although there are several aspects of the framework that will require me to change the way I handle certain things, I can see the framework is flexible and extremely easy to use.  I will definitely be using FW/1 in some future projects.

Advertisements

About Robert Zehnder

Web application developer specializing in ColdFusion/Railo and Open Source development.

Posted on March 8, 2010, in ColdFusion, FW/1, Railo. Bookmark the permalink. 2 Comments.

  1. FW1/ Rocks. It made programming front controller type application super easy. I was getting very tired of the XML stuff and ‘bloat’ of the other frameworks.

    Another think i really like about FW/1 is how simple it is and if one needed to make the framework act differently for a specific project it is very easy to do.

  2. I agree. I am really looking forward to playing with it a bit more. If I can get my form handling down, the rest will just fall in place.

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: