Sunday 14 October 2012

I've picked a framework. Well: you've picked it for me (UPDATED)

Right, so it's 07:45 on Saturday, I've been up since 05:00, and I'm at LHR sitting at the gate for my fortnightly trip to Ireland to see my son. And I've got an age to wait before boarding, so I'm gonna get as much of my article written as I can on which framework you've decided I should use (based on me following the groupthink).

Firstly: thanks everyone for filling-in my frameworks survey: it got over 50 responses - and fairly quickly - which is great. I've parked it now.

Here's the analysis of the breakdown.

Thanks to Seb (in then comments) for pointing out some errors in my analysis.  It seems that in the process of transferring data from various devices and apps I'd copy and pasted some stuff incorrectly.  And I concede I did not recheck them before committing them, which is a bit of a schoolboy error.  I'm glad someone is paying attention to what I'm doing (as I'm clearly not!).

So, anyway, I'm updating the results below (and will indicate clearly where they've changed).

One thing to note... the bottom line now has me using a different framework than I had indicated I was going to yesterday...

Who's used what, and how did that work out for you?

First: how do people rate the frameworks frameworks they have used. I've weighted the analysis on this one: I had the following answer options, and I've included the weighting I've given them in parentheses. This allows me to determine one value for each framework option.

Haven't used (0.0)
Low (0.5)
Medium/low (0.75)
Medium (1.0)
Medium/high (1.25)
High (1.5)

I applied that weighting to the count for each option. Then I summed the weighted scores, and divided that by the total number of people that have a score (so the ones that didn't say "haven't used"). This gives the weighted average score per person.

ColdFusion on Wheels (henceforth CFoW)1.1
FarCry Core0.7

So FW/1 is the most popular here, followed closely by all the rest (admittedly there will never be much spread with the way I've scored this), with FarCry slightly behind the field. This is about what I predicted, except I thought there might be more gap between the first three and the older frameworks.

There were a few comments here, but perhaps not as many as I might've expected given it's such a polarising toipic:

CF Wheels has the added benefit of learning a framework that is almost identical in many ways to Rails and Grails.

Have a very simple homebrew framework

They're too hard to understand, including FW/1.

Several company-internal frameworks at former companies.

I despair slightly about the comment that they're hard to understand. I found the ColdBox docs - what little I've read of them - to be impenetrable, but what I've read of the other ones (all except CFoW and FarCry, neither of which I have any exposure to at all) have been well-written and easy to follow, I thought. And MVC & websites in general are not exactly rocket science? If this stuff is too complicated, and you're a CF developer, you need to work on your skills I think. Sorry.

I'm intrigued why people would use bespoke frameworks.  I don't mean that in the sense that I think they shouldn't, but in the sense of I wonder what was the basis for making the decision to not use something already out there.  I'm sure there were good reasons..?


Next question: how good the docs. The rankings/weightings here were:

Haven't used (0.0)
1 - Poor or hard to find / understand (0.75)
2 - Average (1.0)
3 - Comprehensive and up to date (1.25)

Again, I weighted these, as indicated. And the score calculation follows the same sort of approach as before: dividing the scaled score by the number of people sorting, to get an average. And the results:


ColdBox1.2 (1.22)
CFoW1.2 (1.18)

Given how much people bang on about it, I expected ColdBox to win-out on the docs, but FW/1 topped the score again, in a close field.

So FW/1 slips to the back of the pack in the top three there.  ColdBox lives up to its hype with the docs.  And CFoW almost matches it.

The only part of the ColdBox docs I have read was the first ten million (or that's how it felt) or so pages of the WireBox docs. After which time I probably knew less about how to use it than before I started, and my will to live was sapped, to boot. I find them unnecessarily verbose, vague whilst still managing to be impenetrable, plus had an unwarranted self-congratulatory tone with a mild patronising air. In short: they were pretty bloody ordinary.  I seriously do not look forward to having to read more of them.  I swore I'd use whichever framework came out on top here, but I was secretly (until now) hoping it wasn't ColdBox, on the basis of that experience.

Here's a tip regarding my self-congratulations & patronising comments above.  Firstly: don't congratulate yourself for how awesome your framework is.  Leave that up to the person using it: it's actually their opinion - not yours - that matters after all.  Secondly: don't talk down to the people reading your docs.  They could well be better at what you both do than you are.  Or at least they might think they are.  And at the very least, no-one likes having it pointed out that they aren't better.

I contrast my experience with reading the ColdSpring docs (so with a similar goal in mind: getting a dependency injection framework up and running) which are to the point whilst not losing any thoroughness or ease of understanding, and within half an hour of reading and experimentation, I was writing production-ready "code". This was my expectation of reading the WireBox docs.  WireBox is most likely a lot more comprehensive a solution than ColdSpring, but that should not make the "Hello World" example be any further removed from the beginning of the docs.

If this is representative of ColdBox, then it seems like an exercise in making easy things hard, which is kinda contrary to how ColdFusion is supposed to work.  That said, I will give the thing a second chance, and approach it with an open mind if I choose to take another look (which I guess I will have to do now, having been a bit "prematurely judgemental" of it, I guess).

I've had a glance at the FW/1 "getting started" guide ages ago, and it seemed very straight forward, however I was just glancing it over - not trying to make it work or anything - so that's not a reasonable basis for too much comment.

I've used Model Glue a small amount, and found its docs straight forward too.

The Mach-II docs left me thinking "OK, I'll use Model-Glue instead", but just because of Mach-II's approach to things: I preferred M-G's.  This is on indictment of Mach-II at all, btw.  It does however mean I very little exposure to its documentation.

Fusebox's docs are becoming increasgingly hard to find online, as one by one older doc / tutorial sites seem to be dying off.  This ain't great.  But the docs seem thorough without straying of a screen or a paragraph per [thing being documented].  That said: there's not much to Fusebox, so not much document I guess... this perhaps should not necessarily been taken as an indictment: simplicity is a good thing (ColdBox: are you listening?).

I've never seen the docs for FarCry.

The was only the one comment about docs:

Coldbox documentation is fantastic. However, because there is so much of it and its been around for awhile, Googling a question will often bring you to older versions of the docs. Be sure to look at the current docs.

A digression here. Adobe suffers from this with the CF docs too: if one searches for a tag or a function, one will more than likely find the CF8 version of the docs, not the CF9 (or now CF10).  I can't help but think some creative anti-SEO (if that notion makes sense) could fix this... maybe even stick a banner at the top of the CF8 and CF9 pages saying "these ain't the most recent version of these docs, please go here instead) will de-promote the older pages, simply because it will reduce the semantic value of the doc.  Or perhaps have the keywords/description/what-have-you specify "cf 8 cfabort" rather than just "cfabort" or something.  I really think Adobe (and ColdBox too, given how this digression started) should do some work to make sure the current docs top-out Google searches.  But anyway... off topic.


Penultimately, you lot do some introspection.  What good are you all to me in the context of using one of these frameworks?  This follows the same approach as the previous two questions, with the weighting and the averaging-out.  And this is how you rate yourselves:

ColdBox1.2 (1.20)
FW/11.2 (1.17)
FarCry Core0.9

Note the different ordering on this one: ColdBox ranked higher than FW/1 here (1.19 1.20 vs 1.17), and CFoW bottomed out (apologies to CFoW for getting that bit rather wrong).

There were not comments against this: people were probably saving themselves for the next question, which was just comments.


The last bit of the survey was a free-for-all comments question:

Fusebox has been around for awhile. Even though it is old, the framework does its job separating view from logic which make code maintenance easier. And, I found many legacy applications still use Fusebox 3/4/5. Mach-II is way above my head by just reading the features on its Website. It uses a lot of unfamiliar yet sophisticated terms, such as Implicit Invocation, Mach-II Expression Language, Object-Graph Navigation Language, etc. Perhaps, I'm still novice. I used Model-Glue in one project. The framework development has been passed on the someone else. It's just an okay framework, I guessed. FW/1 is a lightweight framework. So far, I have not got chance to use it in a big project. Love it because of its simplicity; and it is my next choice after Fusebox. Its user group is very active. ColdBox is a complete suite framework. It has virtually everything in it from caching to logging. It also has massive documentation. I feel that the framework is heavy. It might have a lot of overhead for small projects. I am assuming that FarCry Core is used in FarCry CMS. Based on my experience with FarCry 4/5, it's a terrible CMS. It has serious performance issue. Support and documentation are limited. Never got chance to use ColdFusion on Wheels. I would choose a framework that is easy to use with minimum learning curve.

[Thanks for the very thorough comment!]

I am very much in love with both CFWheels and FW/1. Rails has an impressive hold on the startup scene and knowing it, even in the CF context is a good skill. I am not sure why it doesn't get more attention from the CF community, aside from maybe being too different from the rest.

Small app, use FW/1 Big app, use Coldbox Active record fans, use CFWheel Fusebox is dead Mach-II & Model-Glue... xml xml xml....

[I never got why people have this thing against XML..?]

None as I haven't learned how to use frameworks yet.

[I recommend that you do, just to get some familiarity.  And also you'll look at different approaches to things, and see other people's code too.  It's good in job interviews too, to be able to say "yes" to the questions about whether you've used any frameworks]

I'm obviously pretty biased towards ColdBox, but I wanted to point out that, in my opinion, it is the most full-featured framework in that it includes CacheBox, MockBox, LogBox, and WireBox and a host of built-in plugins to get you off the ground without having to look to additional libraries. ColdBox is also unique in that we have our own code-sharing community, ForgeBox, which allows you to search and share plugins, modules, interceptors. ColdBox is also the only CFML framework allowing for modular MVC. A module is basically a stand-alone MVC piece that can be dropped into a ColdBox app to extend the base app by providing an encapsulated chunk of functionality. Regarding, the Mach-II similarities-- that's quite possibly because we're both event-driven frameworks. The main difference is ColdBox has been convention over configuration from the beginning. We don't have any XML configs. Most everything is determined by convention, and what isn't is configured by writing CFML code or a DSL. We also offer nice URL routing, built-in event/view caching, and some really sweet ORM services for making CF ORM easier to work with. In fact, Grails-like dynamic finders is in our dev branch now and about to be released. Please check out ColdBox again. The "bundle" download comes with a number of sample apps. If you drop the "coldbox" folder in your web root, you can start it right up with no mappings. Full Disclosure: I am Brad Wood and I am the ColdBox Platform Evangelist :)

[Apologies if you're also the doc author for WireBox ;-) ] 

I love CFWheels because it has screencasts and simple documentation with practical examples whereas other frameworks (to my knowledge) completely lack good screencasts and simple documentation (seems like most documentation was written for engineers)

ColdBox, FW1 and CFWheels are all similar, but I think ColdBox really stands out in it's broad feature set

Love FW/1! Simple and it 'just works'!

[This is what I'm after: minimal interfere from the framework, which just lets me get on with it]

Pretty much in same boat as you, not developing apps from scratch often, and not yet persuaded to invest time/effort to learn a framework to use one when I do. But given that, if I did persue one, it would probably be f/w1 first. That might be another interesting survey (for the framework folks): for those who don't use one, why, and which might you use if you would, and why.

[don't give me ideas...]

Do you want a simple framework with simplicity or you want to load of stuff and complexity... That will be the question to raise before starting. Your choice will be FW/1 or ColdBox. And more you will use FW/1 more you will achieve what is done in a lighter way for sure you will have to write some stuff but it will be your stuff.

Fusebox in its day was a very good framework and I used it heavily. Selling using a framework to corporate managers is not easy so for the last six years or so while I've been contracting I've not been able to use a framework at all. Now tat I'm getting an opportunity again I'm going with FW/1. It is the easiest to explain to other developers of the ones I've used.

Avoid farcry - it's the spawn of Satan, and its adherents are drug addled zombies.

[I particularly liked this one]

If you've never used MVC then Wheels definitely is the way to go. It's easy to learn with the convention over configuration approach, but extendable enough to grow the needs of your applications. I'm using it for a number of both small and complex applications and it's been amazing - fast, stable, and makes CF development fun again. -Brian

I cannot speak highly enough about Coldbox. The documentation is SO comprehensive that it actually scares people away... and there's not just the docs, there are dozens and dozens of "how to" presentations/recordings available. The Google group is active and incredibly helpful. I've received personal emails from the creator of the project, Luis Majano, on several occasions.

In the CF world most of the time I've found the extra time using the framework hasn't been worth it. Yet some guys I know swear by them. But I have never worked on a team with more than two other programmers. Most of the people who rave about frameworks are on very large teams. So I think for me it is optional but if you are on a large team or it's an open source project it's vital. Never taken a job where they used source control. Every last job I've been the one who sold it and set it up and that has provided far more bang for the buck than frameworks. Unlike unit tests source control has been a very easy sell to upper managment.

I used Mac-II extensively at a previous employer. It worked well for what we were doing, but it was difficult for non-pop developers to get the swing of it. I've been using ColdBox for about three years now, my company has around 60 CF developers and most everyone picked it up (at different levels of understanding) pretty quickly. Looking back at the Mach-II code, I don't know how we could have used it to do things that are somewhat easy to do in ColdBox. WireBox Vs. ColdSpring? WireBox easily. We're able to extend ColdBox to easily override functionality that the framework provides. I honestly don't know if Mach-II allows that. Let me knowif you have any questions: [email address removed] -- Adrian Moreno

[cheers Adrian]

I came into a project that had started using FB2 but had been pretty well mangled beyond recognition by special-purpose/one-time code changes that have lived on for many years. This also involved copying large sections into new projects rather than looking at refactoring into functions/components. Having worked for many years in lots of different environments, I don't feel like this situation is that unique - make the minimal change to get the immediate task done - damn the long-term costs. If the project leaders have a strong sense of responsibility and enforce standards it can be minimized. Right now my biggest problem is to figure out how to shoe-horn a mishmash of FB2/ad-hoc code into a new framework. My leading contender is FW/1 since I think I can understand how it works and I like the activity around it. ColdBox seems like overkill. I'd also like to be able to replace most of our customer management code with something like Mura. OK, bloke - I've written too much off-topic. Thanks for letting me rant, anyhoo.

[No problem re ranting.  That's why I ask your opinion!]

While ColdBox definitely is a powerful framework it's just overkill in a lot of situations. That's why I've come to prefer FW/1, because it tends to stay in the background and is stripped down to the essentials.

I would recommend ColdFusion on Wheels simply because it's very similar to Ruby on Rails. I think ColdFusion is dying (although slowly) and knowing Wheels would make for an easy transition to Rails if/when the time comes.

[This is a good point... it could be a way in for me to get some familiarity with what everyone is banging on about with RoR]

My responses regarding support reflects the fact that I've only asked for support from one framework community (MG via the Google group) and they did their best to help me out.

Clearly I can't comment comparatively across the available frameworks having used only 2 of them, but I can report that FW/1 has proved an excellent replacement for Fusebox. So much so that we have ported most of our legacy Fusebox apps to FW/1. My main tip if you go with FW/1 would be to ignore the built-in service queuing mechanisms - they never made sense to me and Sean admits he wouldn't include them were he starting again. They complicate and confuse an otherwise admirably simple "get out of your way" MVC framework.

ColdBox is an actively developed framework. The documentation is extensive. Community support is prolific. The author's commitment is awesome. It is a full stack framework as opposed to FW/1 which is a simple MVC framework where the developer has more responsibility to add services to the application.

Do try cfwheels, and join up on fromgroups#!forum/cfwheels where the core cfwheels team hangs out. They're very nice.

There's some interesting things in there, and they mostly speak for themselves.  The most compelling things I take away there is perhaps ColdBox would be overkill for my purposes here - this is a very small project - and FW/1 sounds like a better fit for me.  Also I think the comparison of FW/1 being pared-back and ColdBox being full-stack does not seem like a recommendation to me.  I just want a framework to facilitate my own code, not to forced down a road of "doing it the ColdBox way".  I'm not big on people dictating "the way" to me.  However I do want to have a look at ColdBox still though.  CFoW sounds like it's quite different from the others, and this is interesting too.  I think I'll put to bed any notions of using the other ones.

Thanks heaps to all of you for taking the time to write those comments, btw!  Good stuff! And hopefully they'll be useful to other people too.

Bottom Line

The final tally up was thus:
FarCry Core2.5

ColdBox3.6 (3.57)
FW/13.6 (3.56)
Mach-23.0 (2.98)
Model-Glue3.0 (2.97)
FarCry Core2.5

So I'm gonna use FW/1, because it was clearly ahead of ColdBox in second place.  Also nothing I read here, or in my own research set alarm bells off, which I cannot say for ColdBox.

Sigh.  Oh well.  So I'll put my money where my^h^hyour mouth is, and try to use ColdBox.  There's a good chance I'll be pleasantly surprised, because I'm currently dreading it and if the expectations of using a framework are similar to that of watching movies: setting expectations low often lead to a good experience in that one is pleasantly surprised by the outcome.

Also the newer frameworks are all out in front of the others significantly.  This indicates that they're good/popular solutions.  I think they've all been around long enough for these figures to not be hype-driven, rather that they are results-driven.

I'm now writing this on Sunday afternoon awaiting my return flight from Ireland, having spend a few hours y/day and today seeing my boy. He's a star.  But, anyway, I've got tomorrow off work, so I'll probably get all this FW/1 stuff underway then.  Let's see if you've all put me in the right direction!

Obviously I will document my experience with FW/1 ColdBox, if they're noteworthy.  Plus I'll probably have a look at CFoW and ColdBox FW/1 too.

Hey... thanks a bunch for helping me with this. If ever we end up at a conference together, hit me up for a beer (bloody hell: not all on the same evening!).

Only an hour to wait for my flight...