My opinion on JavaScript
Javascript had humble beginnings – initial version was written in only ten days and for a whole lot of time it was treated as a second level citizen in the programming world, capable of writing simple stuff like a guest book and that’s all. For years when you wanted to create a rich web application, you used Flash or less often Java and Silverlight applets. I remember ten years ago many people hated JavaScript and didn’t want to have contact with it whatsoever.
Fast forward to 2017 and JavaScript is everywhere. On mobile phones (Cordova, React Native), on backend(Node.js) and even on desktop(Electron). Its development is blazingly fast – new libraries and frameworks are created constantly, to the point it is called be some as unstable.
Increase in popularity
What happened within those 10 years that JavaScript became so important? Definitely, mobile phones had a huge impact on the situation. Steve Job’s decision to don’t support Flash on iPhones and instead embrace HTML5 was very important. Although, Flash didn’t help itself with a very poor security and high demand for battery power. With significant Apple market share, you didn’t have a choice, you needed to create HTML5/JavaScript applications.
In that time need for rich web application grew exponentially. The user wanted better, more interactive web apps. Apps, not static pages like before. More and more people focused mainly on the frontend, on the client side and with more people involved more tools were developed. People started experimenting and become excited about the possibilities. This is, in my opinion, still a huge advantage of the JavaScript ecosystem – you don’t have as big restrictions as with Java or .Net, so you can propose something new and different. And sometimes completely new approach may be really good as in the example of Node.js or React proves.
Transpilers
The web is extremely important. Most of us, programmers, develop for it, so we need to write in JavaScript one way of another. This I believe created a huge demand for language transpilers – tools to convert code from one language to another. You can’t develop in your language of choice and you have to deal with JavaScript? Well now you can – C#, F#, Java, Python. Many people moved another path, still wanting to replace JavaScript with something better, but not necessary a backend language, that’s how Dart, CoffeeScript and TypeScript were created. At this moment we pretty surely pinpoint a winner – TypeScript – which is becoming more and more popular and an industry standard.
Foundation
This pattern to replace JavaScript with something more keeps repeating. Apart from transpilers we have React and their JSX files or LESS and SASS for CSS. JavaScript, HTML and CSS trio has many pitfalls. After so many years of advancement in this field, we are familiar with them. We cannot though, abandon it and create something better from the scratch. Instead, we treat JavaScriptt as new assembler – a foundation to build upon. After next ten years, my prediction is we create new tools that will allow creating new web applications (but probably not only them) easier and faster, but JavaScript will always be somewhere there, underneath.
2017
What about now? What to use when creating a new web application? In my opinion, React + Redux is the best bet at the moment with TypeScript as JavaScript replacement and SASS as CSS replacement. Also, WebPack to handle dependencies between them. Take this rich world as an advantage though. With so many frameworks you can surely find something that will be catered to your needs. In the next post, I’ll present you Vue.js which I believe is also an interesting choice. Very important in my opinion is also a team composition. With this rapid development ideal for your team is to have a designated frontend guy. Someone who tracks the situation, evaluate your options when it comes to libraries and framework choice and pinpoints your team in the right direction.
Thanks for reading, please feel free to share your opinion in comment section and I hope to see you next time 🙂
One thought on “My opinion on JavaScript”