Free Chapter: “Coding and Design Patterns” from Stoyan Stefanov’s Object-Oriented JavaScript

September 26, 2008 at 7:29 am by Eric Miraglia | In Development | 7 Comments

Stoyan Stefanov's 'Object Oriented JavaScript' [book cover]Stoyan Stefanov is a member of Yahoo’s Exceptional Performance team; he’s worked on a variety of performance-related projects at Yahoo, including the popular YSlow plugin for Firebug. He’s also a contributing author here on YUIBlog.

Stoyan’s latest project is Object Oriented JavaScript, a new book from Packt whose simple goal is to help you learn how to “think in JavaScript.” Stoyan and his editors were kind enough to let us share with you Chapter 8 from OOJS — “Coding and Design Patterns.”

Among the coding patterns explored in this chapter:

  • Separating behavior
  • Namespaces
  • Init-time branching
  • Lazy definition
  • Configuration objects
  • Private variables and methods
  • Privileged methods
  • Private functions as public methods
  • Self-executable functions
  • Chaining
  • JSON

Design patterns include:

  • Singleton
  • Factory
  • Decorator
  • Observer

The sample chapter is an excellent standalone resource, but the full volume is outstanding as well. Our thanks to Stoyan and his editors for allowing us to freely share the coding and design patterns content here.

Share and extend: Bookmark with Yahoo! My Web | Bookmark with del.icio.us | digg it! | reddit!

7 Comments »

RSS feed for comments on this post. TrackBack URI

  1. [...] 8 of the Object-Oriented JavaScript is available at the YUIblog.com. [...]

    Pingback by phpied.com » Blog Archive » OOJS book free chapter 8 on YUIblog — September 26, 2008 #

  2. On page 285:
    var obj = {
    function: doSomething() {
    console.log(’sure, asap’);
    }
    };
    Should probably be:
    var obj = {
    doSomething: function() {
    console.log(’sure, asap’);
    }
    };

    Comment by matt — September 26, 2008 #

  3. Ha, nice catch, thanks very much, Matt!

    Comment by Stoyan — September 27, 2008 #

  4. [...] YUI blog 那里看到,Stoyan Stefanov (是个牛人,好像Yahoo UED 的就没有不是牛人的) [...]

    Pingback by 面向对象的JavaScript第八章试读 | flex学习资源 — September 28, 2008 #

  5. [...] Fonte: YUI Blog [...]

    Pingback by Tupi » Blog Archive » Membro da Yahoo! lança o livro “Object-Oriented JavaScript” — October 2, 2008 #

  6. [...] Free Chapter: “Coding and Design Patterns” from Stoyan Stefanov’s Object-Oriented JavaScript … Stoyan’s latest project is Object Oriented JavaScript, a new book from Packt whose simple goal is to help you learn how to “think in JavaScript.” (tags: yuiblog.com 2008 mes9 dia2 OOP JavaScript book capítulo_de_livro blog_post) [...]

    Pingback by rascunho » Blog Archive » links for 2008-10-02 — October 2, 2008 #

  7. Thanks for the chapter, I read a lot of it and bookmarked it for reference. Thanks!

    Comment by Jim — October 14, 2008 #

Leave a comment

Note: Comments are moderated for first-timers. Spam deleted.

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Hosted by Yahoo!

Copyright © 2006-2010 Yahoo! Inc. All rights reserved. Privacy Policy - Terms of Service

Powered by WordPress on Yahoo! Web Hosting.