Live data from Hacker News

The viability of JavaScript frameworks on mobile

joreteg.com

21–30 of 85 posts

Re: The viability of JavaScript frameworks on mobile

#24

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…

This is heartening. How do you deal with cross-browser differences, especially considering you're supporting older mobile devices?

Re: The viability of JavaScript frameworks on mobile

#26
post #22

This is where small frameworks like Mithril shine. The site says 12KB, for some reason, but minimized and gizipped, the latest version is closer to 7 or 8 KB IIRC. http://mithril.js.org/

Mithril is amazing. I've been using it for over a year and only like it more and more. Its fast initial load time is very relevant in today's world of mobile web apps.

Re: The viability of JavaScript frameworks on mobile

#28
post #5

Even the Facebook mobile web part that has been developed in React, the people search, feels rather slow on all my mobile devices (incl high end iOS amd Android devices).

IMHO It's still faster than most webapps on mobile. I use an old Alcatel with Android 2.3 to benchmark performances on low end handsets and Facebook performances are ok compared to Gmail or even Google search which takes 3+ seconds to load just to display a search box. I think Facebook has managed to do an acceptable job if you compare their app to other web apps.

The truth is, the mobile web space is not a good as developers expected it to be in 2015 unless users visit websites with expensive devices, which most of them do not. Making a website responsive , while being an improvement, doesn't make it automatically mobile friendly.

Re: The viability of JavaScript frameworks on mobile

#29
post #24

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…

This is heartening. How do you deal with cross-browser differences, especially considering you're supporting older mobile devices?

If you don't need to support IE8 (which is at 1.38% global market share according to CanIUse), then cross-browser differences just aren't the problem they were in the 1995-2010 era. The event model, DOM querying, classList, CSS animations & transitions, fast GPU rendering via CSS translations, box sizing, history management, localStorage, ES5, JSON parsing, geolocation, websockets, all of these are well-supported by standardized native APIs on all major browsers.

http://caniuse.com/#search=event

http://caniuse.com/#search=querySelector

http://caniuse.com/#feat=classlist

http://caniuse.com/#search=animation

http://caniuse.com/#search=transform

http://caniuse.com/#feat=css3-boxsizing

http://caniuse.com/#search=history

http://caniuse.com/#feat=namevalue-storage

http://caniuse.com/#search=es5

http://caniuse.com/#feat=json

http://caniuse.com/#feat=geolocation

http://caniuse.com/#feat=websockets

Even things like the template tag have reasonable support. It's only when you get into bleeding-edge stuff like webcomponents and web animations that browser support starts to drop off, and unless you're using Polymer (which polyfills all that), that's unlikely to matter.

Re: The viability of JavaScript frameworks on mobile

#30
post #19
post #4

Would be interesting to see Meteor stats there too

How about Sencha Touch? I'm guessing it's a beast.

Sencha Touch is pretty fast. When I was doing to Cordova development it was still the fastest js framework when it comes to UI responsiveness. Does it makes sense when it comes to developing mobile websites ? I don't know. I think sticky headers , footers , transitions and stuff like that make very little sense for a website. What kind of mobile website would you develop with a mobile UI framework ?
Post reply on HN