Hesam Seyed Mousavi, April 30, 2022
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 the 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:
- Organisational policy ie. “We use React for our front-end development unless there’s a particularly compelling reason why an app’s desired functionalities cannot be achieved with React”.
- Availability of development resource ie. “We currently have Angular specialists available inhouse” or “our IT outsourcing partner has a Vue.js team available to start work at short notice”.
- Future-proofing ie. It’s comparatively easier to update React-built apps to the most recent iteration of the framework than it is with Angular, Vue.js or Ember. How stable do the framework’s active support and open source community engagement look on a medium to long-term basis?
- Developer popularity. It’s easier to recruit and retain developers to work with the most popular JS frameworks. Greater numbers of developers with experience in a particular framework can also contribute towards keeping costs within a reasonable framework.
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 suit 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 can 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 from 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.
- Listens to web requests
- Handles session
- Calls your code to handle requests
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.
- Ember JS
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 to 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, almost 80% of JS developers have coded with it, but that satisfaction levels are high. Next in terms of usage comes Angular – over 60% of JS developers have 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.
Demand For Angular, Vue.js, React, Preact, Ember and Svelte Developers In 2022
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.
Comparing The Strengths & Weaknesses Of Angular, Vue.js, React, Preact, Ember and Svelte
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.
- How we can use components with modules;
- How we can use dependency injection;
- There are many “pros” out-of-the-box like as a router, form validation, HttpClient, etc;
- The high level of control;
- Unlike React, Angular enables normal usage of HTML and CSS along with all their features and advantages.
- TypeScript and separating the template from styling and business logic makes Angular development especially suited for the large code-base of enterprise-grade apps.
- Built-in features like DOM sanitisation makes Angular the most secure Front-end framework.
- Google’s backing of Angular may not be on quite the same level as the resources Facebook supports Reacts with but is more than enough to ensure the framework is both future-proofed and continues to innovate and improve. Recent additions such as lazy loading, differential loading to improve loading time of modules and Angular 9’s new rendering Engine Ivy to improve startup time, response time, and to reduce bundle size, are pluses.
- It can be a little tricky for inexperienced developers to work with Angular, especially if they do not have a strong background in Typescript. However, it is still it easier than React for the less experienced to get to grips with;
- To date, every new version differs significantly from the previous, which results in distrust of the framework and complicates forward-looking migrations of apps to the latest version of Angular complex. That’s especially the case between AngularJS and Angular, which can’t be switched directly between.
- Dependency injection can be time-consuming and creating dependencies for components tricky.
- A developer is limited if he/she wants to create a single-page application. You can’t just drop it into your full-stack or a multi-page application.
- Angular is heavy. At 500-plus KB, it is generally not an optimal choice for smaller applications.
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.
- Optimisation does not require a world of work.
- Flexibility. React is unopinionated with React-Core simply a Component-based library for the View layer, offering almost complete flexibility and customisation of apps.
- A further expression of React’s flexibility is that there are few barriers to how it interacts with different libraries and projects.
- The library genuinely lives up to its “Learn Once, Write Anywhere” slogan and can be used to develop Web, Mobile (React Native) and Desktop (Electron) applications as well as in back-end development with Node.js.
- React is designed to render content based on JSX. It can be used in both SPA and SSR architectures, making it a very strong solution for this type of development work. Its server-side rendering is superior to that of its competition and offers very good SEO support.
- Declarative. React updates efficiently and renders the right components when data changes. Declarative views also make the code readable and easy to debug.
- Being backed by Facebook, and used for Facebook, means the tech giant allocates significant resources to continually developing React. That also means features are proven in battle on one of the largest and highest traffic applications, browser and mobile native, apps in history.
- React continues to innovate and improve, with recent examples of that including React-Fiber for improved Concurrency, React hook, reducing boilerplate code and Suspense for better rendering.
- React is quite simple but compiling an entire framework based on React is a challenging task;
- Flexibility can be a double-edged sword and the freedom React offers can lead to time being wasted deciding on the best approach to different challenges.
- React development involves the use of a wide range of assembly tools to function well and be compatible with other web development tools.
- Poor documentation is a criticism often levelled at React libraries. A very active community and resourced support from Facebook sees updates and tools released regularly but accompanying documentation is often lacking. This can make it hard for developers to get up to speed with new features and library integration can be poor.
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 simple and predictable diff implementation is another reason for its speed.
- Effective memory storage makes Preact very efficient.
- Simple apps can be run in the browser without needing to use build tools
- Preact offers a dedicated CLI
- Uses React’s API
- Can be integrated with React projects
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, for which React uses the Enzyme testing utility developed by Airbnb, 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 is possible to use ES5, ES6, as well as TypeScript (with the caveat it can be harder to set up);
- As with React, Vue quite nicely interacts with other libraries or even projects.
- Vue’s documentation is easy to understand and well-structured and the open source community is notably active in responding to questions or issues. This makes getting started relatively painless.
- Vue.js is simultaneously both an opinionated end-to-end framework and a View layer providing state management.
- We mentioned that the aim of Vue.js was to combine the strengths of both React and Angular and perhaps the most notable example of that is reactive two-way data binding (like Angular) and Virtual DOM, Event Sourcing (like React).
- Vue is a real featherweight of a framework at a downloaded .zip of just 18KB. Downloading and installing the library is super fast and the lightness also has a positive impact on site speed, and by extension UX and SEO.
- Vue.js is going through another major reinvention, like the upgrade from the original 2014 release and 2.0 in 2016. Vue.js 3.0 is coming. It’s already available for experimentation with in beta version. Vue 3 promises to be, as founder You summarise – “faster, smaller, more maintainableand it’s easier to target native”.
- Vue.js is still relatively new and doesn’t have the endorsement and financial backing of one of the big tech players like Angular (backed by Google) and React (backed by Facebook). To be adopted more often for large enterprise-level projects in favour of Angular or React, Vue.js still lacks a little in the kind of support corporations tend to look for and why it is most commonly used in smaller projects.
- Vue is particularly popular in China which does mean a significant part of the content, plug-in descriptions and instructions and community discussions on the framework are in Chinese.
- Reactivity complexity. The two-way data binding implemented in Vue to manage DOM updates is a handy tool to keep components in sync. The reactivity system re-renders only those chunks of data that are triggered by a user activating a component. Mistakes are often made during this data reading, requiring data to be flattened. It is a known issue and there is plenty of documentation explaining how reactivity should be set up properly.
- Smaller ecosystem of plugins and tools compared to React or Angular.
- Lack of experienced Vue.js developers. It’s a chicken and egg situation, but fewer Vue developers can put companies off the framework while lower client demand discourages more developers from learning it.
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.
- Simply configured on the system;
- Ember is an end-to-end opinionated cohesive framework focusing on “Convention over Configuration.”
- Ember is backed by a consortium of big tech corporations and brands, including Yahoo and LinkedIn. That means it has not been shaped to one corporation’s needs.
- Embers data library allows for data to be accessed across multiple sources at once, set up asynchronous relationships.
- Ember Inspector is a handy browser extension that lets developers monitor and edit apps in real-time.
- Ember’s MVVM (Model–View–ViewModel pattern) architecture is popular with its users and the framework also offers two-way data binding.
- The recently released Ember Octane iteration has introduced an HTML and component first approach with improved support for state management and reactivity.
- Ember benefits from an active community that regularly contributes to Ember Observer, a website that aggregates solutions to common tasks.
You might also be interested in our blog post directly comparing Angular vs Ember.
- Being a highly opinionated framework makes customisation difficult.
- Among the heaviest frameworks;
- Hard to master;
- Sometimes considered too complex for small projects;
- Slow release of new versions with few new options.
- Ember is closely tied to jQuery, which for developers who prefer using standard fetch or Axios for AJAX requests, can be considered a disadvantage. However, in Ember Octane, jQuery is no longer included by default.
- Falling popularity can make finding good Ember developers tricky.
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.
- It’s easy for developers without a lot of JS experience to get up and running with Svelte.
- The compile-time framework doesn’t require any framework-specific runtime and Svelte has the smallest bundle size of any JS framework.
- Fastest rendering of any framework thanks to Dom rendering via reactive programming.
- Svelte’s component-based framework allows for UIs to be built by creating composable and reusable components. The result is less boilerplate code and reduced development time.
- Like React-Core, Svelte is a View layer and unopinionated.
- Client-side and server-side rendering both supported. Well-regarded SEO support.
- Svelte is cross-platform and can be used to develop web, non-native mobile and desktop apps.
- Lack of maturity. Still young, Svelte doesn’t yet have many significant use cases or third-party tools. Lack of tooling and tooling support currently the main criticism of Svelte.
- The number of features offered by Svelte is still limited, which mean a lot of code would have to be written or third-party tools used for more complex development projects.
- Compared to the mature, dominant JS frameworks and libraries, Svelte still has a small community, has underdeveloped documentation and generally lacks the kind of support that most enterprise-level projects demand.
- Child components can’t be adjusted with scoped styles.
- TypeScript not supported.
- Few job openings specifically for Svelte developers.
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:
- Your solution is Angular if you like TypeScript and prefer to work in a clearly defined framework in one style and flow. This is especially the case in the context of a large, enterprise-level app for which stability, support and a large pool of experienced developers is a priority.
- Your solution is React if you need flexibility, prefer big ecosystems, do not want to choose between various packages, are fond of JS, like your own approach and cutting-edge technologies. Like in the case of Angular, a deep pool of React developers and mature support and stability are also in the library’s favour.
- Your solution is Preact if you are also considering React but feel the performance benefits derived from the former’s lightness outweigh its more limited functionalities.
- Your solution is Vue.js if you are looking for a gentler learning curve to help onboard junior devs, need a lightweight framework or need clean HTML files. Take into consideration that while Vue is now well established, the pool of experienced developers is not as deep as in the case of Angular or React.
- Your solution is Ember if you personally like working with the framework, are not overly concerned about being able to relatively easily hire Ember developers a couple of years from now and don’t consider future-proofing as a strategic must.
- Your solution is Svelte if you are ready to prioritise its technical strengths over lack of maturity and either don’t have to worry about or are willing to take a risk on a still shallow pool of experienced developers.
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 – Munich-based Web Development Consultants
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 combine 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.