Chapter 5

Getting Started

Supporting tools and technologies that we use to track our project and support development practices. Programming language topics, frameworks and libraries are not included here, but will be discussed in lectures.

Subsections of Getting Started

Overview

You are restricted to the following technologies in your project.

  • Required means that you must use a particular technology (e.g. you are not allowed to skip Kotlin and write your application in Javascript).
  • Recommended means that we think this is a good choice. Often this is the technology that we’ll discuss in-class. You can choose to ignore our advice and pick out something else comparable if you wish, but you are still responsible for meeting requirements (e.g. “I couldn’t get Eclipse to work” is not a valid excuse for not meeting requirements).

The versions here are the minimum versions that support features that we will discuss in-class. You are welcome to use more recent releases.

Category Technology Required Recommended Notes
Project Repository GitLab X Your project source code and other must be stored in your team’s GitLab project.
Programming Languages Kotlin 1.8+ X Kotlin can be used for the entire application stack: front-end and back-end. It can also be used for cross-platform desktop or native Android development.
Java JDK 17+ (X) JVM is required if you target desktop clients.
Android SDK 33 (X) Android SDK is required for Android native applications.
Build System Gradle 8+ X You must use Gradle for building and packaging your application.
Unit Tests JUnit 5 X You are expected to write unit tests in JUnit for all most of your code.
Dev Environment IntelliJ IDEA X You can use any editor you wish, but IntelliJ IDEA has the best support for Kotlin by a significant margin, and the Community Edition is free/OSS. Recommended.
Android Studio X Recommended for Android development (IDEA can also work).
Networking Library Ktor X Used for networking and managing remote service requests.
UI Toolkit Compose X Can target Windows/macOS/Linux desktop, or Android. Alpha support for iOS/wasm.
Database SQLite or H2 X Required for persistance on your service. Can also be used to store local/client data and settings.
Containerization Docker X Your service must be in a docker container, stored on Docker hub (so that we can run it easily).
Hosting AWS, GCP, Azure X For a higher grade, you can host your service on a cloud service provider (e.g. AWS, GCP, Azure).

Installation

We will be building Kotlin applications and services, and using the Java JDK as our deployment target. This means that you need to install the Java JDK and the Kotlin compiler on your development machine. It’s also highly recommended that you install the Intelli IDEA IDE for working with Kotlin, as it offers advanced language support and integrated well with our other tools and libraries1.

Check the Course-Project/Technologies page for the recommended version numbers. Also, make sure that you and your team all install the same distribution and versions of these tools!

The following represents the minimum toolchain for the course.

Git

We use Git for version control, so you will need Git installed to perform operations on your source code.

Git is pre-installed on macOS and Linux; Windows users can install it from https://git-scm.org. Once it’s installed, you may need to update your path to include the Git installation directory. You can check your installation using the git version command.

❯ git version
git version 2.37.1 (Apple Git-137.1)

Java JDK

  • Download and install the JDK from Azul or OpenJDK (make sure to match your system architecture).
  • Add JAVA_HOME to your system’s environment variables, pointing to this installation.
  • Update your path to include the directory containing the Java executables.

For example, I am using JDK 18 (at the time I’m writing this). I have the following lines in my .zshrc:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-18.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin

You can check your installation using the java version command. Make sure the version matches what you expected to see.

$ java -version
openjdk version "18.0.2.1" 2022-08-18
OpenJDK Runtime Environment Zulu18.32+13-CA (build 18.0.2.1+1)
OpenJDK 64-Bit Server VM Zulu18.32+13-CA (build 18.0.2.1+1, mixed mode, sharing)

IntelliJ IDEA

IntelliJ IDEA is our recommended development environment. You can install it from https://www.jetbrains.com/idea/download/.

There is an Open Source Community version which will work for this course. There is also an Ultimate license, which includes better support for databases, web services and other frameworks that we’ll be using. This is normally a paid upgrade, but as a student you can get a free license2 to most of thier products, including this version of IntelliJ IDEA.

You can check the installed version by opening IntelliJ IDEA and looking at the IntelliJ IDEA - About dialog.

About Dialog

Kotlin

We will need a Kotlin compiler, and the Kotlin standard libraries. IntelliJ IDEA includes a Kotlin plugin, so if you have installed IntelliJ IDEA and you are working from the IDE, then you do not need to install Kotlin.

However, if you wish to compile from the command-line, or use a different editor, then you will need to install Kotlin manually. It can be installed from https://www.kotlinlang.org or from most package managers (e.g. brew install kotlin if you are a Mac user with Homebrew installed).

If you install the command-line version, you can check your installation using the kotlin -version command.

❯ kotlinc -version
info: kotlinc-jvm 1.8.20 (JRE 18.0.2.1+1)
Info

There are other libraries that are suggested on the Course-Project/Technologies page e.g. Ktor, Exposed, JUnit. You do NOT need to manually install any of these! Early in the course we will discuss Gradle, our build system, which has the ability to import these libraries into our project automatically. It’s much easier than trying to manually manage all of the dependencies!

As long as you have installed Git, Java/JVM, Kotlin, and have an editor/IDE setup, you can start working on your project.


  1. Kotlin is supported in other editors, but make sure to install the appropriate language plugins for Kotlin, and Gradle. ↩︎

  2. https://www.jetbrains.com/community/education/#students ↩︎