Using FW/1 in ColdFusion

It has been awhile since I last looked at this framework, and when I did last look at it the one thing that stopped me from using it then was the fact RESTful or Ajax calls were not handled to well.

Since then and I am going by what others are saying that this is now catered for, so how do I view this framework.

Well before I say anything I am a ColdBox fanatic, and as a framework this is the bees knees for any large project that you might be looking at developing.

But what if you don't need those bells and whistles that ColdBox offers?

Well then you should take a look at this framework.

The only thing that I do not like by the author Sean Corfield, and that is that claims to be "leverages Application.cfc and some simple conventions to provide a 'full' MVC framework in a single file".

Is this a bad thing? Not at all, but if it grows beyond what a single file can offer. It makes it huge claims to remain that way.

All in all, check it out. If you need a simple conventions based MVC framework, this is the one for you. But the other thing is that it is so simple anyone can get up and running in no time at all, and will be the stepping stone to the bigger boys.



  • Todd Rafferty's Gravatar The authors of Framework one intend to keep it lightweight, hence the unique constraint on the single file. I don't think FW/1 is attempting to compete with the richness of ColdBox, etc. It's trying to fill a gap of having something available to people learning frameworks and people desiring something lighter. If you have a mini-site, ColdBox might be overkill, but FW/1 should excel.
    # Posted By Todd Rafferty | 12/17/09 3:54 AM
  • Andrew Scott's Gravatar Todd, not sure if that is a good thing or a bad thing. However, for those who don't have the time to learn the bigger more complex MVC frameworks. FW/1 is certainly going to gain ground as the entry point.

    I personally wouldn't care if grew past the entry point, as long as it wasn't still the one file as claimed. I looked at the current version and that is one masive file as it is!
    # Posted By Andrew Scott | 12/17/09 4:05 AM
  • Dutch Rapley's Gravatar FW/1 started out under 400 lines of code. It's currently at just over 1k lines.

    It looks for your controllers, services, layouts and views all by convention. You can even use a bean factory,if you wish. Any beans in your bean factory will be auto wired into your services and controllers if you have the typical set/getBean() methods declared. As an option, you can use a bean factory to manage your services and/or controllers. I manage my services with a bean factory, but let FW/1 search for my controllers in the controllers directory. There's only a handful of mehtods you need ot be familiar with.

    Most recenlty, support for subsystems has been added. Subsystems have a couple purposes: 1) drop FW/1 apps into each other, 2) group common functionality together. Subsytems are created by using the same FW/1 conventions inside a subdirectory.

    To access subsystems in the url, you pass it as action=admin:user.list

    There's even support for subsystem specific bean factories. Documenation on subsystems and subsystem bean factories will be forthcoming shortly.

    While the framework file is over 1k lines, there's only a handful of methods you need to be familiar with.
    # Posted By Dutch Rapley | 12/17/09 6:39 AM
  • Spills's Gravatar "..will be the stepping stone to the bigger boys" this statement implies that FW/1 is somehow a "lesser" framework which IMHO holds it's own in terms of ease of extensibility and speed. The implied correlation that because the framework is easy to learn it can't be used in large-scale projects has no basis in fact. AFAIK no other current framework has FW/1's subsystem feature that allows a team to encapsulate site functionality like user management tools as a complete stand-alone application that can be <b>easily</b> added to a larger parent FW/1 app. This is a really powerful feature that makes testing and maintenance much easier on large sites where you have multiple development teams.
    # Posted By Spills | 12/17/09 7:39 AM
  • Sean Corfield's Gravatar Thanx for the mention Andrew!

    The FW/1 team consider the framework pretty much complete so any changes will be very small at this point. It broke the 1,000 line threshold recently which I wasn't too happy about but it's not likely to get much bigger now and the ability to just drop framework.cfc into a directory, extend it with Application.cfc and be off to the races without worrying about additional files and mappings is part of the draw for a lot of people.

    It may spawn a second file if I add the ability to use it with Application.cfm (which has been discussed several times but not yet fully sketched out).
    # Posted By Sean Corfield | 12/17/09 9:31 AM
  • Andrew Scott's Gravatar Your welcome Sean - I think the attraction is that there is no configuration, nothing serious to get your head around and best of all its plug and play.
    # Posted By Andrew Scott | 12/17/09 12:09 PM
  • Andrew Scott's Gravatar @Spills - No I am not implying that FW/1 is lesser than the others, it just doesn't have the bells and whistles like the others and that is the attraction too it.

    If one wants to get into and use an MVC framework, and just have a plug n play option without the huge learning curve. Then one can't look past FW/1.
    # Posted By Andrew Scott | 12/17/09 1:17 PM