by simias · 6y ago · 0 comments
It's the simplest thing in the world, basically just three columns with photo thumbnails and the only javascript is some simple image viewer to display the images full screen when you click the thumbnails.
It's really, really basic but I was impressed with the feedback I received from it, many people were impressed by how slick and fast it was. And indeed, I went looking for professional photographer websites and indeed, what a huge mess most of them are. Incredibly heavy framework for very basic functionality, splash screens to hide the loading times etc... It's the electron-app syndrome, it's simpler to do that way so who cares if it's like 5 orders of magnitude less efficient than it should be? Just download more RAM and bandwidth.
Mine is a bunch of m4 macros used to preprocess static HTML files, and a shell script that generates the thumbnails with image magic. I wonder if I could launch the new fad in the webdev community. What, you still use React? That's so 2019. Try m4 instead, it's web-scale!
[1] I actually use this one and it's just fine - great, in fact - but seeing M4 does make me feel like a lot of people may have spent a lot of time reinventing a wheel.
M4 is old and clunky but it gets the job done without having to install half a trillion Node.js dependencies. I also know that my script will still work just fine 5 years from now (or even 50 years in all likelihood).
That being said, don't trash your favourite JS framework right away, while m4 is perfectly fine for simple tasks I don't even want to imagine the layers of opaque and recursive macros you'd end up having to maintain for any moderately complex project. It's like shell scripts, it's very convenient but it doesn't really scale.
Sadly this holds to an unexpected degree for Mustache.
[1] - looks like a DOM AST + Javascript to me, quite unlike template