Development stack - seinecle/QualityOfLife GitHub Wiki
For this project I will try to follow several pieces of advice given by Pieter Levels in his book:
-
stay away from complex web frameworks and shiny build tools
-
automate when you can
-
provide a perfect UI / UX to your users
I develop in Java, and I have very little patience when it comes to css and JavaScript. So my stack will look like:
I will use hetzner small virtual servers: 1 core, 2Gb of RAM, 20Gb of disk. 2.95€ / month.
One server per service.
Angular. Yes it is a framework… but it will provide clean UI out of the box, I can’t do the css myself. The local dev is easy and pushing updates on the server is a simple SCP command (more on that later). Angular seems a simple choice, but I used to develop frontends with JSF (server-side generated html pages), so that’s a big difference.
Will use Payara micro, a lightweight Java app server (70Mb) with no config and still big capabilities. It is a standalone file (!), and you just put your app next to it. Nginx in front of it.
The goal is to get rid of the complex processes I am used to and which is a key reason why I don’t maintain my projects: pushing there, updating libraries there, reloading this config file there… arghhh!
I tried Docker which promises "package once, deploy everywhere". But I ended writing long Docker config files and managing subtle diffs between local and remote contexts (like http locally, but https remotely). So in the end Docker was overkill and didn’t suppress the config / scripting boilerplate it was supposed to remove.
So, instead of Docker:
-
SCP to move front end files to the server
-
A series of SCP and SSH commands to send the new versions of backend services to their respective servers, stop current apps and reload the new versions. This is were things usually get boring and dirty. So…
-
Automation of SCP and SSH commands via a local Java app, using SSHJ. I think this could be a killer automation step: just have pre written scripts launched for deploying to production. I would also use it to automate the setup of servers, as I always follow the same series of steps.