Skip to content

Commit da74661

Browse files
committed
docs: add extra info about technical decisions (react, python)
1 parent 0d15f4d commit da74661

File tree

7 files changed

+139
-4
lines changed

7 files changed

+139
-4
lines changed

decisions/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

docs/decisions/0003-react.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Use React as our main frontend library
2+
3+
## Context and Problem Statement
4+
5+
At HOTOSM we mostly develop web applications, which require a frontend
6+
component.
7+
8+
We need to balance:
9+
10+
- Complexity / learning curve.
11+
- Existing knowledge of staff.
12+
- Knowledge of key contractors for various tools.
13+
- Performance.
14+
- Existing library support (community & ecosystem).
15+
- Scalability & maintainability.
16+
17+
## Considered Options
18+
19+
- Angular
20+
- Vue
21+
- React
22+
- Svelte
23+
- Solid
24+
- Qwik
25+
- Vanilla JS + Web Components
26+
27+
## Decision Outcome
28+
29+
This decision was made many years ago (~2018) with the introduction
30+
of Tasking Manager v3.
31+
32+
The decision was to use React, as that is where the industry was
33+
centered around at that time.
34+
35+
Due to technical debt, skills / knowledge with React within the team, and
36+
with various contractors, this decision has been carried forward into
37+
future projects, in an attempt to standardize:
38+
39+
- The learning curve / pool of experience.
40+
- Speed and ease of setting up new projects.
41+
- Avoiding the churn of frontend libraries: contractors must use React.
42+
43+
This decision still stands as of 2025, however, it is becoming
44+
[increasingly apparent](https://www.zachleat.com/web/react-criticism)
45+
that this should be revisited in the near future.
46+
47+
There is also the higher level discussion for
48+
[if we need a frontend framework at all](https://infrequently.org/2024/11/if-not-react-then-what),
49+
as much of our functionality could be implemented with simpler HTML-first
50+
technologies such as HTMX, with
51+
[progressive enhancement](https://www.gov.uk/service-manual/technology/using-progressive-enhancement).
52+
53+
As a result, some flexibility is possible to choose more suitable tools for
54+
newly started projects.
55+
56+
### Consequences
57+
58+
- Good, the many people have React experience. It broadens the pool of available
59+
contractors, and fits well with existing skills in the team.
60+
- Bad, because performance is superceded by frameworks that do not rely on the
61+
virtual-DOM, such as Svelte and Solid.
62+
- Bad, because React is not as user friendly as it claims to be. It's far easier
63+
to write bad React code, in comparison to frameworks like Svelte.
64+
- Bad, because this unfriendliness to new developers does not only affect performance,
65+
but also extends to the code complexity and ease of understanding / onboarding.
66+
- Bad, because we don't necessarily need a web framework for all our tools!
67+
We could probably build more resilient code using HTML with progressive enhancement.

docs/decisions/0004-python.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Use Python as our main backend language
2+
3+
## Context and Problem Statement
4+
5+
At HOTOSM we mostly develop:
6+
7+
- Web applications.
8+
- Data processing pipelines.
9+
10+
We need a backend language that is:
11+
12+
- Beginner friendly, allowing for easy community contribution.
13+
- Simply and quick to develop with, making us responsive when needed.
14+
- Reasonably performant.
15+
- General purpose, allowing us to achieve lots with the same skillset.
16+
- Good existing library support, reducing code duplication.
17+
18+
## Considered Options
19+
20+
- Python
21+
- Golang
22+
- Rust
23+
- C++
24+
- JavaScript
25+
- Java / Kotlin
26+
27+
## Decision Outcome
28+
29+
Python was chosen as the best compromise across all languages listed.
30+
31+
JavaScript would have the benefit of keeping our stack to a single language,
32+
however, it is doesn't have great performance. It is also more complex than
33+
Python, particularly when it comes to asynchronous programming.
34+
35+
Rust and C++ are too low-level and complex for our use cases (unless a specific
36+
performance critical need arises).
37+
38+
Golang is an excellent beginners language, however, may be slightly too low-level
39+
to recommend it to everyone (requiring knowledge of pointers etc). It's a good
40+
choice for specific cases, but library support is also lacking.
41+
42+
Java is popular because of historic use, and is still arguably a good language,
43+
however it's pros do not outweight the cons when compared to more modern
44+
languages such as Golang or Rust.
45+
46+
### Consequences
47+
48+
- Good, the many people have Python experience. It broadens the pool of available
49+
contractors, and fits well with existing skills in the team.
50+
- Good, because it's the most versatile language listed as of 2025, including
51+
excellent support for Web APIs, Machine Learning libraries, backend processing.
52+
- Good, because it's very intuitive and simple to learn, often being a great first
53+
language to learn for junior developers.
54+
- Good, because of a huge amount of existing libraries in Python, meaning we have
55+
to code less!
56+
- Bad, because we use separate languages for frontend / backend development.
57+
- Bad, it's not the most performant language of the bunch, particularly due to the
58+
Global Interpreter Lock.
59+
- Bad, because far from perfect dependency management (which might be solved
60+
with the advent of <https://github.com/astral-sh/uv>)

docs/decisions/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Architectural Decisions
2+
3+
Markdown Architectural Decision Records documenting the technical decision
4+
taken across HOTOSM projects.
5+
6+
These decisions are advisory, with some scope for variation in projects if
7+
specific requirements arise.

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ nav:
140140
# - Cheat Sheet: dev-guide/containers/containers-cheat-sheet.md
141141
- Local Kubernetes: dev-guide/containers/kubernetes-local-kind.md
142142
- Production DB: dev-guide/containers/production-db.md
143+
- Tech Decisions:
144+
- React: decisions/0003-react.md
145+
- Python: decisions/0004-python.md
146+
- API Documentation: decisions/0002-mkdocs.md
147+
- Technical Diagrams: decisions/0001-draw-io.md
143148
- DevOps:
144149
- Reusable Workflows: https://hotosm.github.io/gh-workflows/
145150
- Our Development Practices: dev-practices.md

0 commit comments

Comments
 (0)