Book Image

SproutCore Web Application Development

By : Tyler Keating
Book Image

SproutCore Web Application Development

By: Tyler Keating

Overview of this book

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 (13 chapters)
SproutCore Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

The purpose of this book is twofold. The first is to teach you everything you need to know about the application development framework, SproutCore. As the first official SproutCore book, written by the head of the project, this book is the most in-depth and complete introduction to the framework anywhere in existence. In this book we will comprehensively look at every component of SproutCore, including the runtime environment, the powerful model, view and controller layers, the less familiar, but equally important application state, data interface layers, and many other supporting technologies that are built into SproutCore. We also go through hundreds of examples, hints, and tips to get you comfortable and productive with SproutCore as quickly as possible.

The second purpose is to enable you to build and deploy professional quality web applications as quickly as possible. As you will find, SproutCore's features can be described in terms of how that particular feature improved the process of real-world software development and web app deployment. As you read through the book, you will be introduced to the components of SproutCore along with the reasoning behind each and the manner in which you can use each for your real-world projects.

SproutCore is the result of developing several of the most advanced and ambitious web applications that have ever existed and so connecting you with that experience gained is a key purpose of this book.

What this book covers

Chapter 1, Introducing SproutCore, introduces the framework, covers how and when to use it, and works through a tutorial of a fully functioning SproutCore application.

Chapter 2, The Runtime Environment, covers the core technologies that we will use and build upon in all SproutCore applications.

Chapter 3, The View Layer, covers the structure of the Model-View-Controller (MVC) paradigm in SproutCore along with the view layer specifically.

Chapter 4, The Model Layer, covers the model and data interface layers for synchronizing and managing client-side and server-side data.

Chapter 5, The Controller Layer, covers the Controller and Application State layers for controlling and connecting all the parts together into a cohesive application.

Chapter 6, Testing, Building, and Deploying, completes the entire software development process in order to test, build, and ultimately deploy a real application.

What you need for this book

To follow along with the tutorial in this book, you will need to install the SproutCore framework and build tools. The framework and tools are available for Microsoft Windows, OS X, and Linux and the instructions are included in Chapter 1, Introducing SproutCore. Further instructions may be found at http://sproutcore.com.

Who this book is for

This book is intended for software developers who are already doing web app development and are looking to tackle more ambitious projects akin to Apple's iCloud web apps or non-web software developers who are looking to move into web application development and still apply their skills and knowledge within a software developer oriented web framework.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: " The first function, module(), is used for starting a new group of tests."

A block of code is set as follows:

config :my_app, :required => [
  :'sproutcore/desktop', 
  :'sproutcore/datastore', 
  :'sproutcore/statechart'
]

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    // Resume the previous match.
    resumeMatch: function () {
      this.gotoHistoryState('matchState');
    }
  }),

Any command-line input or output is written as follows:

$ mkdir frameworks
$ cd frameworks
$ mkdir my_framework

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Right now, we're only going to focus on tests within the Apps section, where we see our Contacts app is listed".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.