Hello Framework! A Heuristic Method For Choosing Front-End Javascript Frameworks
Hello Framework! A Heuristic Method For Choosing Front-End Javascript Frameworks
Hello Framework! A Heuristic Method For Choosing Front-End Javascript Frameworks
Examensarbete 15 hp
Juli 2021
Mitra Bauer
2 Background 3
2.1 Concepts within JavaScript development . . . . . . . . . . . . . . . 3
2.2 Front-end frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.1 React . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.2 Angular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.3 Vue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.4 Svelte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Related work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Interview study 7
3.1 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1.1 Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1.2 Analysis method . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 Evaluation 16
5.1 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2.1 React . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2.2 Angular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2.3 Svelte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.2.4 Vue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3 Framework differences . . . . . . . . . . . . . . . . . . . . . . . . . 25
6 Discussion 27
6.1 Interview study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.2 Test application design and Evaluation . . . . . . . . . . . . . . . . 27
6.3 Choosing a framework . . . . . . . . . . . . . . . . . . . . . . . . . 29
7 Conclusion 30
7.1 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Appendices 33
ii
A Interview Questions 33
B Checklist 34
C In-depth Questions 35
i
1 Introduction
In the world of JavaScript there has been many new frameworks created for the
purpose of helping developers create better applications. [1] Each new framework
comes with their own background, set of rules and structures. How do we know
which framework to choose in this vast array of frameworks? As a developer, what
are the different criteria we need to be aware of when making this decision? Why
are there new frameworks constantly on the rise and what makes a framework die
or live?
While some projects are still using pure JavaScript, it might not always work
for the given user requirements in a project. Advanced topics such as state man-
agement, routing, data handling and manipulation are some of the problems being
solved for developers by using frameworks. Many of today’s frameworks are adopt-
ing single-page application principles [2] which enables users to navigate easily
between different web pages without waiting for them to reload whole new pages.
There has been quite a bit of work done in benchmarking the performance of
JavaScript frameworks [3,4] but not as much investigation into what other aspects
of a framework is interesting to look at from a developer’s perspective. This thesis
is about how to think when choosing a front-end framework for a project and is set
up in two parts. Part one is an interview study done with experienced developers
to extract what their experiences with different frameworks are and what qualities
are important. The interviews are followed up by an analysis resulting in listed
criteria and in-depth questions. In the second part a test application was built in
the top four most used JavaScript frameworks [5] to see how well the frameworks
answers some of the criteria and in-depth questions, as well as understanding their
similarities and differences. The test application and frameworks are evaluated
and followed by discussion about the applications, frameworks and the interview
study. The work will result in more ways to evaluate a framework and a checklist,
in-depth questions and specification are available in the appendices.
1.1 Purpose
The goal of this thesis is to give insight into what is sought after in a JavaScript
front-end framework, mainly from a developer’s perspective, and to suggest which
framework of today’s top 4 most used frameworks matches the developers’ expec-
tations. The test application together with the interviews resulted in a checklist,
list of in-depth questions and test application specification that is provided by
the end. Another purpose is to add a hypothetical way to inspect and choose
frameworks, contributing to the front-end communities and other academic works
related to this field.
1
1.2 Delimitations
Delimitations for this thesis is that the tested frameworks are JavaScript focused
and the test applications were developed for the web platform. The versions of the
frameworks were the latest stable releases as of May 2021.
2
2 Background
Front-end development is a fast-paced field of work where all types of helpful li-
braries are constantly being developed. Many of the frameworks today are written
for JavaScript, today’s most used scripting or programming language that develop-
ers use to create interactive web pages and applications. [6] Different frameworks
and libraries have different purposes. Some are for structuring the styling in a
more efficient way. Some are just to help developers structure their JavaScript
code in a set of rules with functions abstracted and working in the background.
For small to mid-sized projects one might not have to use any libraries but they
turn out useful when there are user requirements involved and a more complex
architecture planned out. There are also options for cross-platform development
meaning one code base will work on multiple platforms and operating systems.
Single-page application (SPA). SPA works in the way that parts of a web
application are being rerendered on user input instead of reloading entire pages,
which results in faster transitions and a more smooth application experience. [2]
State management. An application that allows users to show, add and remove
content needs to track and update the underlying data. This underlying data is
known as state. State can for example live locally in a component or kept in some
kind of global state that components or pages can access in certain ways. [8]
Reactivity. Every time state or data changes the user interface (UI) needs to
be updated and match the data. Different frameworks have different syntax and
methods to make the UI reactive. [8]
3
Reusability. Code reuse has many benefits and allows you to write less code.
Other benefits are better readability of code, better structure of code and reduced
testing effort. Ways of reusing code could be extracting classes and methods when
opportunities arise, resulting in less errors or inefficiencies. The avoidance of du-
plication through extracting methods makes code more maintainable as any future
modifications only need to be applied in one place and prevents inconsistency when
there are multiple sections of code that needs to synchronize changes. [9]
2.2.1 React
The first version of React was released in 2013 and is owned by the social media
company Facebook. [10] It is an open-source library and is maintained by both
Facebook and its community of developers and companies. React includes state
management and rendering state to DOM but does not include routing by default
as well as certain client-side functionalities. It is the top most used framework for
building JavaScript user interfaces in 2020 and ranked second place in satisfaction
among users. [5]
React’s key feature is the composition of components and that components
written by different people should work well together. Other design principles are
common abstraction meaning they avoid to add features that can be implemented
by users hence less useless library code. Stability, interoperability and good devel-
oper experience is also at the core of the React framework development. [11]
4
2.2.2 Angular
AngularJS started out as a side project of a Google employee [12] and was the
second most used JavaScript framework in 2020 and ranked eighth place in sat-
isfaction among users [5]. It was first released 2010 but was scrapped and com-
pletely rewritten in 2014-2015. The latter version was renamed to just Angular
and is in fact a TypeScript based open-source library. TypeScript is a superset of
JavaScript.
Angular suggests applying the single responsibility principle to all components,
services and other symbols. One example is defining one service or component per
file and making sure to define small functions. Angular has its suggested style
guide to follow and their design principles can be understood by implementing the
style guide. [13]
2.2.3 Vue
Vue.js or Vue is an open-source library made to be adoptable and is able to scale
between a library and a framework depending on different use cases. The initial
release was in 2013 and is maintained by the creator and a team of core members.
[14] It was the third most used framework for building JavaScript user interfaces
in 2020 and also ranked third in satisfaction among users. [5]
2.2.4 Svelte
One of the most recent JavaScript frameworks is Svelte which was first released
in 2016 and rewritten in TypeScript 2019. [15] Svelte converts an application into
JavaScript at build time rather than interpreting it at run time. In the State of
JS 2020 survey it quickly got the highest satisfaction score, ranking number one
over React, Angular and Vue. It is still on the rise, ranking as the fourth most
used framework for building JavaScript user interfaces. [5]
5
Yet another study from 2019 was investigating React, Angular and Vue. In
terms of popularity and community React ranked highest. Vue took first place
when it came to performance and learning curve. Angular was suggested as the
most fitting framework when it comes to building large scale applications. [16]
Going back one more year to 2018, another study looking at React, Angular and
Vue suggested that the three do not stand far apart from each other. Angular was
raised having a high TypeScript appreciation, emphasising guidance and structure
and being object-oriented. Vue had a shallow initial learning process, emphasis on
new popular technology and separation of concerns in one file. React was suggested
to have a strong focus on using JavaScript, a large ecosystem and high importance
of flexibility. [17]
6
3 Interview study
There is not much research done on how to choose frameworks holistically. De-
pending on what kind of project it is or what competencies there are in a team,
choosing technologies can be tough - sometimes simply the more familiar frame-
work is chosen because of initial efficiency and ease of use. There might not be
time to look into a certain framework or spend time on learning it. But if there is
time and interest, what approach can one take and what should one look for?
The goal of the interviews was to find some general questions to answer and
topics to check when researching frameworks for both personal and company use.
3.1 Methodology
The interviews were qualitative semi-structured 30 minutes long sessions. Semi-
structured interviews allow for more flexibility where the researcher can follow
topics of interest during the interview without sticking to a structured set of ques-
tions, rather using the prepared questions as guidance to keep the interview on
track. [18] The participants were interviewed one at a time totaling in four in-
terviewees, held at the interviewees’ workplace. Most questions were prepared
in advance but there was also space for general discussions and following up on
statements. Questions can be found in appendix A.
3.1.1 Participants
The interview study was done with four developers between the age of 24 and 42
with several years of programming experience. All worked at the same company,
two of which had previous experience from other companies. All were front-end
development oriented. Gender is not relevant for these in-depth questions and
hence is not reported.
1. Familiarising yourself with your data: Transcribing, reading and noting down
initial ideas.
7
3. Searching for themes: Collating codes into potential themes and group the
data.
5. Defining and naming themes: Refine specifics of themes and overall analysis.
Clear definitions and names.
3.2 Results
The thematic analysis resulted in six themes. They are reported here in the term
of what was said and questioned about each theme. Most of the questions are also
applicable when researching other technologies.
• How much support can someone find, both from official documentation and
developers’ experiences?
• If the framework is available on GitHub, what does the activity and history
look like? What can you see in the comments?
... if there are many users you could kind of assume that the commu-
nity is big enough and that’s a sign of that it (the framework) is being
maintained.
8
Maturity. To check how developed a framework is might be a good idea - choos-
ing a framework that is new or not entirely stable could end up being more work
than expected. Some new frameworks do not have big communities, so it is up to
you whether you like a challenge or want to have as much support as possible.
• How many are working on the framework and are they developing it in the
same direction?
I don’t invest a lot of time in something that hasn’t been around for a
while, with React you understand it’s groundbreaking and here to stay.
9
A framework that is good at everything isn’t the best at something.
Then it might be better to use a few smaller libraries and create your
own kind of framework.
... after comparing the two frameworks we chose the one we were used
to.
10
I usually just take whatever seems coolest or most interesting after read-
ing the documentation, but if you don’t understand the documentation
on the first read it’s like - forget it, I will never test this. ... There can’t
be magical stuff and if the most important parts lack documentation,
then you know, this will be troublesome.
The most important part (in a framework) for me is how much time
I win, in experienced time or real time, in a so called developer iter-
ation. ... All tools that remove loads of troublesome difficulties like
reloading, including new files, everything really that removes complex-
ity and makes things go faster - that’s the tools I have adapted and
worked with and makes me a more efficient developer. It’s the most
important.
Company questions. Choosing the right technologies can improve the product
delivery time and make the product easier to maintain. A project often involves
more than one person, which makes choosing technology not only a technical
question but a personnel question. It might also be important to check whether
the framework is open-source and what license it has to avoid future complications.
11
• How many in the team know the framework and how many would need to
learn it?
• Can one work productively with the framework and will it affect production
speed?
• What current problems will it solve and does it support the current tech-
nologies that are being used?
Community
Documentation
GitHub history
GitHub activity
Plugins
Tutorials
Existing bugs
Size of framework
Articles
Debugging options
12
4 Test application design
To further look into the Technical Aspects, Practical Use and Community part of
the interview study results a test application was built. The test application and
other research resulted in a final checklist, in-depth questions and specification to
use when investigating frameworks, available in appendices B, C and D.
The inspiration for the test application design is based on a combination of the
results from the interview study and today’s most used social media applications
which normally consists of some feed page and lists of data. The application design
needs to address some in-depth questions from the interview study but also let the
developer get enough experience with the framework to feel confident in making a
technical decision. For this application the scope will be:
• Data handling - How do we fetch and handle data in this framework? How
is data passed?
The base application was implemented in React, Vue, Angular and Svelte. All
variants were built for the web platform in mind. The first application was imple-
mented in React as a template app for the other frameworks. I chose to start with
React because of previous work experience. As for guidelines and best practices,
as much as possible was followed from official documentation and otherwise from
other community resources such as Stack Overflow or GitHub threads. Setting up
the projects was also done by official recommendations and documentation. The
coding paradigm was functional if applicable. Since some frameworks were new in
terms of my own experience I also drew inspiration from community websites.
Another way to test the test application design is to give a simple specification
to a developer and see how well they manage to implement it. As for the applica-
tion built in Vue, the specification was handed to another experienced developer
to see how the proposed design was built and afterwards I gathered feedback for
more input on the specification.
13
Finally, these are the questions from the interview study that should be an-
swered by implementing the specification:
• Is the framework mature?
– Links to Home and Feed page where Home is shown at root path (/)
– Theme toggle with theme value in a global state, available themes
should be default and dark theme
• Home Page:
– Title
– Logo of some sort
– Link to framework homepage
• Feed Page:
14
– Simple error handling, showing a text if data fetching request fails
– Data fetching from some open-source REST API should be paginated
and kept in a local state
– List of feed items with infinite scrolling and a loading spinner at the
bottom, spinner should be from a third-party library
– Routing/navigation library if not built-in
Other guidelines:
15
5 Evaluation
This section includes the evaluation of the test applications built in React, Angular,
Vue and Svelte. Both similarities and differences will be presented and the test
application design will be scrutinized. The way that this evaluation is done could
be one way for developers to investigate frameworks in the future, which is one of
the purposes of this thesis.
5.1 Methodology
A systematic evaluation will be done on the four test applications by looking at
the application criteria from Subsection 4 one framework at a time. That includes
handling of libraries, reactivity, reusability, component architecture, data handling,
state management, styling and finally the interview study in-depth questions.
Since the Vue implementation was outsourced to another developer some ques-
tions can not be answered in the same way as the other three that I implemented
myself. However outsourcing the implementation is important to answer questions
about how clear the specification is for someone who has not yet implemented
it and how well one gets to know a certain framework, evaluating whether the
specification is valid enough for testing a framework.
5.2 Results
Before diving into the separate framework evaluations I will share what was com-
mon or the same in all the frameworks given the application criterias. This is to
avoid repetition.
• Data handling: Used JavaScript’s Fetch API in all applications for fetching
data from the open-source API and it worked fine. The API provided images,
title and id.
• Handling of libraries: All frameworks used Node package manager (npm) for
managing libraries.
• Building the theme toggle I used community resources for inspiration and
all frameworks had articles on how to handle themes.
• Following the official documentations on setting up the application, each
framework project came with a landing page from which I was able to reuse
title, logo and link to framework website.
• As for debugging, I did not make use of any framework specific ways to
debug. I only used console logging and a network tab in the browser.
16
• All frameworks supported having an error state variable that could condi-
tionally show an error text instead of the infinite scrolling list when a data
request failed.
• All frameworks are still being developed and have existing bugs but are still
mature enough to handle the requirements of the test application.
• All frameworks are free to use and under MIT license.
• All frameworks only support the web platform by default.
5.2.1 React
Following the official documentation it was an easy project setup with Create React
App, an officially supported way to create single-page React applications which
offers a build setup with no configuration. I added a third-party library called
react-router-dom for routing and navigation. For the infinite scroll I took inspi-
ration from community resources and found a third-party library for the loading
spinner using npm. Altogether the React application was a successful implemen-
tation since all specification requirements were met. After finishing the implemen-
tation the built bundle size was 235 KB and took 4.0 seconds to build. For a visual
presentation of the application, see figure 1 and 2.
Figure 1: Home page, default theme Figure 2: Feed page, dark theme
Reactivity. Using React’s state and prop variables allows components to update
whenever some state has changed. In this test application states were held locally
at page level and passed down as props to the smaller components.
Reusability. Components were reusable and mapped to data in the feed page.
A separate file was created for the list item component and imported in the page
file.
17
Component architecture. From own experience I decided to do a simple com-
ponent architecture with a folder for pages and one for components. This was not
set up from the start and had to be done manually.
Data handling. The data flow is unidirectional. The data was fetched from an
open-source API, put in a local state for the Feed page and updated when new
data was fetched since it was a paginated request.
State management. Local states were held in Feed page for the fetched data,
loading and error handling. Global state for the theme was done with React’s
Context API.
Styling. Create React App came with some default styling, I left some of it and
added some new styles in a global CSS file that came with the project setup.
In-depth Questions
18
Disadvantages: Could be that there is not a lot of suggestions on project
architecture.
5.2.2 Angular
The official documentation for Angular proposed to use the Angular CLI (command-
line interface) to setup a project. When creating the project one gets prompted
if they want to use routing and what stylesheet format they would prefer out of
CSS, SCSS, LESS and Stylus. I chose to go with the built-in routing and CSS.
The Angular CLI generates a lot of boilerplate code when creating components,
such as recommended architecture, base tests and CSS files. I used the ng generate
command for creating modules, components and services.
Due to limited implementation time and difficulty to find community resources
on how to build a infinite scroll list I decided to use the third-party library ngx-
infinite-scroll. As for the loader spinner I could not find a library that supported
Angular 12 which was the version setup by the Angular CLI. I found that the
community resources were sometimes limited to a certain Angular version. In my
experience there was not as many resources as for React and Vue. Since Angular
was new to me I used a lot of community resources to get an understanding for
best practices and common design patterns. After finishing the implementation
the built bundle size was 709 KB and took 19.4 seconds to build. For a visual
presentation of the application, see figure 3 and 4.
Figure 3: Home page, default theme Figure 4: Feed page, dark theme
Reactivity. The Angular CLI set up the project with RxJS by default, a li-
brary for reactive programming using Observables that makes it easier to compose
19
asynchronous or callback-based code. [21] Whenever new data was fetched the
components were updated.
Reusability. I could reuse and map components using the *ngFor keyword but
the file structure is different from React and Svelte in the sense that I created the
list item in the same template file as the feed page.
Data handling. Angular has a two-way data binding syntax, data can flow in
both directions. I did not make use of the two-way data binding syntax in the test
application. Data for the Feed page was stored in the component TypeScript file
and mapped in the HTML template file.
State management. Local states such as data, loading and errors states were
handled in the Feed TypeScript file and inserted in the HTML template file.
Styling. The styling was set up to use separate CSS files but there is also the
option to keep it directly in the template file. The styling is encapsulated into the
component’s view and does not affect the rest.
In-depth Questions
20
a certain Angular version. Unfortunately I could not find a loading spinner
for Angular 12, but I did add a library for the infinite scroll list that worked
well. Searching for angular in the npm package library shows 50 845 results.
5.2.3 Svelte
Following the official documentation and setting up a new project was easy. For
Svelte I had to install a plugin for my editor VS Code to syntax highlight the
code. To me the syntax was the most different among the four frameworks. I
added a third-party library for routing called svelte-routing. Even though Svelte
is the newest of the four there is many packages available and it was easy to find
one for the loading spinner. After finishing the implementation the built bundle
size was 156 KB and took 1.7 seconds to build. For a visual presentation of the
application, see figure 5 and 6.
Reactivity. Svelte is using the dollar sign ($) for reactive declarations to indicate
dynamic values that will rerender the component when state has changed.
Reusability. Components were easy to create, import and use in other files. For
me it was a similar mindset to React.
21
Figure 5: Home page, default theme Figure 6: Feed page, dark theme
In-depth Questions
22
Currently there are 628 GitHub open issues and 141 open pull requests. In
Stack Overflow, searching for questions with a svelte tag shows 1870 results.
• What are the functions and features of the framework?
In the test application I got to make use of Svelte’s lifecycle methods, reactive
declarations, syntax for conditional rendering, stores and contexts.
• What plugins are there and is the framework expandable?
Yes, there are a lot of third-party libraries and I added one for the loading
spinner and one for routing. Searching for svelte in the npm package library
shows 2929 results.
• Is it easy to work with and understand?
Even though Svelte was quite different from my previous experiences the
official tutorial made it easy to understand and learn. Learning curve was
gentle. I found it easy to get the project running and implementing the
specification.
• Is it fast to work with?
Yes. Developer experience was good but the website crashed from time to
time when reloading the page so I needed to rebuild the project.
• What disadvantages and advantages can you find?
Advantages: Easy and fast to learn. Small bundle size. Good examples and
tutorial on their official website. Simplistic and clear coding style.
Disadvantages: Still quite new and less resources than the other frameworks.
• Is it supported by your current development environment?
I had to install a plugin for syntax highlighting but other than that everything
worked fine.
5.2.4 Vue
This application was outsourced to another experienced developer. The Vue CLI
was used to initiate the project and you choose whether to use state management,
routing, stylesheet framework, linting, compiler and more. Folder structure was
also created by the CLI. The specification requirements were met, although the
styling looked a little different from my implementations the functionality was the
same. The built bundle size was 180 KB and took 1.2 seconds to build. For a
visual presentation of the application, see figure 7 and 8.
The feedback from the developer was that they felt it was a clear enough
specification to get a feel for the framework. It would be good to avoid unnecessary
styling and the instructions for the error handling felt a bit unclear. The time it
took to build the application was a bit longer than expected.
23
Figure 7: Home page, default theme Figure 8: Feed page, dark theme
Reactivity. Using Vue’s state and prop variables allows components to update
whenever some state has changed. In this test application states were held locally
at page level and passed down as props to the smaller components.
Reusability. A few components were made and easily imported and reused in
the page files.
Data handling. Two-way data binding is supported for input components. Data
was fetched in Feed page and kept in a local state.
State management. A store containing the states for the theme toggle was
created in this project.
Styling. Vue has a scoped attribute one can use to scope the CSS styling to the
file.
In-depth Questions
• How is the documentation and GitHub history or activity?
The documentation and GitHub history is vast and activities like pull re-
quests are regularly showing up. However since there is a new Vue version
rolling out (3.0) the version used in the application (2.0) does not have the
same frequency of pull requests opened. Currently there are 327 GitHub
24
open issues and 203 open pull requests. In Stack Overflow, searching for
questions with a vue tag shows 79 642 results.
25
React and Angular projects were already supported by my editor while I had
to install syntax highlighting plugins for Vue and Svelte.
Svelte had the smallest online community and React had the largest out of
the four frameworks. Svelte also had the fewest available libraries and packages
through npm, while React had the most. The Angular application was the only
one that did not use a third-party library for the loading spinner because of version
incompatibility.
26
6 Discussion
In these subsections I will discuss the results from the Interview study, Test ap-
plication design and Evaluation and finally some discourse on which framework
could be the better choice.
27
options to reduce the size. In terms of production build speed Vue was the fastest
with 1.2 seconds.
With Angular I experienced it was more difficult to adapt their principles
and also finding the right information, I wonder if that is because of my previous
experiences being used to finding information related to React. I did also encounter
a few community resource solutions that would not work in Angular because of
versioning. Overall, when you got used to their style guide it got easier but still
felt a little clumsy in comparison to React and Svelte. It was slow in building the
production build (19.4 seconds) and had the largest production build size. Angular
CLI solved a lot of boilerplate code which was quite nice though, it seems like it
could scale well when a project is growing.
Svelte was very easy to learn and fast to work with, it will be interesting to
see how it grows in the developer community. Even though Svelte is rather new
and does not have a big community like the other three frameworks I found all
the resources I needed to complete the test application design. Svelte was fast in
building the production build and was the build size was smaller than the other
three frameworks. For Svelte it would have been interesting to try SvelteKit, their
latest framework for building web applications, but it is in beta stage. Maybe
using SvelteKit would have resolved some of the reloading issues I encountered.
Since I did not implement the Vue application it was quite difficult to evaluate it
more than saying that it met the requirements. I did not get to know the functions
and features of the framework, but, I got to see the specification requirements met
and that could be a sign of the test application design being successful in the end.
For the specification, two-way data binding was not compatible with the theme
toggle input that was dependent on a global state. It could be a good idea to add
something to the specification that makes use of two-way data binding, perhaps a
form.
I chose not to add any code examples in the evaluation because of two major
reasons. The first reason is that I felt like the actual code is not the focus of the
thesis, rather more of a high-level evaluation of certain topics. The second reason
is that with front-end development there usually are many ways to solve the same
problems and with framework standards constantly changing it could mean my
solutions would be obsolete in the near future.
To me the test application design was enough to get a basic understanding of
the frameworks but there was definitely functions and features that I did not get to
implement. In combination with the in-depth questions from the interview study
I got a good understanding of their features, history and development activity.
For a bigger study, a more elaborate specification that implements more of the
framework features would be interesting.
28
6.3 Choosing a framework
Short summaries of the frameworks:
• React - Has the largest online community and strong backing. There are
loads of libraries, plugins and a lot of GitHub and Stack Overflow activity.
It ranked second place in satisfaction and first place in usage according to
the State of JS survey.
• Svelte - Has the smallest community. The framework is new and fast, pro-
duces a small bundle size and tutorials are thorough. Learning curve is
stable. Good for smaller projects but how will it scale in larger applications?
It ranked first place in satisfaction and fourth place in usage according to
the State of JS survey.
• Angular - Has a large community but ranked ninth place in satisfaction and
second place in usage according to the State of JS survey. It has a strict set
of rules and out of the four frameworks the only framework that enforces the
use of TypeScript. Angular has the most open GitHub issues.
• Vue - Has a medium sized community. It ranked third place in satisfaction
and usage according to the State of JS survey. Vue has the fewest open issues
on GitHub out of the four but the most open pull requests which could be a
sign of mature framework in development.
Most of the developers in the interviews wanted the freedom to have a smaller
framework with the opportunity to expand it with other plugins or libraries. Con-
sidering that, maybe Angular would not be the best choice as it comes with a lot
of strict rules. We can also see that it has lost popularity in the State of JS 2020
survey. Vue and Angular both have similar directives and component architecture,
maybe Vue could be the more up-to-date choice between the two. React wins in
the race of community support and available resources and could be the safest
choice ranking high on usage and satisfaction. Svelte is a new contender, maybe
more appropriate for personal or smaller projects since the community and online
resources still are rather small. Open issues on GitHub is rather high compared
to React and Vue that have been around for a longer time. The high satisfaction
score could indicate that it will grow larger and more stable in the coming years.
Comparing the results with related work in section 2.3 they seem similar. Ac-
cording to the studies, React was best in the performance but Vue suggested as
better when it came to documentation and learning curve. Another study claimed
Vue had a better performance and raised React for being more modular. In com-
parison Angular did not stand out in any of these areas which supports the drop
in satisfaction rankings. It will be interesting to see if Svelte will be included in
more JavaScript framework comparisons in the future.
29
7 Conclusion
This thesis has provided a set of questions, checklist and specification to investigate
frameworks. The suggested way to evaluate a framework would be to implement
the specification in appendix D together with researching topics in the checklist
and in-depth questions in appendices B and C.
Building the test application in the four frameworks React, Angular, Vue and
Svelte gave knowledge about the functions, features and developer experience. The
checklist and in-depth questions resulting from the interview study added to the
understanding of non-technical parts such as community resources and activity.
React seems to be a good and safe choice in regards to its community and online
resources size, in combination with the high ranking in developer usage and sat-
isfaction. Svelte has a gentle learning curve and is on the rise ranking at the top
of the satisfaction score but still needs more community support to grow in usage
and resources. Angular is still widely used but losing popularity in satisfaction
rankings and has a lot of open GitHub issues. Vue has some elements similar to
Angular but is ranking high in satisfaction and usage which could indicate that it
is a more appropriate choice if you want to use a similar framework with less strict
rules.
In the end, choosing a framework is about preference, experience and require-
ments. Each project needs to be evaluated on an individual basis. Hopefully this
thesis can aid in the choosing of frameworks.
• Investigate if there are other features that are important to test in addition
to the ones in this thesis.
• Outsource coding to more developers and collect more feedback about the
test application specification.
• Extend the size of the interview study and get more data from developers
with different experiences.
30
References
[1] Wanyoike M. "History of front-end frameworks";. 2018. Accessed on: 2021-06-
10. [Online]. Available: https://web.archive.org/web/20210611092309/
https://blog.logrocket.com/history-of-frontend-frameworks/.
[6] Stack Overflow Developer Survey 2020;. 2020. Accessed on: 2021-06-11. [On-
line]. Available: https://web.archive.org/web/20210609125451/https:
//insights.stackoverflow.com/survey/2020.
31
[11] "Design Principles - React";. Accessed on: 2021-06-11. [Online]. Avail-
able: https://web.archive.org/web/20210611081105/https://reactjs.
org/docs/design-principles.html.
[13] "Angular coding style guide";. Accessed on: 2021-06-11. [Online]. Avail-
able: https://web.archive.org/web/20210611081240/https://angular.
io/guide/styleguide.
[20] "Stack Overflow - Where Developers Learn, Share, & Build Careers";. Ac-
cessed on: 2021-06-14. [Online]. Available: https://stackoverflow.com/.
32
Appendices
A Interview Questions
About you
General questions
• What are you looking for in a new framework? What areas and what do you
want to work for you?
• If you find two or more similar frameworks, how do you compare them?
What are you thinking about when you hear these words:
• Powerful framework
• Fidelity
• Developer experience
• Versatility
How important are these for you when you choose a technology from 1-5?
• Versatility
• Debugging
• OS
33
• Developer Experience
• App quality
• Possible users
• Security
• Platform compatibility
• Easy to update
• Time to market
• Performance
• Community
• Documentation
• Easy to implement
• Fast to implement
• Reusability
B Checklist
Based on the interview study and results from the test app, these are some of the
following things to check when deciding on what framework to use:
Community
Documentation
GitHub history
GitHub activity
34
Support for multiple platforms
Plugins
Tutorials
Existing bugs
Size of framework
Articles
Debugging options
C In-depth Questions
• Is the framework mature? Are there no more major bugs?
• Is the framework still being developed? How many are working on it? What
kind of people are developing it? Are they close or dragging the framework
in different directions?
35
• Try implementing something, what works well? Is it fast to use? Easy to
work with?
– Links to Home and Feed page where Home is shown at root path (/)
– Theme toggle with theme value in a global state, available themes
should be default and dark theme
• Home Page:
– Title
– Logo of some sort
– Link to framework homepage
• Feed Page:
36
– Feed component consisting of image, title and id or likes
– Simple error handling, showing a text if data fetching request fails
– Data fetching from some open-source REST API should be paginated
and kept in a local state
– List of feed items with infinite scrolling and a loading spinner at the
bottom, spinner should be from a third-party library
– Routing/navigation library if not built-in
Other guidelines:
37