4 ms·
> In fact, when presented with the mandate that they needed a mobile app, the web developer probably just wanted to create a nice HTML5 site that could be serve
by Silhouette 15y ago
> In fact, when presented with the mandate that they needed a mobile app, the web developer probably just wanted to create a nice HTML5 site that could be served up in any tablet or mobile browser without the need to install a special app for their particular device. Know why? Because that is what web developers do.
That's what we did, the first time. We carefully constructed a responsive design that would scale to an iPad resolution and make good use of the screen space, and that would scale again to a smartphone, taking into account single-handed use, UI guidelines for the size of controls so they could be tapped reliably on a high-res screen, and all that jazz.
And we learned in the process how many different ways Apple deliberately break the web browsers in their mobile devices.
They pretend they're on a different size of screen that has no relationship to physical reality, and scale your page accordingly. I'm sure that's great if you really want to see an entire web site squeezed into a few square inches with text too small to read, but it completely breaks the usual CSS tools for building a responsive design.
You can fix that by forcing the viewport size. However, if you do then as soon as the user rotates their iPad the browser zooms the page to show the same content at a different scale instead of actually letting the responsive design do its work by reflowing the layout to take advantage of the new page dimensions while keeping everything at the same size.
You can fix that by setting a maximum zoom level, and a lot of developers stop here, but if you do then you'll sacrifice accessibility for users who genuinely want to zoom because they have imperfect vision and have difficulty enjoying a site at a size that is aimed at a typical visitor.
You can fix that by setting the default zoom instead, detecting an orientation change event, and resetting your overrides each time the page rotates, as long as you can get all the proprietary hooks right and you don't mind either browser sniffing on your server or shoving the extra code to all your users even though most won't benefit.
And so on, and so on.
If Apple want usability for web sites on their iOS devices, they need to stop making it actively difficult for web developers to support their users. A single, simple option that says "make 1px = 1 physical pixel" would be sufficient to fix almost everything they get wrong as far as responsive design goes. Is that really so much to ask?
<cynic> But maybe they don't, because after all they take a hefty cut of the profits on anything you make via an app, so they have a vested interest in pretending to support web standards but actually screwing them up to make app development more attractive. </cynic>
If users don't like the experience they get as a result, there is an easy solution: don't buy Apple products that are shiny but broken, buy something else that works instead. There's no shortage of either good smartphones or good tablets from other sources today.
(Edit: FAOD, the "we" above refers to my team and me, developing our own products. We're not connected to the site linked at the top of this discussion.)
- pavel_lishin 15y agoAnd making an actual app is easier and cheaper than all of this?
- Silhouette 15y agoThat depends on your point of view. There is a wealth of documentation available on the APIs for programming native apps. In contrast, finding robust, comprehensive documentation for making your web app compatible with any given mobile platform is not so easy, and you need to find it for all platforms that you want to support and then reconcile all the differences. At least with native apps, you're mostly aiming for clear, stationary targets. Writing an app for a major platform like iOS or Android isn't that hard if you have a programming background. It's the extra hassle of distribution, particularly where App stores and external approvals are involved, that makes it such a chore compared to a web app.
- shadowfiend 15y agoWhile these decisions all sound stupid in principle, when you actually think about it they make a great deal of sense. They all stem from one root requirement: Regular websites should work with minimum problems on an iOS device. This is a requirement that made sense when iOS came out years ago, and honestly still makes sense today. It's why browsing on an iOS device is so damn awesome. That explains the different reported size. Once you have a different reported size, you enter the viewport and zoom issues. But at that point, all the decisions intertwine and make sense amongst themselves. Now, why isn't there a 1px=1 physical pixel setting? That's a different question. By which I kind of mean, “the retina display is probably the reason there is no such setting”. Regardless, that's a missing feature. The ones that are there all make sense, and aren't nearly as foolish as they sound at first glance.
- Silhouette 15y agoI agree that the viewport-based rendering makes a lot of sense if you assume that all web sites are not designed for your device. Arguably, it even makes sense as the default behaviour. My objection is only that if you have a team who are actually willing to go the extra mile and provide a customised UI that plays to each device's specific strengths, it's absurdly difficult for them to get it right. CSS media queries actually aren't bad for this sort of work in either design or device support these days, give or take some absurdities involving scrollbars. All I want is for all those juicy features to actually tell me about real pixels. Then I can fix my font sizes and icon spacings and graphic dimensions to look pixel-perfect and still remain accessible and draw at a similar physical size on all devices.