The Ultimate Guide to JavaScript Frameworks

Coding Challenge Coding Live

Internationalization, or i18n, is the process of decoupling an application from a particular language or culture, and is a major requirement of most enterprise applications. As such, internationalization is one of Dojo 2s core concerns. @dojo/i18n, Dojo 2s internationalization ecosystem, provides everything that is needed to internationalize and localize an application, from locale-specific messaging to date, number, and unit formatting.

In 2013,AngularJSwas the most popular framework. Some of the factors contributing to its popularity during that period were its MVC architecture, declarative programming style, two-way data binding, and robust feature set.

Keeping up with JavaScript frameworks can be a challenge. There are a lot of them, and seemingly another one every month. How do you know which ones might be right for your project? What are their strengths and weaknesses? How do you get started?

The icons below are meant to help readers understand general framework characteristics and tendencies. They are only rough guides.

Learning curve can be steep for building larger applications

The Case for Using Angular 2 on a New Project

You create pages by adding files to the routes directory of your project. These will be server-rendered so that a users first visit to your app is as fast as possible, then a client-side app takes over

Introduction to Preact  a smaller, faster React alternative

Abundance of choice can be overwhelming at first

Build Your First App with Polymer and Web Components

We believe the patterns, libraries and tools we work on are beneficial, and were happy to see them widely adopted. But our campaign to UseThePlatform is ultimately not about driving people to use the stuff the Polymer Project builds. Its about promoting the use of the web platform to deliver the best apps possible

One of the major criticisms of Ember is its large size, which has a negative impact on performance. Ember is also viewed as having a steep learning curve and difficult to master.

The broken promise of Web Components

If you are a framework author or a fan of one and you dont see your framework listed, or wish to correct some information,reach out to meon Twitter. Ill be happy to add or update the listing.

Binding.scala is a one-way data-binding library written in Scala, although it targets both JavaScript and JVM. From thedocumentation:

CxJS, or simply Cx, is a feature-rich JavaScript framework for building complex web front-ends, such as BI tools, dashboards and admin apps. Modern frameworks such as React and Angular provide an excellent base for building UI components, however, component implementation and many other application aspects are left to the developer to figure out. CxJS tries to fill that gap and provide the all necessary ingredients required for modern web applications.

Dojo 2 is grounded in the belief that accessibility is as important online as it is in our physical environments, and architects of both share a similar responsibility to provide access to all…all Dojo 2 widgets have been designed to be accessible by default, and any tools needed to meet WCAG standards have been integrated into @dojo/widget-core and @dojo/widgets.

If youre an author or contributor to one of these projects and youd like to provide more or updated information, pleasereach out to me.

Elimination of virtually all runtime errors

Polymer is a lightweight library that helps you take full advantage of Web Components.

Thanks to new web platform primitives, many of the needs weve addressed by building over and around the platform can now be met by the platform itself…

DIOis a lightweight (7KB), declarative UI library that offers an alternative to React:

Ember is one component of a set of tools that work together to provide a complete development stack. The aim of these tools is to make the developer productive immediately. For example Ember CLI, provides a standard application structure and build pipeline. It also has a pluggable architecture and over 3500 addons to enhance and extend it.

In a way,Reasoncan be thought of as a part of the React ecosystem. However, it is much more than that. Reason is a syntax on top of the OCaml langauge. It can compile to JavaScript, but it can also compile to assembly and be used to build desktop and mobile applications. Heres some further explanation from the documentation:

Automatically enforced semantic versioning for all Elm packages.

Making UI easily with Binding.scala

Build a Real-Time Polymer To-Do App

No combination of JS libraries can ever give you this, yet it is all free and easy in Elm. Now these nice things are only possible because Elm builds upon 40+ years of work on typed functional languages.

Language agnostic, works with JavaScript, TypeScript and other languages

We believe frameworks should be disposable, and components recyclable. We dont want a web where walled gardens jealously compete with one another. By making the DOM the lowest common denominator, switching from one framework to another becomes frictionless. Choo is modest in its design; we dont believe it will be top of the class forever, so weve made it as easy to toss out as it is to pick up…We want everyone on a team, no matter the size, to fully understand how an application is laid out. And once an application is built, we want it to be small, performant and easy to reason about. All of which makes for easy to debug code, better results and super smiley faces.

Interoperability with JavaScript required in some cases (added complexity)

Of the three most popular frameworks, Vue is widely considered to be the easiest to learn. It is similar to React in many respects, but also has things in common with AngularJS for example, directives and templates.

With Web Components, you can create reusable custom elements that interoperate seamlessly with the browsers built-in elements, or break your app up into right-sized components, making your code cleaner and less expensive to maintain.

Poor browser support limits options/implementation of vision

React bills itself as, a JavaScript library for building user interfaces, as opposed to a full framework like Angular. Concerns like routing, state management and data fetching have been left to third parties. This has resulted in a large and very active ecosystem around React.

For more information on how React compares to the other popular frameworks, see my article onReact and Angular, and this one onReact and Vue.

Poor start up metrics in benchmarks

Svelte – The magical disappearing UI framework – Interview with Rich Harris

Many large React applications will use the popularReduxlibrary for state management andReact Routerfor routing, but there are other good alternatives available.

Forget what you have heard about functional programming. Fancy words, weird ideas, bad tooling. Barf. Elm is about:

Authored by Jason Miller,Preactis a well-established React alternative that emphasizes small library size. Coming in at 3KB gzipped, Preact uses the same API as React and is compatible with much of the ecosystem.

Cycles core abstraction is your application as a pure function main() where inputs are read effects (sources) from the external world and outputs (sinks) are write effects to affect the external world. These I/O effects in the external world are managed by drivers: plugins that handle DOM effects, HTTP effects, etc.

Angularis the successor to AngularJS. It is a full-featured and opinionated framework that provides defaults for data fetching, state management, development language, and build toolchain.

Choois a functional library for building user interfaces. Its small (4KB) and supports server rendering. The Choo philosophy:

10 Reasons why I moved from Angular to React

We can see that React is far ahead of Angular and Vue. What is less apparent is that Vue has had roughly double the growth rate over the past year compared to Angular. If GitHub stars are an indicator of developer enthusiam or interest, then Vue looks strong there as well, with 79,000 stars compared to Angulars 32,000. React has almost 86,000 stars at this writing.

Yes, React is taking over front-end development. The question is why.

Best performance of top three frameworks

Best practices not always clear to newcomers

Authored by Jeremy Ashkenas, who also created CoffeeScript,Backbonewas initially released in the fall of 2010. A key part of the Backbone ecosystem isMarionette, a framework that simplifies development.

Another example…maybe youre making an app that needs excellent performance on mobile networks. There are a number of very good, high performance libraries and frameworks listed below that may just fit the bill.

One notable feature of Vue is that its a progressive framework and can be used as a jQuery replacement as well as for large single page applications. From the Vue documentation:

If youve followed Googles much-appreciated efforts to promote the web platform over the years, much of this will sound familiar and in line with other efforts from the company.

? Performance: A top five performer inbenchmarks

Despite the growth of its successor project, AngularJS is still widely used and is in active development.

No runtime errors in practice. No null. No undefined is not a function.

Reason is not a new language; its a new syntax and toolchain powered by the battle-tested language, OCaml. Reason gives OCaml a familiar syntax geared toward JavaScript programmers, and caters to the existing NPM/Yarn workflow folks already know…

Vues relative simplicity, developer experience, and good performance have contributed to a huge surge in its popularity.

The three frameworks that currently dominate in popularity and usage are React, Angular and Vue. They each have large communities and lots of training resources available. If youre a new developer learning a framework to help you get a job, these three are your best bets. Heres a look at their npm downloads over the last six months:

Elmis somewhat unique on this list. Rather than a typical framework, its actually a separate language that compiles to JavaScript, similar toReason. However, it positions itself as an alternative to React:

Ember sets out to provide a wholesale solution to the client-side application problem. This is in contrast to many JavaScript frameworks that start by providing a solution to the V in MVC (ModelViewController), and attempt to grow from there…

Over time, the stacks weve built on top of the platform have pushed web development further and further from the simplicity of view-source and shift-refresh, to a place where every project begins with an overwhelming sea of choices.

Preact itself is not intended to be a reimplementation of React. There are differences. Many of these differences are trivial, or can be completely removed by using preact-compat, which is an thin layer over Preact that attempts to achieve 100% compatibility with React.

Building Applications with AppRun, Part 1 – Getting Started(YouTube)

DoneJSis a successor to JavaScriptMVC, which was first released in 2008. From the website:

AngularJS has an opinionated approach and aims to provide developers with acomplete solution:

Some of you may be wondering why a guide like this is useful. Most readers will end up using one of the frameworks I call the Big Three React, Angular and Vue. Thats OK. Theyre great choices. That said, a guide like this has value. Heres an example…

Angular 4 In 60 Minutes(Free video tutorial)

For example React can render strings, numbers, elements and components but what if it was able to render Promises or Thenables? This would help solve a lot of problems with data fetching and lazy loading that is possible with React but not declaratively incentivised at the library level.

AngularJS is not a single piece in the overall puzzle of building the client-side of a web application. It handles all of the DOM and AJAX glue code you once wrote by hand and puts it in a well-defined structure. This makes AngularJS opinionated about how a CRUD (Create, Read, Update, Delete) application should be built. But while it is opinionated, it also tries to make sure that its opinion is just a starting point you can easily change.

You also dont have to cobble together a bunch of different tools. Aurelia provides a CLI for generating and building projects, a browser plugin for debugging and a VS Code plugin as well. Yet, youre not forced to use any of these as Aurelia is structured to enable you to swap out any detail, even down to the templating/binding engine, in order to guarantee maximum flexibility.

The Beginners Guide to ReactJS(Free video course)

Learning Angular 5 as a React and Vue Developer

Frameworks without the framework: why didnt we think of this sooner?

Inferno has an API that is very similar to React and its possible to port a React app directly to Inferno using theinferno-compatlibrary.

Full-featured framework with well-tested defaults

Bobriltakes inspiration from React andMithril. From the documentation:

Start Using Elm to Build Web Applications

Authored by Yiyi Sun,AppRunin a small (3KB) library that uses TypeScript as the development language and takes inspiration from Elm:

Internationalization is another area of focus:

There are also small frameworks that provide a fantastic opportunity for learning. You can dig into the code and find out for yourself how one goes about building this kind of software.Ultradomis a library that you can use tobuild your own framework. Very cool, right?

Each page of your app is a Svelte component

Backbone is significant because it was one of the first frameworks to bring more structure to front end applications by implementing aMVC pattern. From the documentation:

Sapper is a framework for building extremely high-performance web apps…There are two basic concepts:

There a lot of small details that give DIO its edge that dont realy touch on new APIs but rather on creating a larger surface area of what React already supports and adding to this.

The frameworks listed in this section all have good documentation and healthy communities around them. Although they arent as widely used as The Big Three, they fill important niches and are notable for their unique or innovative approaches.

Reason compiles to JavaScript thanks to our partner project, BuckleScript, which compiles OCaml/Reason into readable JavaScript with smooth interop. Reason also compiles to fast, barebone assembly, thanks to OCaml itself.

A primary motivation of the Polymer project is to move the web platform forward. The Polymer team have a UseThePlatform hashtag that they explain on their About page:

One of the important principles behindDojois accessibility, which makes me think its a potential candidate for projects in government and higher education, where there are often stringent compliance requirements. From the website:

Getting started with PreactJS  A Step By Step Guide

If performance is your primary concern,Infernomight be the framework for you. Originally authored by Dominic Gannaway now a member of the React team Inferno was initially designed to prove that a JavaScript framework could perform well on mobile devices.

The frameworks are broken up into broad categories youll see that in the listing tables below. To the extent possible, each framework will have a section that explains the rationale for the framework, its pros and cons and some additional learning resources.

Aurelia provides core capabilities like dependency injection, templating, routing and pub/sub, so you dont have to piece together a bunch of libraries in order to build an application. On top of this rich core, Aurelia also provides a number of additional plugins for internationalization, validation, modal dialogs, UI virtualization and much more.

Lots of training resources and third-party libraries to help accelerate development

…there are real costs to doing too much outside and above the platform itselfcosts that both developers and users pay. Developer costs come in the form of complexity and lock-in.

It is fast, low size framework with rendering based on Virtual DOM. The main focus is on speed and simplicity of code ntent and behavior of any page can be defined simply by composing JavaScript objects.

Community complaints around communication

Inferno started as an idea two years ago, to see if a UI library could really improve the experience, battery, memory usage and performance on mobile devices. At the time we really struggled to get good performance on any UI library/framework it simply wasnt happening…

Smaller community vs top frameworks

Smaller community than React (but lots of overlap, intermingling)

To learn more about how Vue compares to React, seemy articlethat reviews the differences.

Preact is used by a number of large organizations including Lyft, Pepsi andUber. Although Preact has better start up performance (page load, for example) than React, in the latest benchmarks React is faster at updating the UI once the page is loaded.

Authored by Rich Harris,Sveltetakes a unique approach. It compiles your app at build time so that you ship the lightest weight code possible. From the documentation:

DoneJS offers everything you need to build a modern web app. It comes with a module loader, build system, MVVM utilities, full testing layer, documentation generator, serv

React is responsible for popularizingfunctional programmingprinciples among a new generation of developers. Although not a purely functional library, it allows developers to work in a largely functional style, particularly when combined with Redux.

AppRun is a lightweight ing the elm style model-view-update architecture and event publication and subscription.

Inferno also has its own router, soon to be updated to match the API of React Router 4, and is compatible with the Redux and MobX state management libraries.

There are a lot of interesting frameworks here. Some are the product of a single developer, while others have strong communities with a large number of contributors and corporate sponsorship.

Domvmis a, thin, fast, dependency-free vdom view layer. Like Vue, it can be used as a jQuery replacement. Similar to React, it leaves concerns beyond views to other libraries (but provides a good list of options). From the documentation:

ReasonReact is a safer, simpler way to build React components, in Reason.

The page content rendering is based on comparison of Virtual DOMs. The application has some state in time and bobril application generates the Virtual DOM according to this state. Virtual DOM is an object representation of the resultant DOM. If some state-changing event occurs and the previous Virtual DOM is different than currently generated Virtual DOM, the real DOM will change according to this change.

Strong corporate support (Facebook)

…Svelte has a crucial difference: rather than interpreting your application code at run time, your app is converted into ideal JavaScript at build time. That means you dont pay the performance cost of the frameworks abstractions, or incur a penalty when your app first loads.

The reason Preact does not attempt to include every single feature of React is in order to remain small and focused – otherwise it would make more sense to simply submit optimizations to the React project, which is already a very complex and well-architected codebase.

In recent years Backbone has seen a decline in usage, although it continues to be shipped in the latest version of the Drupal content management system. One relevantcommenton a possible reason for the decline:

The single most important thing that Backbone can help you with is keeping your business logic separate from your user interface. When the two are entangled, change is hard; when logic doesnt depend on UI, your interface becomes easier to work with.

Building an app with all the modern best practices code-splitting, offline support, server-rendered views with client-side hydration is fiendishly complicated. Sapper does all the boring stuff for you so that you can get on with the creative part.

Like Angular, Dojo uses TypeScript as its development language.

There was a time some years ago when these frameworks would have been considered the Big Three. Although less popular today, they are still widely used and have been influential in the development of later frameworks.

Billed as a functional and reactive JavaScript framework for predictable codeCycle.jsis primarily the work ofAndr Staltz. It has over 100 contributors and corporate sponsorship. From the documentation:

While Angular is opinionated and React agnostic about concerns like routing and state management, Vue takes a middle approach, with official routing and state management solutions that are optional, but kept in sync with the core library.

Perhaps the most notable feature of Angular is its use ofTypeScriptas the development language. This has made the frameworkwell-suitedto those coming from traditional object-oriented languages like Java and C, as TypeScript takes inspiration from those languages.

Polymer Team – Im really frustrated!

Thats where this guide comes in. Its a living document that is a reference for all known front end JavaScript frameworks (archived or deprecated projects are not included). In this case, the term frameworks is being used in a broad sense. It includes user interface (UI) libraries like React, as well as full frameworks like Angular.

Rob Eisenberg on Aurelia and how it stacks up against Angular 2 and React

Emberwas authored by Yehuda Katz, a prolific creator or contributor to numerous open source projects. Ember is based on the MVVM pattern and has a rich feature set. It also has a strongphilosophical viewpoint:

Binding.scala can be used as a reactive templating language in both web and desktop GUI development. It enables you use native XHTML literal syntax to create reactive DOM nodes, which are able to automatically change whenever the data source changes…Binding.scala has more features and less concepts than other reactive web frameworks like ReactJS.

Its been said that enterprises are the the target users for Angular. In the sense that many large companies have teams familiar with Java and other object-oriented languages, this may be correct.

Reason (sometimes referred to as ReasonML) has a companion project,ReasonReact:

Inferno proves that it is possible to be fast on terms of performance, Inferno is currently the fastest JavaScript UI library there is both in benchmarks and actual real-world scenarios. It excels on the browser at initial page load, parse times, render times and update times. Infernos server-side rendering is around 5x faster than React, around 3x faster than Angular 2 and around 1.5x faster than Preact and Vue.

Friendly error messages that help you add features more quickly.

Polymeris a Google-backed libary focused onWeb Components, a proposed group of technologies that are currently not well-supported in browsers. Polymer, along with the Polymer App Toolbox, helps developers use these technologies today to build web applications.

Aurelia is a complete framework. Heres the basic pitch from the documentation:

And because theres no overhead, you can easily adopt Svelte in an existing app incrementally, or ship widgets as standalone packages that work anywhere.

Perhaps youve heard of theDojoframework. Probably not, though. Dojo focuses on a couple of things that make it unique accessibility and internationalization. All Dojo widgets are accessible by default and it provides everything needed to internationalize an application.

Best choice for cross-platform teams (web, mobile, desktop, other devices)

Learn Vue 2: Step By Step(Free video course)

domvm is a flexible, pure-js view layer for building high performance web applications. Like jQuery, itll happily fit into any existing codebase without introducing new tooling or requiring major architectural changes…As a view layer, domvm does not include some things you would find in a larger framework. This gives you the freedom to choose libs you already know or prefer for common tasks. domvm provides a small, common surface for integration of routers, streams and immutable libs.

In late 2013 React was introduced. React used unidirectional data flow and argued that two-way data binding made it difficult to understand applications, particularly as they scaled. In 2014, the Angular team announced Angular 2, which would subsequently be renamed to simply,Angular. This new version would introduce unidirectional data flow among othermajor changes. This marked the beginning of a long decline in the popularity of AngularJS.

TypeScript provides familiar language for those with background in object-oriented programming

TypeScript may be a barrier to adoption

Polymer sprinkles a bit of sugar over the standard Web Components APIs, making it easier for you to get great results.

Hugely popular with a strong job market

Slim, speedy Svelte framework puts JavaScript on a diet

An interesting project related to Svelte isSapper, a framework similar in philosophy toNext.js, but with a greater emphasis on performance.

Elm has also been highly influential, including being one of the sources of inspiration for the popularReduxstate management library.

Aurelia, authored by Rob Eisenberg, can be seen as a decendant of both AngularJS and Eisenbergs previous framework, Durandal. Prior to creating Aurelia, Eisenberg was a part of the Angular team, leaving in late 2014 over disagreement with the direction of the Angular 2 project.

It is often said that writing ReactJS code feels like just using JavaScript. The same applies to ReasonReact, but we push it further; writing routing, data management, component composition and components themselves feel like just using Reason.

Well-architected code that stays well-architected as your app grows.

Elm is a functional language that compiles to JavaScript. It competes with projects like React as a tool for creating websites and web apps. Elm has a very strong emphasis on simplicity, ease-of-use, and quality tooling…I can safely guarantee that if you give Elm a shot and actually make a project in it, you will end up writing better JavaScript and React code.

Backbones author, Jeremy Ashkenas made a decision to call Backbone finished in terms of API and feature set after the 1.0 release. This has the advantage of leaving Backbone as by far the most stable major JavaScript framework, but hinders efforts to pull in lessons from other frameworks

Current job market is less than that for React and Angular

By leveraging the latters great type system, expressive language features and smooth interoperability with JS, ReasonReact packs ReactJS features into an API that is:

Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects.

Although often seen as the new kid on the block,Vuehas been around since 2013. Evan You is the creator and primary developer, and unlike React and Angular, Vue is not directly supported by a major company. It instead relies on individual and corporate donations.

Aurelia vs. Angular 2: What should I choose?

Leave a Reply