Our last article about BoxArt showed how to use BoxArt's
Animated component to animate a tile-dropping game built in React. This time, we are going to look at some features of how
Animated optimizes animations for performance.
The Beastliness of Layout Thrash
There's a performance nightmare constantly threatening when you're animating in the browser.
They tried to cover this up. In designing ECMAScript 2015 (a.k.a. ES6, a.k.a. ES2015), the authors identified a number of undesirable side effects of their work. "Why worry?" they asked. "People will be so smitten with arrow functions and block-scope bindings that they won't care about a few measly backwards-breaking changes." Well I care, and I have evidence that suggests I'm not alone.
We build a lot of software at Bocoup. Like other types of builders, we tend to grow attached to the particular sets of tools and scripts we use in our work. We don't play favorites: my colleagues support Grunt, contribute to Gulp, and maintain stand-alone tools such as JSHint. It's easy to take familiarity with these tools for granted, but for our clients (or new project contributors) every new tool is another barrier to entry.
Look, I like good typography as much as the next person—maybe even a little more. When a CSS property came along with promises to doctor all my type with ligatures and carefully calculated kerning—not some half-assed tracking, but real kerning—I jumped at it. I put
text-rendering: optimizeLegibility on headings, body copy, navigation links; I slapped it on images just in case a ligature might appear in the background of a photograph, blurred, like an aesthetically satisfying poltergeist.
Selenium is an indispensable tool for developing web applications. It allows developers to write test scripts that control real browsers and ensure their applications behave in the way that users expect. Tests like these make software development much more pleasant--developers can have much greater certainty that their application is functioning correctly even after large refactoring operations.
There's a dark side to UI testing, though. So-called "race conditions" can lead to unexpected and intermittent test failures. Such failures undermine developer confidence in their test suites at large, and this subverts the entire motivation for maintaining tests in the first place.
I’ve always been a huge proponent of building sites that work everywhere — any user, any browser, any device, any context. Websites work everywhere by default, and they stay that way so long as we know how not to break them. That’s what the Open Web means to me: ensuring that entire populations just setting foot on the web for the first time will find it welcoming, regardless of the devices or connections used to get there.
Update: This proposal now has two open bugs for implementation, on V8 and SpiderMonkey.