Live data from Hacker News

The viability of JavaScript frameworks on mobile

joreteg.com

1–10 of 85 posts

Re: The viability of JavaScript frameworks on mobile

#3
With Microcosm we consciously chose to go the other direction: Do the work server-side and serve HTML.

Basically... the old way of doing things.

An example site https://www.lfgss.com/ is 280KB on first load (and most of that is Mozilla Persona) and subsequent requests are usually around 10KB.

Even though that company is now dead, I'm still working on it and aim to strip out Persona (it's deprecated) and to set a first load goal of 100KB (which should be easy to achieve).

People should feel the power of their devices, and the only way to do that is to have those devices do less, not more.

Re: The viability of JavaScript frameworks on mobile

#6
post #3

With Microcosm we consciously chose to go the other direction: Do the work server-side and serve HTML. Basically... the old way of doing things. An example site https://www.lfgss.com/ is 280KB on first load (and most of that is Mozilla Persona) and subsequent requests are usually around 10KB. Even though that company is now dead, I'm still working on it and aim to strip out Persona (it's deprecated) and to set a firs…

In terms of interactivity this probably only works for the most basic stuff. Also, only for the apps that need to be "always connected" anyway.

Re: The viability of JavaScript frameworks on mobile

#7
I think a lot of developers wanted mobile web performance to catch up with desktop and mobile native that we believed it would happen, and much faster than was ever really likely. We're used to things getting better quickly when it comes to technology.

Flagship phones improve things a little each year, but to quote William Gibson, the future is here, but unevenly distributed.

Re: The viability of JavaScript frameworks on mobile

#8
post #2

Rule #1 for optimisation: "You can't make code run faster. You can only make it do less." It's true for mobile devices as much as everything else.

Fortunately a lot of what these libraries do is spin bloated wheels so there is a lot of opportunity to do less without losing features. This is why I write mobile web apps with vanilla JS only. It takes a little more time up front, but the result is vastly superior to what any library can offer.

Re: The viability of JavaScript frameworks on mobile

#9
This is good. Many frameworks are just too freaking huge for mobile but even when you use tiny frameworks and you dump a bunch of images into them you're going to have similar issues (at least on load).

Honestly using the DOM API isn't all that hard. Yes it awkward, verbose and sometimes cumbersome but it's still pretty straight forward. I'm actually really liking react lately but if I want something done well for a mobile I almost never use a framework.

Another thing this article didn't touch on was latency. When I was doing work for vehicles that had poor internet access via satellite every single http call just killed the load (this included fetching css, javascript, etc). I can't stress enough how much better your page can load if you combine as much stuff as possible, even images if you can display them as backgrounds.

Post reply on HN