5 ms·
> The web is now hamstrung by the HTML/CSS layout model more than anything else Really? Because I find it far more intuitive and flexible than working with xib
by marknutter 12y ago
> The web is now hamstrung by the HTML/CSS layout model more than anything else
Really? Because I find it far more intuitive and flexible than working with xibs, for instance.
- adamnemecek 12y agoWell, xibs solve a bit more complex issue.
- marknutter 12y agoThat being?
- adamnemecek 12y agoI mean with Xib, you can e.g. specify how the window should behave when you are resizing it since you are specifying layout constraints as opposed to having to hardcode the layout. With CSS, your only recourse is media queries but those are a lot less fine-grained. Look into http://gridstylesheets.org http://gridstylesheets.org (and more specifically http://gridstylesheets.org/guides/ccss/ http://gridstylesheets.org/guides/ccss/) which is kinda the love child of CSS and Xib (or the technology that inspired the layout technology).
- ggamecrazy 12y agoAre you talking about Auto Layout? You can write the same thing programmatically, in fact it's quite nice, though not as obvious as modifying frames.
- adamnemecek 12y agoI was. But you are still hooking into the same layout API as if you'd use IB.
- marknutter 12y agoI still don't understand why the issue is more complex for native mobile apps than it is for web mobile apps? Don't they all have to accommodate for the same screen sizes?
- adamnemecek 12y agoIt's not that it's more complex, it's that you can do things with native layouts that you'd have to use JS to achieve on mobile.
- marknutter 12y agoGood thing browsers run JS, eh?
- adamnemecek 12y agoProgramming is all about abstraction management. Doing layouts with JS is using the wrong abstractions. CSS was originally conceived for doing document layouts but it's less suitable for web-application layout. We can leave the discussion here, if the article I posted didn't convince you, nothing probably will.
- marknutter 12y agoWell, I'm somewhat still arguing in the context of the OP's assertion that "the hackery required to attempt to imitate native mobile apps is horrific". I not only disagree that it's horrific, but actually think it's pretty darn good. I agree with you that it's not perfect, but perfect is the enemy of good.
- Tloewald 12y agoHTML/CSS aspires to being as flexible (and intuitive) as xibs. What do you think flexbox (coming real soon now, almost there, you can use it in IE11...) is? It's basically the view model that xibs have supported since 1989 (or whenever it was NeXTStep first shipped).