Uncategorized

JavaScript – Background

For a new project I am working on I have been studying React and so far it is the best solution I have seen to the problems of the JS/HTML/CSS/DOM web application client development. I’ll be writing a few posts on React and Redux and I wanted to have a little background post on where I was coming from. I’ll be linking back to this post from other articles.

Background

A Little History on Me

To understand where I am coming from and thus why I might make certain observations I think it would be good for me to outline my background with building User Interfaces (UIs).

General Background

I am a self taught Java/C#/JavaScript developer who has been working in software engineering since 1999. I consider myself a good data modeler, systems engineer, enterprise architect. Roughly half my career has been on the server-side. I hold several Sun and Oracle certifications, including the one for Java Swing (Java’s UI toolkit).

Swing & WPF

From 2000 through 2011 I predominantly worked on UIs using either Java’s AWT/Swing or Microsoft’s WinForms/WPF. I have architected, engineered and managed the construction of large medical and scientific UIs handling complex data that have been used by tens of thousands of Users.

JavaScript

My web projects have of course had many more users, probably in the millions, because of the nature of the web. However, the JS user interfaces I have built have typically been much less complex than the desktop ones. To date the only two libraries worth noting are JQuery and Angular 1.0. In 2014 I built a working Single Page Application (SPA) using Angular and more recently I have supervised projects in Ember, Aurelia and React.

What I Was Looking For in my JavaScript Framework

I come from a background where my UI tool kit and language had far greater intentionality in its design and architecture. That is to say that they were built by people trying to make a great UI tool kit to stand the test of time. WPF or Windows Presentation Framework was probably the most powerful framework I have used although Java Swing is probably my favorite. Later you will see how React seems to be the JavaScript successor to the Swing/WPF way of thinking.

A Little History on JavaScript

The progress and development of developer support and APIs for JS/HTML/CSS UIs has been very different from the above desktop frameworks with both plusses and minuses associated with those differences differences. Specifically it has evolved through the work of it’s users, the many JavaScript developers out there. This has lead to various approaches being tried and later abandoned. JQuery has been by far the most successful, but there are countless examples of small libraries that are used by many. It should be noted that JQuery was originally a library to greatly simplify and make more predictable JavaScript development. It directly addressed the general problem with JavaScript development which was the volatility and incomprehensibility of JavaScript code bases that had to work with the Document Object Model (DOM) of modern browsers.

Community Driven – By & For ‘Hackers’

The community around JavaScript is impressively large. The fact that it is a ‘grassroots’ community vis a vis a centrally directed one (a la Sun – Java or Microsoft – C#) is impressive.

The JavaScript ecosystem’s approach has become one of ‘hacking.’ Hacking together an application from separate parts. The notion that you can/should quickly put together an application by pulling in a bunch of libraries (via NPM) to assemble a whole. Learn by doing not by structure. I admit this has been a long standing stumbling block for my self-education. I have always been more of an architect than a hacker, in fact I rarely use that term to describe my work.

Many Cooks, Many Recipes, No Manual

Because there was no central authority, no one has taken up the mantle of making it easy for newcomers to get on board except through code-based tutorials. Structural documentation like Java’s learning Trail (e.g. http://docs.oracle.com/javase/tutorial/java) did not exist in any meaningful way until recently (see below book). The fact that many of the libraries you use are from independent third parties also hurts the language from a documentary cohesion perspective. Additionally, for a long time no one took the language seriously enough to devote the effort to building quality IDEs (e.g. Webstorm/VS Code) or package managers (npm). It is also true that there is no “right” way to code in JavaScript, only ways that more “effective” than others. This stands in contrast to the generally accepted principles of OO theory for Java or C#.

Organic Evolution

The JS/HTML/CSS ecosystem as you probably know is one that has organically evolved over the last 20 years. JavaScript, the programming language of that environment, started out as a hastily put together language for Netscape to release with their original browser. Over the years it has become ever more important along with the rising importance of the internet itself.

Conclusion

The fact is, whether or not I like the design, libraries, documentation or ecosystem, that JavaScript has become THE language to program UIs in. That is why I am currently working on becoming as much of an expert in JavaScript as I can.

Further Reading

I encourage anyone interested in digging deeper into JavaScript to read this book: Speaking JavaScript. While there are several great books on Java, this is the ONLY JavaScript book I can recommend without reservation for people interested in digging deeper into the language and understanding it’s history. It was the first time I really understood why things were the way they were and for me that was the key perspective I needed to open up and truly engage with the language.

Categories: Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *