O'Reilly logo

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

SproutCore Web Application Development

Book Description

Creating fast, powerful, and feature-rich web applications using the SproutCore HTML5 framework

  • Write next-gen HTML5 apps using the SproutCore framework and tools
  • Get started right away by creating a powerful application in the very first chapter
  • Build your understanding of SproutCore as you follow through the most complete reference to the framework anywhere in existence

In Detail

SproutCore is a framework that exists to allow developers to deliver on the promise of the Web with more than just simple attractive demos, but with complex software and remarkable user experiences. SproutCore’s creators recognized early on that developing real web software requires the same software development tools and practices that have evolved over decades in the native software field and thus SproutCore brings these to the Web.

SproutCore Web Application Development is more than just a guide to one of the largest and most powerful web application frameworks out there, it’s also a guide to writing genre defining web applications and solving the unique problems that the web platform creates. Containing the results of thousands of hours of software development experience, this book is invaluable for anyone already writing software for the Web or just starting out.

SproutCore Web Application Development comprises of three sections. In the first section we introduce SproutCore and walk through a simple SproutCore application. From there, we look in detail at all of the main components of the framework before finally working through a rigorous real-world example from start to finish. Learning about SproutCore means learning about writing software for the Web. In this book, you will not only learn what sets SproutCore apart from other web libraries and frameworks, you will also learn about solving the difficult challenges that web development poses. We will look at all the components of an application and how to translate wireframes, mocks, and design descriptions into clean, efficient, and maintainable code using MVC, data adaptors, statecharts, and more. We will look at SproutCore’s powerful binding and observing and watch how changes propagate across our app effortlessly and magically with very little code.

By the time you complete SproutCore Web Application Development, you’ll be ready to develop your own application that redefines what it means to be a web application.

Table of Contents

  1. SproutCore Web Application Development
    1. Table of Contents
    2. SproutCore Web Application Development
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Introducing SproutCore
      1. Understanding the SproutCore approach
      2. Knowing when SproutCore is the right choice
      3. Building your first SproutCore application
        1. Installing SproutCore
          1. Installing Ruby
          2. Installing the SproutCore gem
        2. Creating a project
        3. Adding an app to the project
        4. Designing your user interface
        5. Modeling your data
        6. Connecting it all together
        7. Working with user input
      4. Summary
    9. 2. The Runtime Environment
      1. Building on SproutCore's object model
      2. Using mixins to share functionality
      3. Working with properties and computed properties
      4. Observing properties for instant updates
      5. Binding properties for error-free consistency
      6. Working with enumerables
        1. SC.Array
        2. SC.Set
        3. Observing enumerables
        4. Observing properties on enumerable items
      7. Understanding the run loop
      8. Summary
    10. 3. The View Layer
      1. MVC in SproutCore
      2. Understanding the View layer
      3. Becoming familiar with SC.View and SC.Pane
      4. Organizing panes using SC.Page
      5. Laying out views
        1. Adjusting the layout
        2. Animating the layout
      6. Styling views
      7. Rendering custom views
      8. Updating custom views
      9. Responding to user events in custom views
      10. Summary
    11. 4. The Model Layer
      1. Understanding the Model and Data Interface layers
      2. Introducing the data store
      3. Defining your data model
      4. Creating custom attribute properties
      5. Defining record relationships
      6. Following the life cycle of SC.Record
        1. Loaded records (READY_CLEAN)
        2. Unloaded records (EMPTY)
        3. To be read records (BUSY_LOADING and BUSY_REFRESH)
        4. To be created records (READY_NEW)
        5. To be updated records (READY_DIRTY)
        6. To be destroyed records (DESTROYED_DIRTY)
      7. Querying the store
      8. Synchronizing data with a remote data source
      9. Implementing remote data source adaptors
        1. Reading records
        2. Creating, updating, and destroying records
      10. Summary
    12. 5. The Controller Layer
      1. Understanding the Controller and Application State layers
      2. Working with SproutCore's controllers
        1. SC.ArrayController
        2. SC.TreeController
      3. Designing with statecharts
      4. Avoiding pitfalls with statecharts
      5. Coding with statecharts
      6. Summary
    13. 6. Testing, Building, and Deploying
      1. Unit testing SproutCore apps
        1. Viewing unit test results
      2. Using frameworks and modules
      3. Building and deploying apps
        1. Additional configuration options
      4. Summary
    14. Index