Hacker News new | past | comments | ask | show | jobs | submit login

As an experiment, I started https://wordsandbuttons.online/ in plain hand-crafted HTML+CSS+JS (JS for the interactive bits only). Every page is self-sufficient, there are no dependencies, no dynamic data exchange, no HTML generators, - nothing. And it works so well, I don't really want any frameworks now.

It's perfectly malleable - I can make every page do exactly what I want it to. It's lean and fast - every page even with all the interactive plots, games and quizzes, and syntax highlighting, is still under 64K. And it doesn't accumulate technical debt. There are no dependencies, even within the project. An occasional bug from the past wouldn't bite me in the future.

At the beginning, I thought that typing the HTML by hand would be too tedious. But it's not. It is a bit boring, sure, but it's only like 5% of all the work so usually I don't really want to automate it.

And when I do, I just write scripts that handle HTML just like any other text. Works wonders for me.




It is truly astonishing how much people believe that they need frameworks.

Your site looks nice, but one comment I'll make about your coding style is that you (or anyone getting inspired from your code) should probably switch away from innerHTML as the default choice for DOM modification. In a lot of otherwise useful contexts it is an HTML injection hole. (For the record it doesn't seem to be a security issue for the kind of content you have made, but better kill the habit before it becomes a problem.)

For a while I used document.createElement and friends to generate injection-free DOM, but that style takes a lot more typing than innerHTML usually does. Eventually I made a tiny library for easing the job, and I haven't looked back since. I don't think anyone else uses it, but so far it is definitely worth it for the one happy user. https://github.com/NoHatCoder/DOM_Maker


I did something very similar back in 2006: https://programming.arantius.com/dollar-e


Good point! Thanks!


When you're making a site like yours (which is awesome btw) hand-coding HTML and JS works fantastically. You don't need a framework. Frameworks only really start being useful when you're working at scale either across lots of data-driven pages or with multiple developers on the same product.


Yes, that's true. If you have lots of work to automate - sure, you need something to automate it.


Congrats for this simple and beautiful website!

I wonder how you manage your overall style, though. Is your design set in stone, do you never change it or fix quirks? If you e.g. change from GitHub to GitLab, would you edit the footer of every single page?

One small suggestion: Please advertise your RSS feed to the browser using the <link rel="alternate" ...> tag. Ideally on every page. Otherwise, visitors of your blog articles (like myself) get the wrong impression that you don't provide a feed, until they go back to the main page and scroll down to the bottom.


As an aside, I like your blog and writing style, and the questions dropped in to make it interactive. COBOL ... I got that one. Funny!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: