You might have heard of LAMP/WAMP stack (Linux/Windows Apache, MySQL, PHP), MEAN (MongoDB, Express, Angular, NodeJS) stack and MERN (MongoDB, Express, React, NodeJS). The idea if stack acronym makes it easier to figure out what technologies goes together and has a community behind it. Therefore, I am proposing the PEKK Stack which we are using at Narbase.
The PEKK stack stands for PostgreSQL, Exposed, Ktor and Kunafa. Since 2016, we have been evaluating web technologies to choose a suitable stack for our development. But then everything changed when we found Kotlin. As we got to learn Kotlin more and more, we wanted to use it in all of our stack. First we started with Android, as most new comers to Kotlin start. Then we migrated our servers from PHP to Spring in order to use Kotlin. Long story short, we tried multiple server side technologies but finally settled on Ktor, the Kotlin framework by JetBrains. Also, after years of using MySQL, but think PostgreSQL has more advanced features than MySQL.
After we started using Ktor, it was an easy decision to use Exposed for DB operation, as it is also developed by JetBrains. We have to say that its fluent API is really enjoyable to use. The good thing about Exposed is that it does not force the developer to use ORM (but has a wonderful DAO) as it offers an expressive DSL for directly writing type-safe SQL. The only downside with Exposed is that it is still young and version 1.0 is not yet released as of the time of this writing, but the community is very helpful and Exposed is (mostly) easy to extend.
Lastly, we suffered quite a bit at choosing a suitable front-end web framework. JetBrains offers Kotlin support for React, and it is wonderful, but we really did not like the React way of doing things. If you like React, you might want to use React with this stack (and it will be the PERK stack 😁). We started writing vanilla Kotlin/JS for the web development. We liked how it works so we decided to develop a lightweight framework to make development easier, and then Kunafa was born. Its first draft was in 2017 and we started using it in production systems in late 2018. It it a young framework but we think it fits right with the Kotlin principles of fluency and pragmatism.
And that’s that. The PEKK framework is the only web stack we use now for our development. We encourage everyone who ever used Kotlin to give it a try as we think you will find much joy using it. There are special benefits when using a single language for the whole stack, and this stack delivers on these benefits.
Thank you for reading, and let us know what you think.