Published:

Journal 1: Looking back at refactoring Kommis, Plotly.js and teaching

This journal entry is about

  • me looking back at refactoring the SaaS product Kommis
  • my contributions to the charting library Plotly.js
  • a new semester teaching dynamic web programming
  • and what’s next in the coming weeks.

Looking back at refactoring Kommis

This week I finished refactoring the Kommis web application. It’s a tool for hotel restaurants to create table plans. Up until now a lot of hotels do their table plan with pen and paper, sometimes with Excel lists. Kommis is an early stage software-as-a-service (SaaS) product. I like that it’s laser-focused on a tight niche. It is one of those ideas a technician won’t come up with easily. But once you understand the problem, it becomes very clear how much sense it makes.

Anyways, from a technical perspective I really loved to work on the product. The basis was a prototype application built by the founder himself. When he reached out to me in spring 2018, the app’s biggest obstacle was that for each additional customer application code had to be written. And on top of that a separate instance of the application was running for each customer. So the main goal was to refactor the code base to be a multi-tenancy application with which new customers could be onboarded without writing any new code.

I kept going with node.js and express on the back-end and Angular in the front-end. However, a major change was migrating away from MongoDB, using PostgreSQL instead. After quite some research and analysis I came to the conclusion that a relational database better fits the nature of the data model at hand (main entities heavily relating to each other and therefore the need to join entities which isn’t really the greatest strength of document oriented DBs like MongoDB).

I’d also like to mention the roadmapping project we did before the real refactoring. This paid mini-project allowed me to do (i) a thorough analysis of the main challenges, (ii) develop a roadmap to overcome these and (iii) give a more or less accurate estimation. Roadmapping reduces risk for both sides (developer and client) and it’s definitely worth to continue offering it to prospects before jumping into a big project right away.

From a refactoring point of view, we definitely accomplished the main goal (multi-tenancy) and I believe I managed to make the app better from a user’s perspective. It was my first time using TypeScript and I really enjoyed it. Especially due to my work on Plotly.js, which is a huge JavaScript (ES5) repository, I got to see how much types help to maintain bigger code bases. I always knew that and I definitely felt the pain at times when working on Plotly.js (plain ES5) in the last months. But using TypeScript in parallel at the same time just made this even more apparent to me.

Using Heroku for the first time for a production app is another positive experience to mention. I can really recommend using it in the early stage of a startup when you usually don’t have someone in the team experienced enough to host (and secure) your own servers. Pretty every aspect of running a web application is covered. Quite good documentation. Rolling back to older application releases when something went haywire, backup and restore out of the box with their PostgreSQL add-on, custom domain names, HTTPS out of the box and so on. I’d say Heroku is a rock-solid base to start from.

Other stuff the last months

Besides a few small things for long-term clients, I’ve done quite some work in Plotly.js. The most notable feature being click-to-select. Before, users were only able to select data points in charts via drawing polygons or rectangles. Now they can also click to select a data point. It’s a feature a lot of developers had to built on their own up until now. Introducing this feature will definitely save valuable developer time. It’s a good feeling to know that your work is gonna save people some time and headaches.

What’s next in October

Last week another semester started in which I teach dynamic web programming at FH Joanneum, University of Applied Sciences. The course consists of lectures and exercises. Today will be the second lecture, tomorrow the second set of exercises. I almost finished preparing the lecture (it'll be about GETting data in the web). For the practical part, I’ve got to rewrite the exercise sheet because I am going to change last year’s homework.

So far the second homework’s aim was that students practice the naming (and development) of resources (primary, list, filter resources). However, the objectives of the homework turned out to be too blurry. So this year I’m going to prepare a more concrete statement of work. Students will probably get a text file with all Game of Thrones characters and I’ll define the requirements for a simple service to search through these characters.

After that there will be a four week pause from teaching. There are some smaller requests in the pipeline, but the main focus will be on Plotly.js stuff.

Published by Robert Möstl

« Back to Blog