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.