It seems more and more over the last year everyone is saying how great frameworks are. There are many types of frameworks and I’m specifically talking about development frameworks as they represent the majority. I’ve listened patiently. I’ve researched various development frameworks (Cairngorm in particular). I’ve questioned their use and I’ve discovered some legitimate use in various circumstances. On the whole they are most popular with managers as they top the buzzword list at the moment right next to ‘Web 2.0′ (despite the fact that coding frameworks are implicitly at the core of any decent pattern based OO Flash development whether you choose to acknowledge them or not). They seem to start as a technical recomendation to solve disperate coding problems and then project managers pick up on them as a general solution, then the managers and then the senior managers and before you know it everyone’s excited about frameworks and how great they are and how they’re going to solve all their problems from now on. And by the time they’re being implemented nobody has asked how or why. Even those who should know better. It’s the Emperor’s new clothes. And the truth is that they are not the solution to all your problems. Don’t get me wrong, I have nothing against frameworks as such, I think they have some very appropriate uses, however, I do have quite a lot against their inappropriate or unneccessary implementation.
A development framework is useful when your workforce is disperately or poorly skilled. Perhaps ‘poorly’ is the wrong word - maybe ‘intermediate and below’ is a better description. It allows you to enforce a certain level of pattern based adherance. It’s also useful when you need to get an external workforce (outsourced, OEM etc) to adhere to your basic development integration standards, so that when they say “it doesn’t work”, you will know with certainty that your framework is tried and tested and if their code adheres to your integration standards requirements then you’ll be able to help debug it more quickly, more easily and with more familiarity than if they’d written it all themselves.
Another classic use should be to help designers plug their work into the application easily and seamlessly. Invariably the best Flash designers are now quite code savvy, meaning they are in an excellent position to take responsibility for much of the ‘V’ in ‘MVC’. However, I have seen designers reduced to jibbering wrecks, questioning their choice of profession when faced with a development framework which was supposed to make their life easier. This is because the very non-bespoke nature of a development framework is not particularly intuative and much of it seems unneccessary and over-engineered (and it is - don’t get me started on over-engineered actionscript - that’s a post for another time). It bears little resemblence to the requirements of the application they are designing for. There’s a whole ‘component framework’ vs ‘development framework’ discussion to be had here of course.
And of course, this is one of the main problems with a development framework. It’s all very well to talk about an enforcing a standard implementation of the MVC pattern, for example, but ’standard’ means ‘less flexible’ and ‘more general’ and ‘larger’ and in environments that have any sort of performance limitations, like mobile phones or Set Top Boxes, that’s just a level of inflexibility and size overhead that an application simply cannot afford. To be honest I’m more of a pureist about it than that even. I don’t personally like to have to implement any formal development framework on any platform as it is never an optimal solution, it’s just an excersise in mediocre coder damage limitation and honestly, that’s just not good enough if you want to produce the best product. You end up with a lot of ‘adequate’ unoptimised applications. Training is a far better solution in the long term, and no better way to learn than to do. The mantra I keep hearing in my head is one of the best practices entries here at Adobe and one I believe in strongly: “Justify every line of code”. Learning OO pattern based design and development and applying ‘best practices’ will avoid much (if not all) of the need and justification for more ridgid development frameworks and lead to powerful, optimised, maintainable, bespoke code. And let’s not kid ourselves, from a purely consultant/contractor perspective the bottom line equasion is simple : better pattern based OO developer = more $/£.
The best solution of course, is to have skilled developers creating good pattern based OO code in a more project bespoke manner and adhering to accepted best practices. Don’t confuse bespoke for arbitrary. This kind of development is more than enough framework for any coder with an understanding of best practices, but with out the bulk of a more formal development framework. On a mobile device or set-top-box, for example, it is potentially an application killer. And even if it doesn’t kill it, business logic says you won’t compete well in the market place if your code is bulkier and slower. Your competitors applications will be leaner and meaner because they built theirs exactly to the product’s functional and environmental requirements and you built yours to a framework because it was easier than getting skilled coders.
So when everyone around you is saying how fantastic a framework is, if they’re wrong, don’t be afraid to say the emperor’s got no clothes.
8 Comments to “Development Frameworks - the Emperor’s new clothes”
Leave a Reply
You must be logged in to post a comment.
On August 29th, 2006 at 4:23 am
One more use case when frameworks can be very helpful - time constraints. Sure, your team could code all the functionality that a framework gives you, if they had twice the time allocated towards the project. But even more general, it comes down to: do you need to reinvent the wheel? If Cairngorm gives you what you need and you are familiar with it, you really have to weigh the advantage of doing it all over again.
You say the ideal solution is to have skilled designers write good OO code. I agree, but what about the next project? Do they start from scratch? Probably there is huge chunks of code - the mvc architecture - that can be reused on the next project. That’s the beginning of a framework right there.
I agree frameworks shouldn’t be blindly used as a one-size-fits all crutch (managed to get three metaphors in there!) but they make sense for a lot of projects.
On August 29th, 2006 at 4:42 am
Cairngorm does not add around 300K to an application. Quite simply, you’re wrong and are showing an incredible ignorance as to how the Flex compiler links in external classes.
I’d be surprised if Cairngorm adds even 1/10th of your figure.
On August 29th, 2006 at 5:09 am
While I agree with your post, you are missing out one crucial benefit of a framework (whether community or internal) - consistency.
Even if you have top notch developers, if they are churning out 20 projects a year and need to maintain the code base for (say) 3 years, you end up with up to 60 different “frameworks” to maintain (”hey John - what did we call the reusable UI snippets in this one - pods or chunks?”).
Frameworks are not meant to be optimized for performance, but for maintenance as in the vast majority of projects, maintainability is more important than raw performance.
Agreed with the rest of the post entirely. Framework abuse is a serious problem :->
BTW, love the match captcha below. How well does it work in defeating automated comment spam?
Best Wishes,
Peter
On August 29th, 2006 at 6:50 am
Keith and Peter,
thank you both for your comments. You both raise the point of maintenance solution which frameworks provide and of course you are both right, there is great validity to that. I’m starting to suspect that there are two trains of thought on frameworks - those who believe that future, consistent maintenance is more important and those (myself included) who think that performance should not be sacrificed and OO pattern based best practices provide sufficient framework and commonality for maintenance to be fully supported. I guess this won’t be solved here today
but at least it’s being discussed constructively.
On August 29th, 2006 at 6:52 am
oh, Peter, the match captcha spam defeating app below is perfect. I have so spam mail getting through at all - btw, that’s not a dare for any spam writers
On August 29th, 2006 at 7:11 am
Thomas I wanted to reply to your comments specifically.
Firstly, a small appology: the entry should have read ‘up to 300k’ not ‘300k’. However, tests here suggest that Cairngorm takes ‘up to’ 300k of the memory that an application takes up on a mobile phone. As you raise concerns about this I will happily go back to our tester and get this double checked. This does not detract from the post however, as it was referring to Development framworks, not Cairngorm explicitly.
Secondly, my ignorance as to how the Flex compiler links in external classes is not ‘incredible’ it is ‘complete’. You will notice, however, that I did not mention Flex anywhere in my post and I would appreciate you reading the post and taking it all in before posting an irritated reply in the future. It was using Cairngorm in a mobile development environment. Your comments on this would be welcome.
Thirdly, this is supposed to be a forum to promote knowledge. It is entirely possible that I, or anyone else, may at some point post facts which are partially or completely incorrect. If you know better then please share your knowledge, not your anger. Your reply was at best, curt and uninformative
On October 16th, 2006 at 6:48 pm
Sean,
Thank you for your thoughts.
When I have time to write complete thoughts I will post again.
For now I just want to add a few related links to other blogs that have posted on this topic:
MVC considered harmful
http://weblogs.macromedia.com/sho/archives/2005/08/mvc_considered.cfm
(Post by Sho Kuwamoto, co-lead on the Flex Builder 2 team.)
Why I Hate Frameworks
http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12
(Offers a very witty metaphor.)
Frameworks Suck!
http://www.pbell.com/index.cfm/2006/9/13/Frameworks-Suck
(Largely a ColdFusion framework debate, but one commenter includes a witty “lawn mower” metaphor.)
g
On October 18th, 2006 at 1:24 am
Thanks Greg,
I like the ‘Frameworks generally suck’ links, however, I personally believe that patterns (especially the MVC) are unavoidable when you create code using best practices, whether you’re aware you’ve done it or not