2 ms·
> because the web browser (at least, any with that claims to care about security) is required to maintain a separation between the "page" and the browser that f
by pcwalton 11y ago
> because the web browser (at least, any with that claims to care about security) is required to maintain a separation between the "page" and the browser that frames the page, or you trivially enable "phishing" and other UI-impersonation attacks. Native has far more flexibility.
I'm not going to deny that native apps have more power to interact with hardware resources—though I would question whether that's a good thing for most applications I use—but this isn't a good place to draw a distinction. Window managers have to maintain the same security guarantees (look at the trickiness behind the impersonation protection in Windows Vista's UAC for example), and that's all the browser is in this context: a compositing window manager.
> If you want a way to develop applications that can be distributed as easily as documents are on the web, it would probably be a good idea to create some VM base portable application format that was actually free of stuff like HTML/CSS. An HTML replacement that worked more like a GUI toolkit would be much nicer for app development.
Besides the fact that this is unrealistic, I don't see how this would end up significantly better than the modern Web platform. JS is already faster than Objective-C in method dispatch. Use flexbox and the "document-oriented" layout goes away. Use simple graphics and your painting will be quick.
Honestly, speaking as someone who's measured this stuff a lot, the main thing that's slow in the Web that native doesn't have is style recalculation and layout. This is not insignificant, but I think any portable application delivery platform needs both of these. Native often gets by with hardcoded style and pixel layouts, but that obviously doesn't work on anything that has to run on arbitrarily many devices. Add in restyling and you pay a performance penalty, but redesigning the system from scratch isn't going to eliminate that penalty.
It's a common meme that "just reinvent the Web around applications and it'll be faster", but I have yet to see specific suggestions that would both preserve portability and aren't implementable in the existing Web platform. That's not to say browsers of today are optimally architected, of course.
- millstone 11y ago> Window managers have to maintain the same security guarantees (look at the trickiness behind the impersonation protection in Windows Vista's UAC for example), and that's all the browser is in this context: a compositing window manager Browsers supply a lot more than that window management: menus, key event handling, find, scrollbars, etc. You don't have the ability to hook into these with enough flexibility, which is why Gmail has 1998-era pagination (which is still better than Yahoo Mail's janktastic infinite-scroll). The web simply doesn't let you show lots of email in a table like Mail.app, or even Google's native gmail app. > It's a common meme that "just reinvent the Web around applications and it'll be faster" Faster isn't really the point. Gmail is definitely not slow. Where it (and all web apps) fall short is in their lame UI, attempting to recreate desktop metaphors under the limitations of the web. Examples are its mystery meat keyboard shortcuts, almost-but-not-really context menus, its fixed-size non-draggable "windows" (chat, compose, etc).