Technical Stack and Tools - rokanas/terminarium GitHub Wiki

This wiki page serves as an overview of the technical stack and tools used for the project and also elaborates on why these choices were made.

Table of contents

Wio Terminal

C++ - The programming language

C++ is a high-level cross-platform programming language. For the purpose of this project it is exclusively used in the Wio Terminal.

Why C++?

The team has opted to use C++ in the development for the Wio Terminal over other alternatives for a number of reasons:

  • C++ comes with a lot of advantages in terms of performance compared with other alternatives. Due to the hardware constraints imposed on development by the Wio Terminal using a programming language that facilitates performance was decided to be of value for the project.

  • The abundance of documentation, learning resources and libraries available weighs heavily in the favor of C++. Since most of the team have little experience in working with micro-controllers this was deemed to be an important factor by the team, as it would help us get started on development faster.

Arduino IDE - A highly compatible coding environment

The team has chosen Arduino IDE as primary code editor for working with the Wio Terminal. Thus, we have utilized it to write code in C/C++ and create .ino files as well as source (.cpp) and header (.h) files in service of developing the program sketch.

Why Arduino IDE?

  • Arduino IDE is used mainly because of its many essential features for working with micro-controllers such as the Wio Terminal being supported by default.
  • The official documentation for getting started with the Wio Terminal also uses Arduino IDE.
  • Arduino IDE offers a plethora of Arduino-specific libraries easily and conveniently installable from within the IDE platform. This also enables very easy downgrading and upgrading of board and library versions where necessary for testing and troubleshooting.
  • There is ample documentation and educational resources provided by the Arduino development community and even the IDE itself (in the form of example sketches), ensuring that learning to develop for microcontrollers is a smooth and productive experience.
  • Overall, Arduino IDE boasts simplicity, a clean user interface, and high compatibility with the hardware we are developing for.

Terminarium web app

JavaScript - The programming language

JavaScript is a high level programming language used mainly for web development. The Terminarium project makes use of JavaScript in both the development of the front-end and the back-end sides of the application.

Why JavaScript?

  • JavaScriptis a well established programming language used for developing web applications - thereby making it a prominent contender when deciding on the tech stack for the Terminarium web app. One major factor in the decision to use JavaScript was that we were interested in working with Vue.js which necessitates the use of JavaScript - for further elaboration on this choice refer to the Vue.js section of this page.

  • As a product of its wide adaption JavaScript is extensively documented and many learning resources for it exists. This was also taken into account when deciding on the tech stack.

  • Javascript is well suited for working with Firebase which also ended up being a factor in our decision to make use of it in the development of the web application.

  • There exists an abundance of libraries available for JavaScript, Chart.js being one example. Which the team took into account when discussing our choice of tech stack.

Vue.js - A Dynamic UI framework

Vue.js is a JavaScript UI framework. It allows developers to create interactive and dynamic web experiences. Vue.js uses a intuitive syntax and has a component-based architecture. The front-end of the web application is developed using Vue.js

Why Vue.js?

  • Documentation and onboarding: We opted to work with Vue.js because it has a relatively short learning curve (compared to React and Angular), making it easier for the team to get up to speed quickly. This quick onboarding was made possible by the Vue.js documentation. The comprehensive Vue.js documentation, provided by the official team, played a crucial role in our onboarding process. We used their guide which covers all the essential tools to build a Vue.js application. That and the abundance of other online material was a large contributor for the team to choose Vue.js.

  • Dynamic content and data: Vue.js is known for its ability to handle dynamic content and data. Its capability to display real-time data updates and dynamically update content based on variable states made it the ideal choice.

  • Peer recommendations: Vue.js was highly recommended by a team member who had some prior experience working with it. The team member argued for the benefits of the modularity that comes with component based development. That recommendation was re enforced by teaching assistants who also had spent time developing web applications with Vue.js. Having someone on the team who was already familiar with Vue.js allowed us to use their expertise to receive guidance and address potential challenges more effectively.

Chart.js - A JavaScript library for generating graphs

  • Chart.js is a JavaScript library used in the Terminarium web app for generating graphs for the purpose of displaying sensor readings.
  • This framework is deemed to be suitable for our purposes because of it being easy to integrate with the web application as well as having all necessary features, and because of how widely used and well documented it is.

Firebase Realtime Database - A Database Solution

Firebase realtime database is used in the backend for storing sensor data read from the Wio Terminal. The Firebase realtime database is a non-relational database which stores data as JSON.

Why Firebase Realtime Database

After the team had decided to make use of a database solution for storing and fetching sensor readings, we did research on suitable options and were presented with a plethora of available database solutions. The rationale for deciding to use the Firebase Realtime Database over other alternatives are outlined below:

  • Firebase Realtime Database is straightforward to set up due to the thorough documentation provided on the official website. - The database is cloud-hosted which negates the need for setting up the database on a server. In addition to this the spark billing plan allows us to use the Firebase database solution for no cost.

  • Firebase Realtime Database is suited for our current scope however it is also scalable in the case of the scope of the system expanding.

  • Furthermore Firebase Realtime Database supports real-time updates which we reasoned would be a useful trait for an IoT project such as the Terminarium system.

  • Peer recommendation: In addition to the previously mentioned benefits one team-member had previous experience with using the Firebase Realtime Database which also was a factor in our decision to use this specific platform.

Miscellaneous tools

MQTT - A messaging protocol

MQTT Is a lightweight and efficient network messaging protocol widely used for IoT applications.

  • The team is using MQTTfor sending and receiving messages between the Wio terminal and the web application. This protocol is deemed suitable for our purposes due to it's lightweight nature being of importance due to the hardware constraints imposed on the project by the Wio Terminal. Furthermore the publish subscribe architecture used by the MQTT makes it very suitable for our purposes due to it allowing us to separate the different sensor readings and other messages by topics in a straightforward manner.

  • Since it is very well documented and we all attended a workshop and a lecture pertaining to MQTT the team-members were able to get up to speed on using MQTT.