Sparrow10

Ideas, drafts, and hacks

10 Jul 2022

Starting with Scala.js

Scala.js is an option for generating JavaScript code using the Scala programming language, with the benefits of a strongly typed system, functional and object-oriented capacities, and a great alternative to share code between the backend and the frontend of a web application. All this sounds great, but the Scala ecosystem is vast, sometimes you end up spending hours looking for what path to start with (I know this because I’ve done it, and it is crushing). So, I want to keep it simple, have fun and create some basic stuff.

To start, I’m reading the Scala.js documentation and the Li Haoyi’s book to learn the basics. I also have a couple of web app projects that I can use to move from using Python exclusively to having more real-world Scala experience.

Until now, it has been a playground for adding generated JavaScript files into an HTML template, and starting with canvases to display interactive stuff. I’m tempted to create a tic-tac-toe game, who knows.

That is all for now. If you want to read more about Scala.js visit the following resources:

See you in another post.