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

> AND they don't act as if there wasn't a network in between

…But there is a network in between. I'm not sure why pretending there isn't can somehow make a system less complex.

Furthermore, how do you write automated tests for your modals and slide-out panels? Your test suite needs to essentially run a browser. This is absolutely more complex than having an application on the server compute the document that the client expects.



> But there is a network in between

That's exactly my argument...? Seems to be a misunderstanding.

> I'm not sure why pretending there isn't can somehow make a system less complex.

Yes, that is exactly why pre-SPA web programming was more complex.

> Furthermore, how do you write automated tests for your modals and slide-out panels? Your test suite needs to essentially run a browser. This is absolutely more complex than having an application on the server compute the document that the client expects.

How do you test that the HTML/JS generated by the server actually show a modal? At least with libraries like React you can test everything up to the actual CSS engine. And no, you don't need a browser for that.


I don't think either of us are going to convince the other. I've built large, complex systems with both approaches, and I'm assuming you have too.

> How do you test that the HTML/JS generated by the server actually show a modal?

You can test for the existence of markup on page load. You can't test that some JavaScript for displaying a modal has run without running a JavaScript runtime, i.e., a [headless] browser.

In most cases, just loading a page which displays the appropriate information for the user is cheaper to test and implement, and usually is a better experience for the user also. It depends of course — this would not be true of an application like Google Maps. Most web applications aren't Google Maps though.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: