3 ms·
I had a blast building hn-books (http://hn-books.com http://hn-books.com) All static. I could have deployed the app on a thumb-drive. And it had advanced searc
by DanielBMarkham 14y ago
I had a blast building hn-books (http://hn-books.com http://hn-books.com)
All static. I could have deployed the app on a thumb-drive. And it had advanced searching, a book listing and recommendation system, a fully-configurable countdown clock for your startup, and a few other things. It got to the point that whatever I could imagine, I could imagine building it as a static site. And I would prefer doing so.
This is truly separating the view from the data. The same back-end services (for hn-books I didn't even have a back-end!) could plug into zillions of variously-looking front-ends. And as it turned out, the Query String was a heckuva lot more useful than I imagined when I started.
Neat stuff.
ADD: One more thing. If, like most folks, you have a class of data that doesn't change very often, say lookup tables or in hn-books' case the actual database, there's no reason you can't deploy that information as a static file as well. You can pull JSON just as easily from a static file somewhere as as server, and it uses a lot less resources. For my newspaper23 site, I used a combination: 4 times an hour I rebuild the database and deploy as a JSON. Then the clients all just pull from that file. When combined with a CDN this has tremendous scaling potential. And it's very simple to do. Why thrash the database every time somebody visits your site when it's just returning the same stuff?
- hunvreus 14y agoWe actually often deploy our front-ends on Github pages: it works great.
- hunvreus 14y agoI second the "ADD": Development Seed did something very similar on http://developmentseed.org/blog/2012/nov/29/open-undp-launches/ http://developmentseed.org/blog/2012/nov/29/open-undp-launch... and my friends at Wiredcraft are thinking about the same thing for a couple visualization websites (lots of map, lots of data, low amount of edits). Jekyll can be pretty damn slow though (especially on Github pages) so be careful with the size of your data set.