Chapter 1. Introducing SproutCore

In this book we will learn everything we need to know about SproutCore, which is one of the most exciting and powerful application development frameworks in existence. As you will discover, SproutCore is a very large topic and covers a lot of ground, so before we even start discussing SproutCore at a high level, let's begin with a brief history.

SproutCore has actually been around for quite a long time in terms of the web, having been created by entrepreneur Charles Jolley, back in 2007. Charles created SproutCore to build a mail client, but was soon hired by Apple to grow the framework further and develop several even larger scale applications. Indeed you will likely recognize some of these web applications and may even remember the amazement when people first saw SproutCore apps such as mobileMe delivering a native-like look and feel in the browser without the use of plug-ins.

Until then, the Web 2.0 movement had largely failed to deliver on its promise of replacing the software of the desktop. Of course there are exceptions, but overall, the slew of web 2 apps that appeared were slow and clunky and lacked a lot of the basic features and refinement we had expected in the software. Oddly enough as mobile has gained in popularity, the advancement of web apps has actually slowed down. For instance, compared to the desktop, the network latency for mobile is horrendous and the type of web apps that are delivered a page at a time from a server are almost unusable.

However, and this is why I'm writing this book, this does not need to be the case! With SproutCore apps, the user feedback is instantaneous, lists can be scrolled effortlessly through hundreds of thousands of items. Also, there is drag-and-drop and keyboard control. The apps can run offline and overall the software built with SproutCore feels feature-rich, responsive, and robust. On top of this, SproutCore apps are 100 percent compatible across even less than the modern browsers, all without the use of plug-ins!

Perhaps best of all though, is that SproutCore is, and always will be completely free to use for you and me. As an open source framework, SproutCore gains experience in real world deployments and grows as professionals contribute that experience back into the source for us to use. That is why we're here and that is why whether you're building a new multi-platform social app or replacing an outdated internal management tool, now is the best time to learn about SproutCore.

In this chapter we will cover the following:

  • Understanding the SproutCore approach
  • Knowing when SproutCore is the right choice
  • Building your first SproutCore application:
    • Installing SproutCore
    • Creating a project
    • Adding an app to the project
    • Designing your user interface
    • Modeling your data
    • Connecting it all together
    • Working with user input

Understanding the SproutCore approach

In the strictly technical sense, I would describe SproutCore as an open source web application development framework. As you are likely a technical person interested in web application development, this should be reassuring. And if you are interested in developing web applications, you must also already know how difficult it is to keep track of the vast number of libraries and frameworks to choose from. While it would be nice if we could say that there was one true way, and even nicer if I could say that the one true way was SproutCore; this is not the case and never will be the case. Competing ideas will always exist, especially in this area because the future of software is largely JavaScript and the web.

So where does SproutCore fit ideologically within this large and growing group? To best describe it, I would ask you to picture a spectrum of all the libraries and frameworks one can use to build a web application. Towards one end are the small single-feature libraries that provide useful helper functions for use in dynamic websites.

As we move across, you'll see that the libraries grow and become combined into frameworks of libraries that provide larger functions, some of which start to bridge the gap between what we may call a website and what we may call a web app. Finally, at the other end of the spectrum you'll find the full application development frameworks. These are the frameworks dedicated to writing software for the web and as you may have guessed, this is where you would find SproutCore along with very few others.

First, let me take a moment to argue the position of full application development frameworks such as SproutCore. In my experience, in order to develop web software that truly rivals the native software, you need more than just a collection of parts, and you need a cohesive set of tools with strong fundamentals. I've actually toyed with calling SproutCore something more akin to a platform, rather than a framework, because it is really more than just the framework code, it's also the tools, the ideas, and the experience that come with it.

On the other side of the argument, there is the idea of picking small pieces and cobbling them together to form an application. While this is a seductive idea and makes great demos, this approach quickly runs out of steam when attempting to go beyond a simple project. The problem isn't the technology, it's the realities of software development: customization is the enemy of maintainability and growth. Without a native software like structure to build on, the developers must provide more and more glue code to keep it all together and writing architecturally sound code is extremely hard. Unfortunately, under deadlines this results in difficult to maintain codebases that don't scale. In the end, the ability to execute and the ability to iterate are more important than the ability to start.

Fortunately, almost all of what you need in an application is common to all applications and so there is no need to reinvent the foundations in each project. It just needs to work and work exceptionally well so that we can free up time and resources to focus on attaining the next level in the user experience. This is the SproutCore approach.

SproutCore does not just include all the components you need to create a real application. It also includes thousands of hours of real world tested professional engineering experience on how to develop and deploy genre-changing web applications that are used by millions of people. This experience is baked into the heart of SproutCore and it's completely free to use, which I hope you find as exciting a prospect as I do!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.187.210