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

And how do I build offline-first web applications with HTML over the wire?!? This whole HTML over the wire trick is actually pretty old and you can do some nice stuff with it, but it doesn't solve all the use-cases you can solve with with JS frameworks/libraries.

The big advantage I see for MVC applications, if that it is a well understood pattern. JS frameworks, on the other hand, come all ~3 years with some new innovative way to structure your code, while even the last approach isn't fully understood by many people.



I think you can run MVC applications locally just fine. Instead of shipping electron you'd ship a server runtime, and you'd access the application on localhost instead of in the web view of the electron app. Unless you're talking about PWA, but in theory you'd get MVC PWA apps that do that same (but you're right in that it's an endless cycle of distinctions without a difference in the JS ecosystem).


> And how do I build offline-first web applications with HTML over the wire?!?

I can't give you an perfect answer, because I am not aware of a practical example. But I think its quite doable. In a very naive way you can just store the results locally and use them when requested while offline. That potentially increases the storage size of individual items due to the HTML overhead of course. A fairly small app with little offline content could be quite simple. An advanced approach could be to push template parsing to the frontend. HTML fragments could use i.e. micro formats to retrieve data from the HTML and store it for later use. The question in this case how much logic you have to duplicate. I.e. template parsing should be very simple, unless you can share the template engine.


> An advanced approach could be to push template parsing to the frontend.

Sounds more like a JS view/vue ;-)

Sure, it is possible, but then you are probably better off using a proper JS framework with SSR (server side rendering) support.




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

Search: