A word on JavaScript frameworks...

Lately I’m reading an increasingly vocal number of developers speak out against frameworks, particularly JavaScript frameworks.

I think that these people think framework authors are sat at home knocking out JavaScript frameworks left, right, and centre because they’re bored, have nothing better to do, or think they’re making the next big thing.

I think they’re wrong. Frameworks exist, and are used for a reason.

They mention that frameworks aren’t needed any more, that as browsers are now all (supposedly) standardised there’s no need for them to maintain consistency. Firstly, I’d like to know when the Hell that happened -- especially with regard to every-bodies favourite, standard-compliant browser by Microsoft.

Secondly, suppose browsers were consistent for a moment. That’s only part of the problem.

Most of us aren’t solo developers hacking away in our little worlds. I’d wager most of us are part of larger teams ranging from small to large projects. We have coding standards to stick to, code reviews to endure, and all that other good stuff which we do so well.

Without frameworks providing a consistent structure for our code it would be a lot harder to maintain the… maintainability of a project. Should this go in a Directive? A template? Controller? Model? Do we have such short memories that we forgot the mess that spaghetti jQuery code left us with?

To some extent I agree that some frameworks haven’t really given two hoots about standards; they’re more focused on attracting the bleeding edge crowd with pretty animations and promises that writing code is easy. Angular, for example, has some standards written by John Papa which is a great start but I feel for projects with numerous developers we need the cold ruling of an iron fist saying “I’m sorry, I can’t do that for you, Dave” when we try to manipulate the DOM in a controller.

Large teams need consistency from each other -- and (strict) frameworks provide an easy way to do that. I sincerely hope we’re not going back to jQuery days.

Of course, I’m not naive enough to think code reviews should pick up developer consistency -- but processes and pipelines are for a different discussion...