Saturday 6 October 2012

Enough with the Surveys, Cameron! This time: frameworks

Yeah, sorry, I'm going to ask you to do yet another survey (update: I've stopped collecting results for this, and have done the analysis on it in this article).  I'll stop for a while after that.  Unless I think of something else about your practices I want to find out about, I mean ;-)

Unlike the other ones where I want to simply get a sense of the zeitgeist (and perhaps get it onto Adobe's radar), this one is to help me out with my dev work.

I'm knocking together a small website that will allow people to search for ColdFusion ( ~ Builder) bugs, and "watch" them, so that if there are any updates they'll get an email to let them know there's something afoot.  Just to keep them in the loop. I'm undertaking this because Adobe don't see fit to do it themselves.

This is just another part of my ongoing efforts to make the Adobe bug tracker less opaque and more communicative to us bods out in the wild. It's in conjunction with two other small projects I've done:
  1. An "improved" search interface. It's improved in that it has one search box, and that checks all the searchable text fields for a bug in one fell swoop, and also searches all versions of ColdFusion and ColdFusion Builder in one fell swoop too.  I find that the very fussy search UI on the bug tracker site to be impenetrable.  You can read about it / use it here.
  2. The "new bugs" RSS feeds I knocked together earlier this week. They'll keep you up to date with new bugs that get reported on both CF & CFB. There's links to those in the sidebar on the right.
So, anyway, in a rare undisciplined moment, I started this site with zero planning ("it'll just be a coupla CFM templates and a coupla CFCs" he said), and I actively decided not to bother using a framework.  This goes against my regular advice that "no matter how small the project, always use a framework".  This is because projects are seldom quite so small as to not benefit from a bit of organisation and structure, and hopefully a project - if it's going to be any sort of success - will actually grow with time, and the structure and organisation that a framework encourages will be a godsend as a project grows.

Common nae-sayers make a coupla regular excuses as to why not to use a framework:
  • there's all that overhead up front of configuring them;
  • if one is new to frameworks (or the specific framework one decides to use), then there's that up-front learning curve, which slows one down.
OK, both of these are a bit specious.

Firstly the up-front config is seldom more than:
  • find where to download the framework from;
  • download it;
  • bung it somewhere sensible in the filesystem;
  • create a mapping to that (if it won't simply work out of the box where you've put it);
  • wire it into your application somehow (config files, extending a CFC, etc)
Sorry, but that describes about 30min of yer time (if you mess it up once or twice, I mean).  If that's a large time investment on the scale of your project, I question whether the project is worth doing. And surely 30min to set your project up to be manageable and extensible seems like a good usage of time to me.

Secondly the learning curve: well there's a point there, and sometimes the docs for a framework seem daunting.  But then again so do the docs for ColdFusion / CFML if one looks at all of them at once. And we all know how easy CF is to get going with.  The thing is that's a daft way of thinking because one never needs to know everything about something before using it (I've been using CF proficiently for over ten years, and I haven't used an awful lot of its functionality yet, but I still get by).  I think reading the overview docs are sufficient to get a feel for what one might expect to be able to do with a framework, then there's usually a basic guide which'll take one through doing a baseline "Hello World" type thing.  And then to progress from there it's really not much of a stretch to breeze through more of the docs, and focus more on the specifics of the bits and pieces one needs to use to get beyond "Hello World".  None of this stuff is rocket science.  Also one only needs to learn this stuff once, so it's not like the general day-to-day overhead one needs to pop stuff into a frameworked system remain a mystery after they're first learned.

A not-trivial bonus one gets having learned a framework is that in subsequent jobs (or interviews for jobs) one can say "yeah, I know that stuff", so it's worthwhile making sure to know these things anyhow.

Having said all that, I have spent so little time working on actual websites up until my current job, my own exposure to frameworks is a bit too narrow for my liking.  My current job doesn't help so much there because the system has been around for quite a while, from back when Fusebox was in vogue, and on Fusebox it still runs.  And before there's too much sniggering, it also runs fine on Fusebox, and it's one of the larger ColdFusion websites out there.  I've only ever been instrumental in bulding a new website from scratch once (the mobile site for my current employers), and that's also in Fusebox: we opted to stick with what we knew... I'm not entirely sure that was a good decision on reflection, but so be it.  I agreed with the decision at the time.  Prior to that all the work I was doing was developing API stuff for another framework / CMS, and using said CMS framework for building client sites.  But that was all in a very bespoke way, and not a transportable or reusable skill in and of itself.

So here I am... after doing ColdFusion for 12 years, I find myself starting a small website, and my framework knowledge is either not relevant, or out of date.

Hence the idea for the survey: to see what you peeps have been using, and what you think about what's out there.

Personally I have used Fusebox extensively and am pretty proficient with it. But it's dead technology so I'm not interested in persevering with it.

I have "experimental knowledge" (ie: I've messed around with it, understand how it works, but have nothing in production using it) with Model Glue, and I really liked it, but it too seems to have fallen by the wayside.

I looked at Mach-II and really didn't like its approach to things.  This is just my opinion, and I mean it as no slight on the project.  I thought it seemed proficient at what it did, but I was comparing it to Model Glue at the time, and with the things I was comparing I thought M-G seemed elegant, and M-II to seem a bit... err... "less elegant".  I guess M-G seemed to follow the way I would have gone about things, whereas M-II seemed like how I might have gone about things had it not occurred to me to do it the way M-G did it.  M-G fitted better with the way I would work, basically.  Apparently Mach-II still exists, so I would not say it's off the table for me.

Obviously I am showing myself up here in that I've not looked at this stuff for an age, because nothing else was around at that point.  Or if they were, they had yet to get onto my radar.

When Sean came out with FW/1 (I think it was in "alpha" when I first looked briefly at it), I have to say I was sceptical about the way it was so pared back.  It almost seemed like "here's an approach", rather than "here's a framework".  I've read more about it over the years, but have never got beyond downloading it I think.  I looked at the code out of curiousity, but never actually installed or Hello-world-ed it (what an awful verb to invent).  It seems to be pretty popular - based on I hear about it fairly frequently - so it's something I'm thinking about.  In a twist, I think I now like the idea of the framework being very pared back.

I am aware that there is something called ColdBox and that people use it.  I had a look at its event-handling stuff the other day and was not - I'm afraid - convinced.  It reminded me of Mach-II in that "hmmm... not sure I would have done that like that...", but I have only read a small section of the docs on one small bit of the whole thing, so I really do not judge it at all on the basis of that initial thought.  I do use MockBox, and I rather like its approach, and it seems very polished.  So that's promising.

There's also ColdFusion on Wheels, which - again - I have heard of but know next to nothing about.

I guess there is also the FarCry Core framework. Last time I looked at FarCry it was more in the context of a CMS, and noted it also had a framework in there that looked like it did a bit more than just CMSy type stuff. Like with FW/1, I looked at some of the code, but didn't look further (not for any reason... I was specifically wanting to look at how they handled something).

As an aside, I have since learned, btw, that looking at the code within a project (especially open source ones) is like watching how sausages are made. To paraphrase the old adage: "not for the faint-hearted, and will probably put you off sausages".  I don't do it any more.

As another aside - in case it's relevant here - I have used ColdSpring extensively, if that's significant.  I know Model Glue moved in a direction that required CS to be installed, so that sort of requirement is not a problem if it's a consideration with any of these.  That said, the CFC requirements for this app are such that there's only gonna be about half a dozen of them (maybe), some will be ORM-based transients, and I really don't mind the others having depdendencies, so I don't think I need anything that CS or its ilk offers anyhow.

Right, so I need to pick a framework to use.  Which one?  Here's the survey [update: link removed] - it'd be great if you could help me out.

On the topic of surveys, both the CF10 usage one and the IDE usage one now have 50+ responses, so I'll be summarising the results for those shortly - ie: in the next few days - too. In case yer interested.

Thanks again for your help!