Admitting that Javascript was a Mistake

Empirically Disliking Javascript

Our company is nearing completion on a fairly massive re-design for a single-page Javascript application that we will be shipping in the next several months. The idea was to have a cross-platform application that functions much like a stand-alone application would, but which would utilize the web browser for the GUI. Here are just a few of the Javascript issues that have caused us grief over the past year:

  • Javascript almost ensures that closures are used as the primary problem solving construct.
  • Javascript’s single-threaded processing model.
  • Non-operational functional debugger support (Firebug does not do true functional debugging).
  • Having to chain event callbacks as functional code blocks that are dependent on an external user interface state variable.
  • Having to serialize events and sort out how to block functional chains if one part of the chain fails.
  • Debugging in general (which would be impossible without Firebug).
  • The 2 XMLHttpRequests per site limitation, which makes streaming multiple comet-like communication channels from the same server nearly impossible.
  • The very large (10ms-30ms) network context switching overhead, which is a problem when receiving 5-10 events per second — it results in very slow responsiveness from the UI)

To get around these issues, we were forced to employ Adobe Flash, a proprietary solution. The move to Flash solved many of the network connection issues as well as general slowness of context-switching in Javascript. The rest of the issues were solved by forcing Javascript’s functional DOM-based programming model into a procedural Model-View-Controller programming model.

This created a massive headache for our designers and developers, who are phenomenal at what they do. I fear for web development shops that don’t have people that enjoy writing massively scalable processing architectures, micro-transaction monetary systems and distributed parallel file systems (all current Digital Bazaar projects). Functional programming takes a particular level of interest to get right, and that’s only if the problem is suited for the language.

So, enough Javascript bashing – disliking a language like Javascript without proposing a solution is unfair.

Here’s what we’d like to see…


We're not around right now. But you can send us an email and we'll get back to you, asap.


© 2021 Digital Bazaar, Inc. All rights reserved.

Log in with your credentials

Forgot your details?