4 ms·
You might like the "Why I Hate Frameworks" discussion (rant) from a while back: http://discuss.joelonsoftware.com/?joel.3.219431.12 http://discuss.joelonsoftwa
by arethuza 13y ago
You might like the "Why I Hate Frameworks" discussion (rant) from a while back:
http://discuss.joelonsoftware.com/?joel.3.219431.12 http://discuss.joelonsoftware.com/?joel.3.219431.12
Although it's ranting about Java frameworks rather than JavaScript a lot of the complaints look rather familiar. Having said that, I don't think anything in the JS world has reached the baroque complexity once regarded as normal in the enterprise Java world.
[NB Note my comments on that discussion - I had not long finished rescuing a monster of a Java enterprise application where the simplest thing needed to go through about 30 layers of abstraction (I did actually count them) from a page being submitted to the underlying message being sent over MQ - it seemed to be a point of honor to combine every feature of J2EE with every design pattern to do the simplest things. Having multiple huge jar files in the classpath each 97% identical to the other just added to the sense of adventure when you clicked on something.]
- dwd 13y agoThere's also Steve Yegge's epic rant http://steve-yegge.blogspot.com.au/2006/03/execution-in-kingdom-of-nouns.html http://steve-yegge.blogspot.com.au/2006/03/execution-in-king...
- arethuza 13y agoA quick Google for "FactoryFactory" led me to this wonderful page: http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/server/RequestProcessorFactoryFactory http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/server... I know it's a bit unfair to pick on that particular document - but I'm worried as a long recovered abstraction addict to what degree I actually thought things like that were ever a good idea.
- vidarh 13y agoJava code is one of those few things that managed to successfully parody itself.
- mattmanser 13y agoYou mentioning Java actually reminds me, what I find bizarre about the recent trend in javascript is that they're creating the boiler plate on purpose. In Java the boilerplate was a creation of the language, but in javascript it's a creation of the community! It's like some sort of sick joke. The stuff I hate most is the boilerplate that means you find crappy little singletons everywhere when all that was needed was a function. And for the love of god, a function that's named and not pointlessly assigned by a var because you're mono-linguistic and haven't realised yet what the actual point of functions are yet. Huge chunks of the javascript in the web site I've taken over were done by someone who loved these patterns, this is an example of his favourite one, pointless and led to colossal code bloat as he used it over and over for basic handlers. function instantSearch() { var instantSearchObject = { config: { animSpeed: 250 }, init: function () { this.findComponents(); this.bindEvents(); }, findComponents: function () { this.searchBlockCollection = $('.search, .entry-search'); this.searchInputCollection = this.searchBlockCollection.find('input:text'); }, bindEvents: function () { var self = this; this.searchInputCollection.on({ 'focus': function () { var currentInput = $(this), currentSearchSuggestionsBlock = currentInput.parent().siblings('.search-suggestions'); currentSearchSuggestionsBlock.slideDown(self.config.animSpeed); }, 'blur': function () { var currentInput = $(this), currentSearchSuggestionsBlock = currentInput.parent().siblings('.search-suggestions'); currentSearchSuggestionsBlock.slideUp(self.config.animSpeed); } }); } }.init(); } Nigh on 30 lines of code, so few lines that actually do something. I tend to refactor them when I can so I can see what they're actually doing, the following code should do exactly the same thing (without me testing it): function bindSearchBox() { $(".search input, .entry-search input") .on("focus", function () { $(this).siblings('.search-suggestions').slideUp(250); }) .on("blur", function () { $(this).siblings('.search-suggestions').slideDown(250); }); } Hmmm, even just refactoring that tiny bit of code shows that there might even be a bug there, or at least pointless code, I'm not sure why he's sliding the search results up on focus, they don't stay open.