CDK-177. Add views API.

A large proportion of this work was done by Ryan Blue.