4 ms·
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 slig
by megaman22 9y ago
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.
- pqh 9y agoIndeed, 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.