Essentials of Javascript - Cultural View

Essentials of Javascript - Cultural View Essentials of Javascript - Cultural View

culturalview.com
from culturalview.com More from this publisher
14.07.2013 Views

SproutCore 135 SproutCore A demo application of SproutCore Developer(s) Sproutit, Apple Inc. and community. Initial release 2010 Stable release 1.0.1046 / March 19, 2010 Development status Active Written in Ruby/JavaScript Operating system Cross-platform License MIT License Website http://www.sproutcore.com/ SproutCore is an open-source JavaScript framework. Its goal is to allow developers to create web applications with advanced capabilities and a user experience comparable to that of desktop applications. When developing a SproutCore application, all code is written in JavaScript (including the view layer in 1.0). SproutCore, initially created in 2007 by Sproutit as the basis for their Mailroom application, is available under the MIT License. Apple announced MobileMe at WWDC in 2008, noting that much of it was built using SproutCore. Apple has contributed greatly to the project as part of a Web 2.0 initiative. SproutCore is also used at iWork.com, the online extension of the iWork productivity software by Apple. Latest stable SproutCore release is 1.0, a major milestone with significant improvements, and was released on March 19th in 2010 [1] . SproutCore implements some CommonJS specifications in the upcoming 1.1 release [2] . Notes • "Apple adopting SproutCore for web applications" [3] . Macrumors. 2008-06-16. • "Apple's open secret: SproutCore is Cocoa for the web" [4] . Appleinsider. 2008-06-16. • "Want to try out Apple's MobileMe? Check out SproutCore" [5] . Techcrunch. 2008-06-09. • "Cocoa for Windows+Flash killer=SproutCore" [6] . Roughly Drafted. 2008-06-14. External links • Sproutcore.com homepage [7] • SproutCore Wiki [8] • SproutCore source code [9] • an Introduction to SproutCore [10] , discussing desktop vs. browser development, key/value observeration, data bindings, demos, SproutCore features and API, and example SproutCore apps. 2009-12-30 • ListenApp. Web application done with SproutCore 1.0 [11]

SproutCore 136 • Tasks. Tasks management app done with SproutCore 1.0 (login as 'guest' no password) [12] • Lebowski Framework - A test automation framework for SproutCore [13] • itsgotwhatplantscrave.com - A SproutCore focused blog [14] • frozencanuck.wordpress.com - Another SproutCore focused blog [15] References [1] Blog post about 1.0 release (http://blog.sproutcore.com/post/459714079/sproutcore-1-0-is-done) [2] http://wiki.commonjs.org/wiki/Implementations/SproutCore [3] http://www.macrumors.com/2008/06/16/apple-adopting-sproutcore-for-web-applications [4] http://www.appleinsider.com/articles/08/06/16/apples_open_secret_sproutcore_is_cocoa_for_the_web.html [5] http://www.techcrunch.com/2008/06/09/want-to-try-out-mobileme-check-out-sproutcore/ [6] http://www.roughlydrafted.com/2008/06/14/cocoa-for-windows-flash-killer-sproutcore/ [7] http://www.sproutcore.com/ [8] http://wiki.sproutcore.com/ [9] http://www.sproutcore.com/download/ [10] http://www.infoq.com/presentations/subelsky-sproutcore-intro/ [11] http://listenapp.com/ [12] http://tasks-demo.appspot.com/ [13] http://github.com/FrozenCanuck/Lebowski [14] http://www.itsgotwhatplantscrave.com/ [15] http://frozencanuck.wordpress.com/ Unobtrusive JavaScript "Unobtrusive JavaScript" is an emerging technique in the JavaScript programming language, as used on the World Wide Web. Though the term is not formally defined, its basic principles are generally understood to include: • Separation of functionality (the "behavior layer") from a Web page's structure/content and presentation [1] • Best practices to avoid the problems of traditional JavaScript programming (such as browser inconsistencies and lack of scalability) • Progressive enhancement to support user agents that may not support advanced JavaScript functionality [2] The need for a new paradigm JavaScript historically has had a reputation for being a clumsy, hackish language unsuitable for serious application development. [3] [4] This has been largely due to inconsistent implementations of the language itself and the Document Object Model [5] in various browsers, and the widespread use of buggy cut-and-paste code. Runtime errors were so common (and so difficult to debug) that few programmers even tried to fix them, as long as the script behaved more or less the way it was supposed to; [6] scripts often failed completely in some browsers. The recent emergence of standardized browsers, JavaScript frameworks and high-quality debugging tools have made organized, scalable JavaScript code possible, and the emergence of AJAX interfaces has made it essential. Whereas JavaScript was once reserved for relatively simple and non-critical tasks such as form validation and decorative novelties, it is now being used to write large, complex codebases that are often part of a site's core functionality. Run time errors and unpredictable behavior are no longer minor annoyances; they are fatal flaws. Advocates of Unobtrusive JavaScript see it as part of the larger Web standards movement; much as the demand for cross-browser compatibility has driven the increasing emphasis on standardized markup and style, the increasing demand for rich Internet applications is driving the movement toward better practices with the use of JavaScript. The concept of Unobtrusiveness in relation to JavaScript programming was coined in 2002 by Stuart Langridge [7] in the article "Unobtrusive DHTML, and the power of unordered lists [8] ". [9] In the article Langridge argues for a way to

SproutCore 136<br />

• Tasks. Tasks management app done with SproutCore 1.0 (login as 'guest' no password) [12]<br />

• Lebowski Framework - A test automation framework for SproutCore [13]<br />

• itsgotwhatplantscrave.com - A SproutCore focused blog [14]<br />

• frozencanuck.wordpress.com - Another SproutCore focused blog [15]<br />

References<br />

[1] Blog post about 1.0 release (http://blog.sproutcore.com/post/459714079/sproutcore-1-0-is-done)<br />

[2] http://wiki.commonjs.org/wiki/Implementations/SproutCore<br />

[3] http://www.macrumors.com/2008/06/16/apple-adopting-sproutcore-for-web-applications<br />

[4] http://www.appleinsider.com/articles/08/06/16/apples_open_secret_sproutcore_is_cocoa_for_the_web.html<br />

[5] http://www.techcrunch.com/2008/06/09/want-to-try-out-mobileme-check-out-sproutcore/<br />

[6] http://www.roughlydrafted.com/2008/06/14/cocoa-for-windows-flash-killer-sproutcore/<br />

[7] http://www.sproutcore.com/<br />

[8] http://wiki.sproutcore.com/<br />

[9] http://www.sproutcore.com/download/<br />

[10] http://www.infoq.com/presentations/subelsky-sproutcore-intro/<br />

[11] http://listenapp.com/<br />

[12] http://tasks-demo.appspot.com/<br />

[13] http://github.com/FrozenCanuck/Lebowski<br />

[14] http://www.itsgotwhatplantscrave.com/<br />

[15] http://frozencanuck.wordpress.com/<br />

Unobtrusive JavaScript<br />

"Unobtrusive JavaScript" is an emerging technique in the JavaScript programming language, as used on the World<br />

Wide Web. Though the term is not formally defined, its basic principles are generally understood to include:<br />

• Separation <strong>of</strong> functionality (the "behavior layer") from a Web page's structure/content and presentation [1]<br />

• Best practices to avoid the problems <strong>of</strong> traditional JavaScript programming (such as browser inconsistencies and<br />

lack <strong>of</strong> scalability)<br />

• Progressive enhancement to support user agents that may not support advanced JavaScript functionality [2]<br />

The need for a new paradigm<br />

JavaScript historically has had a reputation for being a clumsy, hackish language unsuitable for serious application<br />

development. [3] [4] This has been largely due to inconsistent implementations <strong>of</strong> the language itself and the<br />

Document Object Model [5] in various browsers, and the widespread use <strong>of</strong> buggy cut-and-paste code. Runtime errors<br />

were so common (and so difficult to debug) that few programmers even tried to fix them, as long as the script<br />

behaved more or less the way it was supposed to; [6] scripts <strong>of</strong>ten failed completely in some browsers.<br />

The recent emergence <strong>of</strong> standardized browsers, JavaScript frameworks and high-quality debugging tools have made<br />

organized, scalable JavaScript code possible, and the emergence <strong>of</strong> AJAX interfaces has made it essential.<br />

Whereas JavaScript was once reserved for relatively simple and non-critical tasks such as form validation and<br />

decorative novelties, it is now being used to write large, complex codebases that are <strong>of</strong>ten part <strong>of</strong> a site's core<br />

functionality. Run time errors and unpredictable behavior are no longer minor annoyances; they are fatal flaws.<br />

Advocates <strong>of</strong> Unobtrusive JavaScript see it as part <strong>of</strong> the larger Web standards movement; much as the demand for<br />

cross-browser compatibility has driven the increasing emphasis on standardized markup and style, the increasing<br />

demand for rich Internet applications is driving the movement toward better practices with the use <strong>of</strong> JavaScript. The<br />

concept <strong>of</strong> Unobtrusiveness in relation to JavaScript programming was coined in 2002 by Stuart Langridge [7] in the<br />

article "Unobtrusive DHTML, and the power <strong>of</strong> unordered lists [8] ". [9] In the article Langridge argues for a way to

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!