Posts Tagged: web

Apple goes responsive

New apple.com home page
The new apple.com home page

With the keynote announcement of the new iPhone and Apple Watch this month, select parts of apple.com have undergone a significant redesign. Curious to see how Apple stacked up against its competition, I researched the front end tech behind their new home page, iPhone 6 and Watch product pages. With only the web inspector as a guide, it’s an imperfect look, yet overall I’m impressed with how far Apple has come since their last major redesign.

CSS and JavaScript best practices: A-

Like most large companies with a big e-commerce presence, Apple has historically done well with CSS and JavaScript performance basics. They use global CDNs for their image assets and minify all CSS and JS references, ensuring their page weight is minimized.

Much more was added with the September refresh. For the first time I spotted a Modernizr-like detection script that runs in the header. It illustrated Apple moving away from device specific styles and functionality (e.g. checking the browser user agent string to adjust content for iPad or iPhone) toward universal feature checks that adapt to whatever the browser supports. In addition, for both the iPhone 6 and Watch product pages, Apple delays select imagery from loading (Figure A) by a few seconds. This “lazy load” effect reduces page weight and increases page speed.

iPhone 6 lazy loaded images
Figure A: images further down the iPhone 6 page load later to maximize page speed

There’s also smarter use of animation as the user scrolls down each product page. Apple added CSS3 animations all over the iPhone 5S product page a year ago, but their usage has expanded significantly since then. Animations are smartly limited to opacity and 3d transforms that stay fast by leveraging the computer’s GPU.

My only disappointment was the lack of sprites for some imagery, most notably the sub “explore” menu on the product pages. Arguably combining eight or more images into a single request won’t make a large difference, but it still feels like a missed opportunity.

Responsive web design: B

For the first time Apple relies heavily on media queries for a legit first class responsive web experience. Apple has used media queries in the past, but mostly for small tweaks like moving a product image from landscape to portrait orientation. Now there’s a major breakpoint to radically alter the site navigation and most imagery has fluid sizing to take full advantage of mobile device viewports. There’s also a custom responsive grid for aligning select elements. SVGs comprise the top navigation, a subtle nod that the usual 1x and 2x raster images won’t cut it for super HDPI devices like the iPhone 6 Plus.

The responsive design motif is a big step forward yet feels mildly safe: I wanted to see Apple exploit native responsive imagery (the picture element or srcset attribute of the img element), especially considering iOS8’s Safari supports srcset. Apple also uses device-width and device-height heavily in their major break points which seems unnecessary: if I navigate to apple.com with a slightly narrow browser on my laptop, it feels odd to just cut off content and add scrollbars when there’s a better optimized view available.

Typography: B

Unlike past designs that relied on occasional text images or web safe fonts, Apple has transitioned mostly to modern, custom web typography. Myriad Pro is deployed at several weights throughout the site and it’s a manageable (albeit a bit higher than I’d like) download at a bit over 300k.

Nevertheless, I wasn’t crazy about several paragraphs of product detail that use the thin Myriad Pro Light against a low contrast background (Figure B). It looks great on HDPI devices (e.g. Macbook Pros with Retina Displays, modern mobile devices) but can be a bit hard to read on lower resolution displays.

Small Myriad text
Figure B: Myriad looks great but can be harder to read on select product descriptions

Design and layout: A

Tech quibbles aside, Apple nailed their new design aesthetic for the home and product pages. They’ve done their homework in what’s common to modern design: generous white space, grid ratios, lots of vertical scrolling, “flat” layout that lacks depth and shadows, along with “full bleed” imagery that covers the entire browser viewport. Even carousels, controversial web elements that arguably lack engagement, are used well to highlight the Apple Watch. All carousel panes point to the same link and highlight the same product to avoid engagement issues. At the same time, the carousel’s huge imagery and slow transitions evoke a high-end, luxury vibe to match the aspirations of the Apple Watch itself.

Apple’s new design isn’t just a nod to modern web trends either; Apple sets off in its own direction with a few small flourishes (Figure C). First there’s Apple’s spin on the now ubiquitous “hamburger” menu icon for narrow width browsers: Apple uses two lines, not three. Also when users open the mobile navigation, the pages display a lightweight, scrollable navigation menu. It’s a big deviation from the expected “off canvas” listing where navigation covers the viewport or slides the existing content off to one side. I didn’t care much for the menu design at first, but it’s growing on me and does succeed in setting Apple’s design apart. I also really liked the “explore” on the iPhone and Watch product pages. It’s functionally a mega menu but the extra imagery and large hit targets give a more breathing room and a high-end feel.

Apple.com design touches
Figure C: Apple sets off in its own direction with a few small design touches

Overall: B+

Apple has come a long way since their last major refresh a year ago. Some issues with their responsive design decisions aside, they’ve finally caught up with most modern web practices. There’s even a few of their own “Apple-like” touches in their design to keep things fresh. Hopefully Apple will extend this design soon to other parts of the site, especially their support and e-commerce pages which are in serious need of a refresh.

One step ahead: improving performance with prebrowsing

Santiago Valdarrama writes for A List Apart about simple “prebrowsing” techniques to speed up web performance between pages. Browsers analyze patterns of a page a user is likely to go next, and utilize DNS prefetching, resource prefetching, and prerendering to help the process along.

Bonus points for a wonderful illustration by Kevin Cornell, one of my favorite ALA header graphics in months.

How we make RWD sites load fast as heck

The Filament Group carries serious weight in the responsive web design community, not just on some of their projects, but their open-source code contributions: Picturefill and Grunticon alone are very significant. That’s what makes this post worth paying attention to. Scott Jehl outlines strategies for using webpagetest.org along with inline and asynchronous JavaScript requests to speed up a site’s load time.

Jonathan Snook: CSS is a mess

The consistently excellent Jonathan Snook gave a talk at the recent Beyond Tellerrand conference about how to organize your CSS in a scalable, modular system. I’ve been a fan of Snook for years due to his work on SMACSS, a CSS organization system I’ve loosely adapted on my work projects. A highly recommended watch for those responsible for CSS on larger code bases.

Marka

Transition effects on icons are becoming increasingly popular, especially in navigation changes for the ubiquitous hamburger icon. While generally I rely almost entirely on detailed CSS3 transforms for my work, Marka provides an alternative, a simple JS wrapper around a icon for easy transforms. It might be fun to experiment with this on an upcoming project.

Hacks for dealing with specificity

CSS Wizardy’s Harry Roberts writes one of the best single guides to keeping specificity low and complex CSS projects from getting out of control. I use to be more neutral on IDs, but at this point, I’m fully onboard with Roberts: they don’t serve any purpose a class can’t already deliver on.

Responsive deliverables

I’ve listened to Dave Rupart for a while on the popular Shop Talk Show and also consider him an innovator in the RWD space with his work at Paravel. I pay attention when he talks about a new direction for design handoffs.

Some mini Sass mixins I like

CSS Tricks‘ Chris Coyier wrote a nice little post going over some of his favorite Sass mixins. Sass is wonderful and I’d recommend it to anyone, but even for vanilla CSS users, do read his ‘centerer’ code snippet as well. Fairly brilliant way to basically center anything regardless of the outer container size, all with a simple transform property.

Spritebox

I personally tend to favor commmand line runners and local apps for my sprite generation, but Spritebox looks like a slick web-based alternative.

Side projects matter

I usually give my students and junior developers two pieces of advice: practice your skills and work on strong side projects. Practice is a given, but projects on your own time are a greatly underrated and often forgotten asset.

Strong projects challenge you in at least one way. If you’re focusing on development, maybe you’ll target a framework or an aspect of a programming language you haven’t used yet. If you’re a designer, it could be a new tool or workflow. Remember, the side project needs elements of the familiar to make regular progress so you do not get frustrated and give up, yet remain achievable over time.

Great side projects are a mix of what you can execute quickly but are also somewhat foreign and difficult. It’s a twist on your existing point of view, not one that’s completely coming from left field. One personal example: a refresh of this very site (familiar), but undertaken with a fresh set of responsive design tools and Sass underpinning the styling (foreign).

It’s not an accident I generated my latest project after work hours; the best side projects are almost always outside the day job. Because you’re free from work interference, it can and should move at your own pace. It’s ok to be disorganized too. You don’t even have to finish; the project can flounder and die days, weeks or months down line. As long as you grow from it, it’s still a success. And above all, side projects should be fun.

Shouldn’t a good job nullify the need for side projects? Not exactly. Even with the best jobs, your personal growth goals are never perfectly aligned with the company you work for. And some work, even with the best intentions, can get stuck in a boring, repetitive rut. A strong side project provides an opportunity to escape that.

At the very least, even a so-so side project teaches you something new on your own timetable. And at its best, side projects can establish your “niche” as a designer or developer, a critical way to stand out from your tech peers. They did for me; three years at Gucci, my first formalized web job, pushed me most of the way. However, it’s my Hacker News and Rdio browser extensions on my own time, along with some minimal Tumblr themes, that confirmed my interests as a web developer on the very front of front-end development that often drifts into UX and aesthetic design.

Good jobs push your career far. Good side projects push it further. Make time and a commitment to both.