News for hackers. Stuff that matters.
Re:You can make complex web apps responsive by EGreg on Thursday June 13, 2013 @11:13AM (#5874463)
What's with all these CSS frameworks which serve one css file for everybody? Toolkits like GWT have had the sense to serve only what each environment needs, since 2004. If you are worried about mobile devices being able to handle things, how about NOT downloading things that they don't need?

Your CSS framework should include a precompiler that generates files for each platform. Then either the client or the server can decide the right file(s) to load.

Re:You can make complex web apps responsive by cheald on Thursday June 13, 2013 @07:14PM (#5877261)
Letting the server pick means you're serving the user agent, rather than the device capabilities. Letting the client pick means perceptual performance degradation, as the client has to synchronously download and run Javascript before it can figure out what to request from the server (that is, the render/layout thread can't be chewing on the CSS while your Javascript is doing its thing). Given how well text compresses and the cost of a HTTP connection, I'm not sure that separating things out is going to get you much of a win.

The comparison to GWT is hilarious, since GWT is a massive mess of dependency hell that ends up requiring an insane amount of support code for any particular small feature.

Re:You can make complex web apps responsive by modarts on Friday June 14, 2013 @03:46AM (#5878763)
The GWT thing threw me off as well. How maintaining a separate stylesheet per user agent could possibly be seen as an optimal approach is beyond me.
Re:You can make complex web apps responsive by EGreg on Friday June 14, 2013 @10:08AM (#5879980)
If you have an iPhone, would you rather have a stylesheet that has everything and the kitchen sink in it (for tablets and desktop environments, all the -firefox- stuff and IE hacks) or would you rather have a stylesheet just for the iPhone?

Similarly, would you serve the full jQuery to an iPhone or would you serve the new jQuery without IE dependency which is much lighter? Heck, you might even be able to serve Zepto!

Re:You can make complex web apps responsive by cheald on Friday June 14, 2013 @04:26PM (#5882287)
jQuery 1.10.1 gzipped is 32kb. jQuery 2.0.0 gzipped is 29kb. Quantify "much lighter" for me?
Re:You can make complex web apps responsive by EGreg on Friday June 14, 2013 @08:25PM (#5883311)
So why did they do it?