The only way to know for sure is to try

Bottlenecks in JavaScript Development

Nothing is more dangerous than another developer

April 12, 2015

So you find this shiny new toy called JavaScript and you begin to write some code. If you've started some work on C and Java, you'll easily find out that JavaScript is very terse. No type keywords, very flexible syntax, a lot of ways to build things. You'll almost say "Wow! Why wasn't C built this way?!" Fast forward say, 8-10 years, you begin to see the pitfalls of JavaScript. Browser compatibility, API availability, all those quirks. However, those are newbie problems to worry about. In our line of work today, there are other things to worry besides those petty problems.

JavaScript used to be a "toy" language. A language that, once picked up, will send you flying in no time. Reminds me of that Python comic where "you just import and you'll fly." However, overtime, people have made it too complicated to start a JavaScript problem. Here are some things that I find annoying when building JavaScript apps.

Fighting over a framework

What's the best framework out there today? I heard Ember has a good learning curve. But wait, Angular is backed by Google so it should be good. Facebook built React and it follows FP and Flux, so its better. What can you say?

I hear this quite a lot on the internet and in the workplace. People ask me what's the best and easiest framework out there. Long story short, I just tell them "None. It depends on your application and methodology.". There are tradeoffs for each framework. However, one should not spend 1 month deciding and testing a bunch of frameworks. Just get one you're comfortable building with and just build.

I'd say, just pick one up and go. If you're an ORM guy or an OOP guy, then Ember or Backbone are your cards. If you're the FP guy or comes from a game dev background, React would be your weapon of choice. Fancy two-way binding and quick component design, then choose among Angular, Ractive, Knockout or Polymer.

Fighting over a package manager

People have been moving from RequireJS to Browserify because RequireJS gives you configuration headache. But there's a new kid in town called Webpack which allows you to write AMD, CJS and [insert more acronyms here].

One of the things that make JavaScript so easy to learn is you only need a browser, a text editor and the JS global namespace. Write code, run, never worry until someone else clobbers it. That's fine from a beginner's standpoint, and I feel that's why JS is so fakking easy to learn.

Now for advanced developers, these deficiencies are the things they'd want to avoid. They start to encapsulate code, split them off to logical parts, have those logical parts talk to each other, and presto! We declare that we need package managers... but JS doesn't have one. So we then look for one, and presto, we get a whole lot of choices from RequireJS to Browserify and even eccentric ones like Webpack.

RequireJS wins hands down for me because you don't need an uber-difficult setup. You don't need to download Node, or install some package, nor run some watcher that compiles shit. RequireJS, admittedly is a hack, but it's a good hack nevertheless. Gets you started quick and easy, though configuration might need a little learning.

Fighting over compatibility

I have done my share of argument working with people who...

This doesn't work in IE8 and below

This is ES5 things, this won't work in older browsers

This is HTML5 and CSS3

IE still takes a good 20% of the browser market

Let's take the last statement as benchmark. Sure, IE takes up a good 20% the last time I heard. However, how much of the 20% are actually IE8 and below? 4%? 2%? The last time I checked, IE9 was good enough to be called a "modern browser", IE10 and later were astoundingly awesome.

Around another good 40-70% is owned by Chrome and Firefox, which have been doing modern shit since I was still learning JS. I wouldn't worry as much for these guys, they always have it. Since Opera moved to Blink, and Safari is just Webkit (thus they are Chrome-like in a way), then I could just shrug and say I don't care, coz browsers are good enough.

So stop this argument, it's nonsense. You're arguing for support for 4% of the world. What are the chances that you'll meet someone in 2015 using IE6? Give me some analytics then I'll reconsider. Otherwise, I'll pass on doing an extra 2 weeks of work for supporting legacy IE.