Tuesday, 19 April 2016

What JavaScript framework is the least evil?




I'm not a huge fan of the JavaScript frameworks that are out there today. I think a lot of the libraries could be written better, are chosen for a project because of favoritism rather than understanding the requirements of the problem at hand, and some JavaScript developers come to depend on them too much to the point where they are jQuery or dojo programmers, not JavaScript programmers. Alas, that is one person's opinion and the fact is JavaScript frameworks are a part of life. So, here's a new take on an old question: Which JavaScript framework is the least evil? That is to say, which library most closely adheres to best practices? Considering jQuery for a moment, it employs browser sniffing and doesn't use new for constructors. It is very popular and some may judge it the best by some standard, it disregards what has come to be accepted as best practices in those cases.



Edit: Please just don't say jQuery or YUI or dojo or whatever. Please say which but also provide examples.


Answer



Lol. That surely is subjective, but anyways...



Personally I think YUI is the least evil as it has Douglas Crockford himself advocating it. ('nuf said)



Although, I don't really think that other frameworks are necessarily evil...




jQuery seems to go for easiness of use (just include jquery.js, copy-paste some samples, hack a little bit and you're done).



Dojo goes for completeness (for what I can see) implementing many utilities (much like apache commons for java), and a broad list of widgets, grids and charts.



Then there's Prototype which I'm not really fond of it since it modifies the native objects.



There's also Ext JS that has lots of widgets and visual components to build full fledge applications, but I'd stay away...


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...