News for hackers. Stuff that matters.
Re:SPAs are harder and always will be (2013) by megaman22 on Wednesday January 17, 2018 @01:22PM (#16170314)
This is a horrific pattern - and I know because I've done it in some half-asssed jQuery/Razor/MVC projects in the past. As soon as things get more than the slightest bit complicated, this turns into a huge mess.

If you're building a SPA, and you need it to actually be a SPA, use a framework, don't try rolling your own mess.

Re:SPAs are harder and always will be (2013) by pqh on Wednesday January 17, 2018 @02:00PM (#16170671)
Indeed, code reuse, testing, maintainability, etc are harder with the latter pattern. And with the latter you also end up using at least 3 languages in the same files. It's just really awful.

Yes, browser-rendering SPA frameworks are heavyweight, but they give an undeniably-better development experience. And that shows in the quality of the interfaces created through them, assuming your interface requirements are complex enough to justify it. I mean, I'm happy with Hacker News' interface and it's simple, but if I'm building the next Google Calendar, I am not using ajax and server-rendered templates.