Hacker News new | ask | show | jobs
by mattmanser 2085 days ago
Do you know the meaning of 'static website'? In some ways your question is an oxymoron. You're misunderstanding the term and have asked a bit of a silly question by accident.

If you explained why you think it needs to be static, we might be able to explain what you've misunderstood.

Ultimately some part of your system will need to be dynamic to get the data and transmit it across the internet. A static website can technically use JavaScript to call a dynamic one using an API, and then display data, but part of the overall setup is still dynamic. A normal website is still involved, that has to talk to the db. The setup is just more complicated.

As for the actual question, pick any framework (Rails, Django, etc). Follow the tutorial for beginners, they cover how to access the db within an hour or so.

2 comments

> Do you know the meaning of 'static website'? In some ways your question is an oxymoron. You're misunderstanding the term and have asked a bit of a silly question by accident.

By that definition, any static website that uses Google Analytics is no longer a static website, as it's interacting with a database.

As you point out, a static website (one that is deployed as plain HTML and some css / js / image assets) can be part of a larger ecosystem.

So maybe tone down the noob bashing...

You can still go hybrid. Majority of site is static but for some pages you have services that touch db.
How is that 'hybrid'? We've been doing exactly that for literally 20 years. How do you think all the pages like "privacy" or "terms and conditions" or the countless other non-dynamic pages are done?

It's just a website. Doesn't need anything fancy to do it.

Honestly, makes me despair at how over-complicated people make really basic stuff.

Its hybrid because you use 2 separates tools/languages/systems to create parts. You use something like jekyl for static parts and something like node to create services that require dynamic stuff.

Yes, we did it for decades but within single framework such as ruby on rails. This is somewhat different although end result looks the same.