Business and UI code are written in Typescript

Last modified by Vincent Massol on 2024/02/26 16:19

The product for which the ADR is for
Cristal
The decision taken

Business code and UI code are all written using Typescript.

23/10/2023
The context in which the decision was taken

The language used to implement the business logic of Cristal (not just the UI part).

List of alternatives with pros and cons
  • Typescript
    • Pros
      • Typescript is a superset of Javascript, bringing structural type annotations to the language. It allows to write type-safe code by design, preventing most type-related mistakes directly from the build phase. It also overall enhance Developer Experience when using a fully fledged editor (like VS Code or IntelliJ IDEA), through educated autocompletion.
    • Cons
      • New language to learn
      • More memory required by the user on his/her computer
  • Javascript
    • Pros
      • No compilation needed, native to the Browser
    • Cons
      • More error prone
      • More memory required by the user on his/her computer
  • Java
    • Pros
      • More known to the XWiki dev team since XWiki is written mostly in Java
      • More structure, stronger development tools and practices
      • Less memory required by the user on his/her computer
    • Cons
      • Harder to write an offline version of Cristal since it requires a JVM running on the user's machine, while Javascript/Typescript run in the browser VM directly
Links to related URLs, including the forum link where the decision was taken
What are the consequences of that decision. This is to be amended across time, the rest should not be touched anymore once the decision has been taken.
France 2030 Logo

This project is being financed by the French State as part of the France 2030 program

Ce projet est financé par l’État Français dans le cadre de France 2030

  • Powered by XWiki 17.10.9-node1. Hosted and managed by XWiki SAS

Get Connected