Live data from Hacker News

Offline First – A Better HTML5 User Experience

joelambert.co.uk

1–10 of 150 posts

Re: Offline First – A Better HTML5 User Experience

#5
post #3

I sense a trend of trying to cram everything good about native apps onto the web. Do people who do this stop to think whether the web is actually the correct platform for their app?

My feeling is more people need to stop and think "Why isn't this just a website".

Re: Offline First – A Better HTML5 User Experience

#6
post #3

I sense a trend of trying to cram everything good about native apps onto the web. Do people who do this stop to think whether the web is actually the correct platform for their app?

If you need to build cross-platform apps - and that is mostly the case nowadays - the web is actually not such a bad solution. I mean, what is the alternative?

Re: Offline First – A Better HTML5 User Experience

#7
I see the author's vision, but I have to say that I still favor progressive enhancement over this. Using javascript only assumes a lot about the user even in this modern age of web development.

Also as a nitpick, I would say don't make your data objects SINGLETONS, make them SINGLE INSTANCE.

EDIT: someone deleted their comment but brought up a good point that you can have progressive enhancement with this. Yes, however the author made it clear he favors the JS or nothing approach. And there's even this snippet:

>An offline first approach would be to move the entire MVC stack into client side code (aka our app) and to turn our server side component into a data only JSON API.

Re: Offline First – A Better HTML5 User Experience

#9

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?

(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.

Re: Offline First – A Better HTML5 User Experience

#10

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?

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.
Post reply on HN