Posts » The way I build software
Throughout my career in IT I built software for the Web in many different ways - in HTML, (sadly) in PHP, (also sadly) as Flash animations, JSP pages, then MVC apps in Struts and Spring (Java days), Rails and Sinatra (Ruby days), countless Node.js frameworks, and eventually in Phoenix (Elixir days). I’ve seen a lot of different approaches, ones that worked well and others which were JavaScript-only single page applications ;-). It’s been over 15 years now and I think I have finally settled on what works best for me.
So these days I follow the following set of rules:
- I work exclusively with Elixir and Phoenix for building APIs or web-based apps;
- I build everything as plain HTML sprinkled with JavaScript for interactivity;
- I inline all JavaScript below HTML content;
- I inline all CSS above HTML content so once the latter hits the browser it’s already styled;
- I link all images at the end of HTML documents so they won’t block content from showing up fast;
- I use brotli/gzip compression as the only optimization.
That’s it. Browsers are very good at rendering almost-static HTML and this stack leverages it perfectly fine.
I am happy to be able to choose the way I do things, as my clients trust me to solve their business challenges in the way I want.
I cannot see myself leaving it for anything else.