Of the JS frameworks and libraries we’ll cover Ember has certainly peaked and is now on the downward curve of its cycle of active use and popularity. There was hope of a road back with Ember Octane released in late 2019 and attracting a niche following. That appears to be spluttering out but it’s still early to stop talking about Ember entirely.
jQuery was covered in the previous edition of this post but we’ve dropped it here. The library is still used for some legacy applications that need to support old browsers but with the need for the abstraction layer to deal with interoperability issues between browsers now basically redundant, so is jQuery. RIP old friend! Your legacy will be remembered!
Others, Svelte and Preact, are fresh sensations and are just starting to pick up a head of steam. They may or may not go on to seriously challenge the dominance of the ‘big 3’ of React, Angular and Vue.js., as they mature.
But it would be dull to only talk about React, Vue and Angular. Ember has a significant legacy and will still see market demand for some time, even if it does look as though it is also on its way out as the technology wheel turns. Preact and Svelte, on the other hand, are just starting out on their journeys. They are generating some noise but it remains to be seen if they will become genuine rivals to the well-established choices of React, Angular and Vue.js at the enterprise level. The practical reality is that without the backing of a tech giant, like Google’s active support of Angular and Facebook’s for React, organisations see new frameworks and libraries as a strategic risk, even if they appreciate their technical qualities.
Taking an informed decision on which to go with for a particular front-end development project is one of the first major tasks at the outset of any planning process. There are a number of different considerations that can and do influence the final decision on the choice of JS framework/library that will be used for any given front-end project.
Of course, technical qualities, pros and cons in the context of the combinations of required functionalities, are a big factor in any choice between Angular, Vue, Ember and the rest. But it would be simplistic to presume the choice of JS framework for every front-end project comes down to an analysis of technical qualities and characteristics.
The additional factors that can often prove decisive in the decision-making process between frameworks include:
And as already highlighted, the decision of which JS framework to run with on a new project or migration of legacy apps is often as much down to strategic business case factors as technical pros and cons.
But what we will do is look at both the trends in popularity between the main choices of React, Angular, Vue.js and Ember and what is influencing those trends. That will offer insight into the strategic considerations that might influence your decision.
And we’ll also take a broad overview of the technical strengths and weaknesses of those frameworks. The qualities that will help determine the suitability of a particular framework choice for a particular app, all things being equal across the strategic business case considerations.
AJAX led to Microsoft adding XMLHttpRequest to its Internet Explorer scripts, which meant the HTML of live web pages could be updated in real time by downloading new data from servers. There was no longer any need to fully reload a web page in order for it to pull new data to update. Other browsers quickly followed suite and asynchronous communication between website and server became the norm.
The distinction between a programming language, library and framework can be initially confusing. Non-technical management often presume React, Angular, Vue.js, Ember and jQuery are programming languages.
But what exactly are libraries and frameworks?
A library is a collection of pre-written ‘code snippets’ that perform commonly used JS functions. These snippets are used like Lego blocks to build more complex configurations of functions. For example, if you wanted your application’s search function to offer an autocomplete feature, a library snippet of code would be inserted.
Ultimately, libraries offer code snippets that speed up the process of building an entire project. But they are not a silver bullet that can be used to format a complex app from beginning to end.
A JS framework is, on the other hand, a full toolbox that can be used to create a website or application. A good analogy is to think of libraries like the fixtures, fittings and furnishings of a house. And a framework is more like the template and pieces used to build a pre-fabricated building.
A JS framework provides the skeleton that an entire web development project is built around. The framework provides page templates that leave space for the details to be inserted in the form of custom code. That differs to using a library, where the developer decides where to add code snippets.
The strength of a framework is that it offers a lot of efficiency and organisation. The code is well-structured and the framework offers out-of-the-box solutions to frequently encountered coding challenges. The downside of a framework is that it allows for less flexibility. Additional custom coding of user experience and functionalities is limited to where the framework is designed to allow it to be inserted.
A framework calls your application’s code. But if you are using a library, your application calls the snippets of code from the library.
Angular, Vue and Ember are examples of JS ‘frameworks’. Svelte, the new kid on the block, is described as a ‘component framework’. We’ll go into more detail on what that actually means when we look at Svelte in more detail.
If you want greater control and flexibility and are willing to spend some more time putting your app together in the way you want, then a library may make more sense under the circumstances.
Now we’ll take a closer look at the relative strengths and weaknesses of the individual options. But as an introduction into that, let’s take a look at the wider trends in the market.
The visual below shows the level of awareness of major frameworks and libraries among the thousands of international JS developers around the world that contributed to the SoJS 2019 report. It clearly indicates how Ember has lost popularity over the past few years, with Vue.js usurping its place at the top table. It also shows how Preact and Svelte have, like Vue a few years ago, quickly burst onto the scene and made a genuine impact on the JS landscape.
The next graphic nicely represents developer sentiment towards the six, which could be a significant clue to how widespread the use of each is several years from now.
We can see that React is not only very widely used, with almost 80% of JS developers having coded with it, but that satisfaction levels are high. Next in terms of usage comes Angular, with over 60% of JS developers having used the framework.
But despite its popularity as a choice by those paying for and managing development projects, the developers themselves show relatively high levels of angst in their attitude to Angular. Of the approx. 58% of devs that have used Angular, close to two thirds say they would prefer to not do so again.
Their grumbling has obviously put off others from gaining experience in Angular. The number of those that haven’t used it yet and who have no intention or desire to in future is over three times more than the number of those who haven’t used it but would like to learn Angular.
That contrasts with Vue.js. A lower but still relatively high number of around 45% of JS developers have used Vue, but most who have are positive on the framework and would like to continue to use it. Of those who haven’t used Vue.js yet, almost two times more developers would like to in future compared to those who wouldn’t.
Roughly the same can be said of Preact, except that of those developers who haven’t yet used the library, less are interested in doing so in future, in comparison to the level of enthusiasm for Svelte.
That’s the real acid test. Are employers looking to hire Svelte or Preact developers? Is there still demand for Ember skills on the job market? Let’s take a look.
That can probably be put down to concerns over the longevity of active support and continued OS community development for Ember, Svelte and Preact. And the fact not enough developers have the skills and experience in either to mean sustainable recruitment will be practical.
Facebook’s 2013 release of the React library, a more flexible framework, drew attention to AngularJS’s limitations and developers started to consider AngularJS outdated and move away from it.
All Angular releases up to 1.x versions are AngularJS, and all releases from 2.x on are Angular. In contrast to JS libraries like React, Angular is an end-to-end framework that offers all of the main components needed to build an Enterprise-grade web app.
The limitations that are inherent in Angular’s stricter structure, which is also its strength, has seen React overtake it in popularity in recent years. There are many developers that will argue that Vue.js, designed by ex-Googler Evan You to improve upon what he considered to be Angular’s weaknesses, is the superior framework.
A component-based web framework with one-way data flow, React has had a major impact on front-end web development, and in 2020 is the dominant framework/library used for JS applications. React can be credited with introducing concepts like functional, declarative programming, immutable state, which wasn’t previously common in front-end development. React’s other big claim to fame is the introduction of the Virtual DOM, which has helped improve user experience and app performance.
Recently released Preact X has cleaned up the library’s code even more and added new features and compatibility enhancements to support more third-party libraries.
Preact’s size and speed mean that it is generally most suited to light mobile web apps or web widgets/embed that React can be heavy for. It’s minimalist nature means Preact will generally be considered for smallish projects where performance is prioritised.
Preact’s main weakness is a direct result of its primary strength as a much lighter, faster alternative to React. Its featherweight size inherently means it lacks the same range of features.
One notable difference to React is that ‘this props’ and ‘this.state’ are passed straight to render () method. This can be destructed later.
Based on the browser’s ‘addEventListener’, Preact doesn’t offer support for synthetic events.
Preact’s base core doesn’t support PropType validation which means it needs to be imported from the ‘preact/compat’ module if you want to use it.
Unit testing, which React uses the Enzyme testing utility developed by Airbnb for, is possible but requires some Webpack config and comes with limitations.
Vue.js was first launched in 2014 and then relaunched in 2016. Vue describes itself as an “Intuitive, Fast and Integrable MVVM for creating interactive interfaces.” At K&C, we tend to agree with those adjectives.
I love this description of Vue in a blog article on Packt:
The framework project’s main goal is to make ideas in web UI development (components, declarative UI, hot-reloading, time-travel debugging, etc.) more comprehensible. Less dogmatic, it is much simpler to learn for young developers compared to other frameworks.
As mentioned earlier, Vue.js was created by Evan You, a former Google engineer, who set out to combine the strengths of both Angular and React, with the idea that would also go some way towards neutralising their respective weaknesses.
Despite arriving on the scene after both Angular and React, Vue.js quickly gained traction and has been chosen by Alibaba, Nintendo, Expedia, and multiple other enterprise-level projects, defying the sometimes lazy assumption that it is a framework for single-page applications. The fact that Vue.js does not enjoy the backing of a “big tech” corporation makes its growing success all the more notable and begs the question of whether it might not have been even more popular with the level of financial backing Angular and React benefit from.
But Vue.js’s independent nature is also viewed (pun intended 😊) by many in the web development community as a positive. It has also resulted in a particularly diligent volunteer support community having sprung up around Vue. Problems and questions are typically responded to much more quickly than is the case with the big, corporation-backed frameworks such as Angular and React.
Another positive side effect is clear code/API which has not been ‘over-engineered’. This is a great video on Vue.js for anyone looking for a concise, easily digestible summary of the framework:
It’s interesting to note that ‘weaknesses’ attributed to Vue.js are almost all related to the framework’s level of maturity in terms of community size (though its also famous for its quality) and enterprise-level support. On a technical level, complaints about shortcoming are hard to come by, indicating Vue.js is likely to continue to grow in popularity.
The Ember open source framework is an old friend of developers, originating from Apple Music. Inspired by the Ruby on Rails principle “Convention over Configuration,”, Ember is best known as a massive repository that serves as a dictionary for app development. It takes into account convention rather than juggling configurations and enables two-way data binding.
Ember has seen little in the way of major changes since being first released in 2012, which means it is a strictly backwards compatible framework. On the flip-side, the framework is updated every six weeks, and claims it maintains a strong commitment to stability. Netflix, Apple and Microsoft are just some of the corporations that use Ember.
Svelte’s second unique quality is the addition of first-class support of reactivity. That allows for improved performance without the need for a Virtual Dom, which makes Svelte’s rendering the fastest of any JS framework.
Component-based (HTML, CSS, and JS) and lightweight, Svelte is written in TypeScript. But crucially, the framework doesn’t require knowledge of TypeScript to fully use it.
So finally, which of Angular, Vue, React, Preact, Ember or Svelte should you choose for your app? As outlined above, each framework or library has its strengths and weaknesses. The right choice depends on the particular needs of an application and is also often at least as influenced by developer resources and business considerations.
But we would be cheating if we left it so open at the end of such an extensive review of the six. So, here are some rules of thumb to help you decide:
And if you still can’t make up your mind, try them all out in different contexts. You’ll come to your own conclusions.
Krusche & Company is a Munich-based web development, DevOps, Cloud and digital transformation agency with over 20-years of experience. We support and enable our partners’ digital goals from enterprise portals for some of Europe’s best known brands to lean MVPs for promising start-ups and everything in-between.
Our model of German management and nearshored tech talent combines to provide a unique blend of quality, control and price. We prioritise excellence in communication on an equal footing to excellence in our tech stack.
If you need software development capacity, cloud-native development, migration or architecture services, DevOps, in the form of a team extension or dedicated team, please don’t hesitate to get in touch. We’d love to hear about your project needs and discuss how we could help you realise your objectives on point, on time and in cost.