An Empirical Study of Programming Paradigms for Animation

Animations are an essential part of many modern user interfaces. They are often defined programmatically, which allows for parametrization and reuse. Two programming paradigms to define animations are common: Procedural animation programming allows the developer to make explicit updates to object properties at each frame, allowing maximum control over behavior. Declarative animation programming allows the developer to specify keyframes, i.e., the value of an object’s property at a given point in time. All frames between two keyframes are automatically interpolated by the animation library. In this paper, we investigate how these common programming paradigms differ in terms of developers’ productivity. In a controlled laboratory study, we asked developers to implement a set of simple animations using both paradigms. We found that developers can implement a given behavior faster using declarative animation programming, but the abstraction introduced by automatically creating the animation through keyframe interpolation left participants with unexpected behavior for some tasks.