Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a blog. The page text for a given url is always going to be the same! Why introduce all this overhead, and needlessly complicate something simple?


Well it seems your opinion is already made but there are a few reasons why this architecture is gaining in popularity:

- Faster loading time. For most users, the bottleneck is the network and a JSON payload is typically a lot smaller than a fully rendered HTML page. This reduces the overhead (unless your users have crap CPUs and fast network connections - not the norm).

- Better separation of concerns. Your server becomes a dumb API and doesn't need to concern itself with presentation. Your UI can live in an entirely different repository and it doesn't matter which framework or language your backend is written in. Front-end developers only need to know about browser technologies (HTML/CSS/JavaScript) to build the UI. This reduces complexity instead of "needlessly" increasing it.

- Thanks to server side Javascript, it's relatively easy to have a fallback mechanism in place to do traditional server side rendering for web crawlers or browsers with Javascript disabled.


Of course, in theory, web pages are supposed to have this separation of concerns, which allows for faster loading, and of course server side rendering of web pages is very, very well supported.




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

Search: