• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Basics-Building Cloud Applications

Page history last edited by tymofi 10 years, 3 months ago

TODO: Update this description with more info about cloud apps vs other types of apps.

 

For many years, "real engineers" avoided working with JavaScript.  The lightweight, underpowered language that shipped with browsers was great for adding effects here and there but everyone knew that a server could always run application code better than the browser.

 

Thankfully, underneath that lightweight veneer lurked a powerful and flexible language that incorporated some of the best features of dynamic languages including first-class functions, prototypical inheritance, late binding and dynamic method dispatch.  Now with faster JavaScript engines and powerful HTML features in modern web browsers, you can use these capabilities to build rich, native look-and-feel applications right in the web browser without any plugins.

 

Leveraging JavaScript to build full applications in the web browser, however, can be tricky business.  There are many performance potholes, for one thing.  And the details of downloading and starting an application quickly over the internet are both arcane and complex.  Not to mention the fact that JavaScript is a very flexible language that can be adapted to almost any programming style. Learning to use a style that is both efficient and less prone to errors can take years of experience.

 

Introducing SproutCore

 

SproutCore is a full stack application framework that is designed to solve these problems for you.  It goes beyond a simple library of functions, providing a full pattern for building applications that can save you and your development team many months of effort learning how to build these kinds of applications for yourself.

 

In short, SproutCore helps you get the most out of JavaScript by implementing some of the more common parts of your application for you and by encouraging you to do the right things with the code that you do write.

 

What's In the Box

 

SproutCore 1.0 comes with six major libraries and tools that you need to know about:

 

SproutCore-Architecture
SproutCore Components

 

 

  1. Runtime.  Implements a basic Object model along with property observing and bindings.  It is small and can save you thousands of lines of application code by automatically propagating state throughout your application.  The Runtime is available both as part of the SproutCore framework and as a standalone library that you can use in your existing web applications to begin adding more complexity without a complete rewrite.
  2. Build Tools.  A development-time tool an input source directory of JavaScript and related resources and output a bundle of HTML, JavaScript, and CSS that is optimized for web delivery, highly cacheable, and even multi-lingual.  Just drop the output into a directory and serve with any static web server (like Apache).  Using the build tools will make your application much more manageable as it grows and save you hours of effort in tuning the caching for your app.
  3. JavaScript Framework.  An extensive set of classes for defining your data model, syncing with the server, drawing data on screen, handling events, and managing changes to your application state.  The framework today includes a desktop version and a placeholder for a mobile version that is under active development.  With the full stack framework in place, you can setup a full functional base application in just a few minutes, leaving you free to focus on adding features that will really matter to your users.

 

In addition to the above components, the SproutCore development tools also include built in support for unit testing, inline documentation, and generators that will create template files for you.  These tools are very easy to use and can greatly improve both the quality and maintainability of your applications.

 

To get the most out of the tools that come with SproutCore, you need to learn not only how to use these tools but also the right way to think about writing an application in JavaScript.  

 

This series of guides will teach you everything you need to know about how to use SproutCore to write efficient JavaScript in the web browser.  You should start by reading the rest of this Basics guide to learn some general concepts about both SproutCore and JavaScript.  Then move onto learning about the higher-level parts of the framework including Models, Views, and Controllers.

 

Moving On 

 

Get started with SproutCore's Architecture ยป

Comments (2)

Charles Jolley said

at 5:45 pm on Feb 27, 2009

Feb 27 - Removed some comments here that were no longer relevant.

Maurits Lamers said

at 12:07 am on Mar 3, 2009

Removed an extra space and added a few little things to improve readability.

You don't have permission to comment on this page.