Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Beginning Object Oriented Javascript Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Beginning Object Oriented Javascript Question" Watch "Beginning Object Oriented Javascript Question" New topic

Beginning Object Oriented Javascript Question

A Flatoff

Joined: Mar 22, 2005
Posts: 12
I checked bookpool and amazon. Couldn't find the book. Where can it be purchased?

Also is there any table of contents and a sample chapter that we can view? If not i'd recommend using Amazon's "search inside" feature.

Pauline McNamara

Joined: Jan 19, 2001
Posts: 4012
Hi A, you might want to check the post welcoming Stoyan Stefanov. There's a link to the book in that post.

(The welcome post looks like this: * Welcome Stoyan Stefanov)

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60732

Originally posted by A Flatoff:
I checked bookpool and amazon. Couldn't find the book.

What did you search for? Amazon link.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nimchi Yung
Ranch Hand

Joined: Jan 27, 2004
Posts: 71
I scanned through the sample Chapter (Chapter 2). It is all about
javascript baisc (types, conditions). Any idea why the author is
not offering a chapter talking about Object Oriented Javascript?

Stoyan Stefanov
Ranch Hand

Joined: Jul 16, 2008
Posts: 61
@A Flatoff - you can also check my signature for a link to the publisher's site

@Nimchi - the book has a little unusual approach which is to use the Firebug console as a training tool and this is described in chapter 2, so I thought it would be nice to show the reader what they type of code they can expect.

Other than that my thinking with the book outline was that people unfamiliar with OOP sometimes have troubles "getting it", so the approach is to introduce the OO related code gradually.

chapter 1 - (people often skip chapter 1 of computer books, so I tried to keep it really short ) - history, what's JS and an intro to the OO concepts in general - objects, properties, methods, inheritance, polymorphism...

chapter 2 - the basics, data types, loops, conditions. The thing with JS is that since about 2004, with Ajax, web 2.0 and so on, we (the web dev community in general) are in process of rediscovering JS and relearning the language we might have dismissed previously. So this chapter gives an opportunity for proper relearning, or simply learning, if you're new to JS.

chapter 3 - functions, a whole chapter because JS has many uses for functions. Also detailed explanation and examples of closures, which are powerful and often misunderstood topic

chapter 4 - objects. Now that the reader has the strong base, making the step towards objects seems like the most natural thing. In the end, in JavaScript objects are just hashes and some values in those hashes can be functions (hence methods). In this chapter the plot thickens and the reader understands the whole truth - in JavaScript functions are objects, arrays are objects, even null is an object, basically everything is an object with the exception of the 4 of the 5 primitive types from chapter 2, namely number, string, boolean, undefined. The chapter also goes through all the built-in objects with examples of using selected methods/properties (full reference is in the appendix)

chapter 5 - protoypes, an important topic in JS

chapter 6 - inheritance, a dozen ways to approach it. Here the reader feels at ease with the JS OO specifics and can really get creative.

chapter 7 - the browser, what types of objects do we have "for free" in the browser, BOM (the Browser Object Model, the book discusses only the cross-browser de-facto-standard properties of this non-standardized area), DOM, Ajax, JSON

Chapter 8 - coding and design patterns, where "coding" means JS-specific patters and "design" means JS implementations of the patterns from the book of four.

The appendices are references:
  • A - reserved words
  • B - built-in functions
  • C - built-in objects (that's a big one)
  • D - regular expressions

  • All the references are not dry descriptions (that's what the ECMA standard is for), but contain many examples. Throughout the book actually there are many one-line or few-line examples that the reader is encouraged to try out and tweak in the firebug console, which is great for quick hands-on experience with the topics.

    BTW, will soon publish a PDF of chapter 8, the patterns chapter so you can check out some of the more OO stuff.

    <a href="" target="_blank" rel="nofollow">my OOJS book</a>
    subject: Beginning Object Oriented Javascript Question
    Similar Threads
    Private methods
    Can the color for the disabled item be changed
    WA #1.....word association
    URGENT - NEED HELP - Block Code
    error in Marcus Green 2.