It seems that every other flex-related post I read these days is about this or that framework and how well it does Inversion Of Control and separates the processes and everything whatever else. To be fair, the only one I’ve tried is Cairngorm, but the impression I get is the following: There’s nothing in there that I can’t do myself without a framework, and with much less headaches about how to fit what I want to do in the framework’s way of thinking.
Flex is already enough of a framwork without lumping another one on top. The one reason that I see would be so that another developer that is also familiar with the same framework can grok the code more easily. But now I see Cairngorm, Swiz, Mate, PureMVC and I know I’m forgetting some, so it seems unrealistic for a developer to know all of them. Furthermore, some of the posts are saying “ok you can do this and this hack” to get out of a mess you wouldn’t be in if you hadn’t used a framework in the first place!
So the trend now seems to be that to make a project one of the key choices you have to make is which framework to use. This unfortunately passes on a more interesting question, at least from my point of view: Is it worth it using a framework for this project? My answer is usually “no”, but you’ve guessed that. Anyone?
by Darren
13 Feb 2009 at 02:10
How big are your projects? A few thousand lines, ten thousand lines, a hundred thousand lines? I’m probably in the middle and there is no way I would ever consider developing a project without Cairngorm but I admit that in some cases a custom one would do just as well. There’s two advantages that I see:
1. Code organisation. Cairngorm uses many common J2EE patterns. If you’re a new developer on a project, you don’t need to know Cairngorm to know where you might find a bug. Commands are in the command folder, events are in the event folder, etc. I also add a folder for responders to separate them out.
2. I use Cairngorm for its simple event management system. You want something to happen, say initiate a database call, from *any* component in your app. You fire off the appropriate Cairngorm event, the FrontController grabs it and passes it to the appropriate command. Too easy and (reasonably) loosely-coupled. Plus, if you add the Universal Mind extensions to Cairngorm, you get a solid view notification system and command sequencing to boot.
Sure I could write a custom framework that does all of the above but personally I’d end up with something like Cairngorm anyway (with the addition of DI) so why bother? If you don’t use all of the above in every project like I do, then maybe a framework isn’t appropriate or necessary for you.
by admin
13 Feb 2009 at 11:01
Hi Darren,
thanks for answering.
I’m working on a big project at the moment, I wouldn’t know how many lines of code, but we’re talking 3 developers full time for six months. We have an ‘application manager’ for all our centralised needs, that does a bit of what you mention with cairngorm. I wouldn’t say we’ve reinvented the wheel, because one thing we don’t do is impose MVC everywhere for everyone as the ultimate design pattern that kills like it seems all of the above mentioned trendy frameworks. An article I like on the question : http://www.nooranch.com/synaesmedia/wiki/wiki.cgi?ModelViewController
So I guess we get a more supple approach, but less standardised. I pity the developer that would have to dive in at the deep end of our code, though, so standardisation would be nice.
by Sekhar Ravinutala
13 Feb 2009 at 20:41
I think a lot of folks are turning to Cairngorm because it’s the hot thing and they’ll likely need it to land the next job/gig. Plus, it doesn’t hurt that Adobe is aggressively pushing it. I.e., it’s more of a business attraction than a technical one. BTW, it’s not like you have to learn a lot of frameworks – it’s down to mainly Cairngorm and PureMVC for all practical purposes AFAIK.
by admin
13 Feb 2009 at 23:04
Hi Sekhar,
I see what you mean. From a developer’s point of view it’s a bit of an annoying trend, but from a job hunter’s point of view it’s another keyword the HR folks can add to their list. The trend does have an advantage, though: for those who like frameworks there’s a lot of competition so the quality should go up.
Pingback
by Rounding up Last Week One Day Later
17 Feb 2009 at 17:06
[…] Application development with Adobe Flex”, and now loves it. Ariel, on the other hand, feels overloaded by all these […]