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

Isn't it simpler though to just use static HTML + optional Javascript (like we used to in the 2000's eg. progressive enhancement years)? I mean why use M-V-whatever for content-driven sites at all?


Maybe I'm mis-understanding but it sounds like your talking about something entirely different?

Some sites just wouldn't work well with HTML+optional JS. Google maps (IMHO) would not work well that way, so using an offline-oriented model would make better sense.

That being said, if your a news site, or a blog, yeah, a simple static page is probably a better solution.


Of course true webapps can benefit from an MV* approach (like enterprise-type LOB apps). But gmaps IMHO isn't a good example, as it isn't MV*; rather, it fetches prerendered bitmap or vector graphics from the server.


(2012)

The article is older but the advice is sound: only reach out to the server when you need to and ensure your client-side state doesn't break when you can't.

It's a little strange that they avoided naming any JS MV* frameworks even though some where out by then -- Backbone, Knockout, Ember, Angular, if I recall. But this article makes the point that all future JS MV* development went on to consider best practice in the years to follow.


Why is it strange? If one starts naming frameworks, one's blog post would be outdated by the next week.

- only slightly sarcastic.


Depends, if you are content-driven and can generate and cache static HTML and that's all you need I say hell yes, send that only, give it an e-tag, call it a day. ezpz. I gave benefit of the doubt to the author though and imagined an application that utilizes a decent amount of data that changes fairly frequently. In this case I can see the want for reducing the actual data sent over the wire and moving to a microservice infrastructure for the data with minimal logic server-side.


I didn't mean to refetch HTML partials. You can still re-fetch JSON and render it on the browser eg. what jquery web apps did, and mostly do still (even though less prominently featured on HN).




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

Search: