Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How to write imageboard

Name: Anonymous 2010-08-28 20:32

Hello,
I found out that kusaba x is pretty old shit. What's this whole think about generating html files? Can't it be done simply by sql queries every time and do it with some ajax? How would you write it?

Name: Anonymous 2010-08-31 0:18

>>22
Explain to me how hitting the database and recreating exactly the same content repeatedly, slowing down the speed at which pages can be served by at least two orders of magnitude, is in any way smarter or better than writing out an html file and then letting the web server serve static files, a very simple task, one which over many years has been carefully studied and highly optimized much more than anything else in the same problem domain.

If you're just going to be putting a caching proxy in front of it anyway, why not just open an html file and cut the middleman. You're outputting precisely the same data, no matter how or when you generate it; the only difference from the perspective of your script is where you send it -- to a file, or directly to the client. Except, in the latter case, you're also adding another process and pointless complexities of having to maintain a separate caching system when a filesystem would work perfectly fine and with ultimately less effort and higher efficiency.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List