Preferred Programming Languages for OpenActive Tools
OpenActive's specifications are language agnostic so that they can be used by a wide array of different technologies.
However, for the tools that OpenActive maintains, like Data Model Validator, Test Suite, OpenActive.Server.NET, are preferably written in JavaScript/TypeScript or C# unless otherwise required.
Rationale
The languages chosen for use in OpenActive-maintained software are chosen due to their assets as languages and, crucially, their ease of use and popularity. Popular and easy to use languages lead to more and easier community engagement.
JavaScript/TypeScript
JavaScript is easy to write. It is the 2nd most popular language at its level of ease of use (where Python is 1st) (according to TIOBE, August 2023). But one advantage that JavaScript has over Python is its universal use in running in-browser scripts. This means that it is required at that end of the web stack. It also means that a large proportion of programmers who work across the web stack have some familiarity with it.
TypeScript builds on top of JavaScript, adding static typing. These types are very composable, which aids in the development of complex type ecosystems such as the ones created in OpenActive's specifications. Additionally, it is possible to use TypeScript to verify JavaScript programs via the use of JSDoc. This makes it possible to gain TypeScript's type assurances without having to convert from .js
to .ts
files.
JavaScript/TypeScript has a huge ecosystem of developer-maintained libraries, which also aids its ease of use as a language for getting things done.
It generally doesn't take long for programmers proficient in only JavaScript or only TypeScript to learn how to also use the other, which is why they are both included in the same section.
JavaScript/TypeScript (ideally TypeScript) is the preferred language for new OpenActive tools in general.
C# (.NET)
C# is in the top 5 overall programming languages in popularity (according to TIOBE, August 2023). With .NET, it gains a popular, expansive, well documented and mature framework.
C# is particularly popular within the UK fitness and leisure sector, which is why OpenActive.Server.NET, which serves as a base library from which fitness and leisure organisations may create their own OpenActive-conforming implementations, is written in C#. This way, it is easy to integrate with the organisation's existing software and expertise.
C# (.NET) is generally the most important language for new OpenActive libraries to support first.
Other Languages
OpenActive also maintains libraries written in other languages in order to more widely support the sector. These include:
Ruby. Example: https://github.com/openactive/models-ruby
PHP. Example: https://github.com/openactive/models-php
In each case, these were built to satisfy use cases found in the sector.
Last updated