Rationale
React is the main frontend library we use.
The main reasons why we chose it over other alternatives are:
- It is Open source.
- It is a low-level library, meaning that is is highly flexible and powerful at the cost of providing too many different ways of doing things. This ends up impacting maintainability and standardization.
It has a big community supporting it, which makes it very reliable.
It has a big market, allowing us to easily find developers that have worked with it previously.
It provides a modern approach for implementing frontends using TypeScript.
Acquired knowledge can be also used on mobile projects using
React Native.
It implements
JSX, which currently is the best language for describing user interfaces.
Alternatives
Although Astro and NextJs feel like better candidates than React, they are not currently being used mainly due to:
- Using new frameworks/libraries makes it harder for developers to do their job, as it forces them to learn them, increasing cognitive complexity.
Increasing the number of frameworks/libraries we support, also makes our stack more complex.
Technical debt, as migrating a component from one library/framework to another is no easy task.
Astro
- It is Open source.
- It is a framework, meaning that it defines how to do things in a clearer way, improving maintainability and standardization at the expense of less flexibility.
- It offers a granular approach towards components, allowing to specify HTML and JavaScript on .astro files. This is highly useful for keeping a functional approach towards components.
It provides a modern approach for implementing frontends using TypeScript.
It has a considerable community supporting it, which makes it reliable.
As it is pretty new, finding developers with previous experience is harder.
It is focused on content-driven websites, which makes us wonder if it would be able to support application frontends like our
Platform's.
Astro looks like a very solid alternative for building content-rich frontends like:
- Website
- Development Portal
Next.js
- It is Open source.
- It is a framework, meaning that it defines how to do things in a clearer way, improving maintainability and standardization at the expense of less flexibility.
It provides a modern approach for implementing frontends using TypeScript.
It has a big community supporting it, which makes it very reliable.
It has a big market, allowing us to easily find developers that have worked with it previously.
It can be used for both content-rich and application frontends, making it more flexible at the expense of losing built-in logics.
Next.js looks like a very solid alternative for pretty much everything that is currently built using React, as it provides a middle ground between flexibility and simplicity. Angular
- It favors a object-oriented programming style, whereas we favor a functional-oriented one.
- Being a Framework, it forces us to do things in a way that sometimes differs from vanilla JavaScript, which increases cognitive complexity.
- It tends to release major versions that affect retro-compatibility, making it harder to keep updated.
- It has a smaller community compared to React.
Vue.js
- It tends to release major versions that affect retro-compatibility, making it harder to keep updated.
- It has a smaller community compared to React.
Usage
We use React for:
- Website
- Platform frontend
- Jira integration
- VSCode extension