O'Reilly logo

SproutCore Web Application Development by Tyler Keating

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Laying out views

Now that we have our views organized, let's look at the layout of each of them. SproutCore views are absolutely positioned by default, which is easiest to work with for full-screen applications and also faster due to the fact that the browser doesn't need to reflow the entire page when a portion changes.

To position and size our views, we use the layout property. This property is used by SproutCore to assign a layout style to a view's element when it is rendered. While we could lay out everything with CSS, this requires more back and forth movement in between files and would separate our view code from the size and position information. Instead, by programmatically defining the layout, we keep the truth about our view's layout ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required