4 ms·
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
by BinaryIdiot 11y ago
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.
- tomcam 11y agoThis is heartening. How do you deal with cross-browser differences, especially considering you're supporting older mobile devices?
- nostrademons 11y agoIf 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=event http://caniuse.com/#search=querySelector http://caniuse.com/#search=querySelector http://caniuse.com/#feat=classlist http://caniuse.com/#feat=classlist http://caniuse.com/#search=animation http://caniuse.com/#search=animation http://caniuse.com/#search=transform http://caniuse.com/#search=transform http://caniuse.com/#feat=css3-boxsizing http://caniuse.com/#feat=css3-boxsizing http://caniuse.com/#search=history http://caniuse.com/#search=history http://caniuse.com/#feat=namevalue-storage http://caniuse.com/#feat=namevalue-storage http://caniuse.com/#search=es5 http://caniuse.com/#search=es5 http://caniuse.com/#feat=json http://caniuse.com/#feat=json http://caniuse.com/#feat=geolocation http://caniuse.com/#feat=geolocation http://caniuse.com/#feat=websockets 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.
- intruder 11y agoYou deal with them one at a time. It's not like there's magic involved. Our SPA isn't even using jQuery. Loadtimes are fast, app is very fluid. Many people seem to not understand that when you query the dom for a node, you can store that node and reuse it throughout your app.
- deleted 11y ago[deleted]
- Twirrim 11y agoOne significant bonus in drastically reducing javascript is improved battery life. > 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. This, so much this. Particularly with the growing marketplace out side of 1st world countries. Fewer calls of any type are of significant value. Reduce DNS calls, host everything from the same domain where possible, etc. etc. Use sites like https://developers.google.com/speed/pagespeed/insights/ https://developers.google.com/speed/pagespeed/insights/ to help you