|
|||||||||||||||||||||||||||||||||||
|
23 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
55 of 61 people found the following review helpful:
3.0 out of 5 stars
decent introduction, marred by typos,
This review is from: Learning JavaScript (Paperback)
As an introduction to javascript, this book covers all the ground you'd hope it would. It introduces JS in the context of a standalone programming language with its various procedural constructs, before moving onto the Document Object Model and Browser Object Model, touches upon objects, and finds the time to explain Ajax. Finally, there's a whistlestop tour of the commonly used JS libraries like Dojo, Prototype and script.aculo.us. Shelley Powers also sprinkles her opinions on JS best practices throughout, with a bias towards favouring accessibility over whiz-bang flashiness. I would recommend being comfortable with XHTML and CSS as a prerequisite for this book - something like O'Reilly's own Head First XHTML and CSS would be very suitable.
If, like me, you know a few programming languages, but nothing about JS, and wanted a crash course so you could understand what all the fuss about the likes of Ajax or the Google Web Toolkit is, this is just what you need. So why am I only giving it three stars? First, I thought some of the features weren't very well explained - the writing lacks clarity when describing important points. Compounding this, a few of the examples are poorly chosen. Some of my quibbles may seem picky, but the feel of the book is that it's pitched at an inexperienced programmer, and a lot of the time I only followed the discussion because I was already familiar with the material from other languages. Some particular points follow. i) Accessing the length of various parts of a multidimensional array is illustrated with: alert(threedPoints[2][2].length); // prints out 3 alert(threedPoints[2].length); // prints out 3 alert(threedPoints.legnth); // prints out 3 ignoring the error on the third line (more on that later), as can be seen from the comments, a three dimensional array has been created where every dimension is of length 3 - surely making them of unequal size would have been more illustrative. ii) The example of the associative array manages to be even worse: assocArray["one"] = "one"; assocArray["two"] = "two"; I struggle to think of an example that could be more misleading. iii) While the author recognises the importance of regular expressions, and goes into reasonable detail, the material is not terribly well organised, and the examples become complicated too quickly. iv) The section on chained constructors, and the use of call and apply is also unclear - disappointing, given I was most interested in the prototype style of object creation that JS uses. v) The callback functions of Array are not well described. The function Filter, apparently, "ensures that elements are not added to any element unless they pass certain criteria". So, elements are not added to any element - huh? wha? Those familiar with the likes of Lisp, Python, and especially the iterators in Smalltalk and Ruby will be able to pick up what's going on, but newcomers may be baffled. vi) The attempt to explain recursion is weak. Admittedly, most programming books do a bad job, but what's here is far too short to be useful. An illustrative quote is: "think of each iteration of the function call as pushing the string and numeric sum onto a stack, and when the numeric array has been traversed, the string and number have to be popped up through the stack to the top". I'm not saying this is wrong, but I do not believe that someone who's just been introduced to recursion would find this description helpful. vii) Not all the programs have their output shown. This wouldn't be easy for some of the more complicated examples, but a lot of them are text-based. Second, there are lots and lots of typos in the book. When even a JS noob such as myself spots them, you know there's something up. Fortunately, they're only minor, and they generally aren't sufficiently bad to mislead. As an example, when function literals are introduced, the rather vital keyword 'function' is missing, but the examples quickly clarify the matter. However, elsewhere, some of the code won't actually run as presented (as early as the second example, alas), and it does take the shine off the production. Either the technical reviewers were asleep, or the editors at O'Reilly ignored them. Someone ought to be embarrassed, at any rate. None of these things are sufficiently show-stopping for someone who knows a little programming, so I would still recommend this book before wrestling with enormous tomes like David Flanagan's JavaScript - The Essential Guide, or a dedicated Ajax book. Complete beginners and the inexperienced, however, should look elsewhere, I'm afraid.
20 of 23 people found the following review helpful:
2.0 out of 5 stars
NOT for beginners!,
By
This review is from: Learning JavaScript (Paperback)
I recently purchased this book based on a lot of the positive feedback it had received in comparison to other JS books. However, after reading the book I was sorely disappointed and here's why:
1. Book is Full of Errors -- Over 400 Errors to be Exact... This book is full of errors, both in the code samples as well as in the explanations. This is further solidified by the fact that the book's accompanying errata page (found via the O'Reilly web site) currently lists 400+ official and user-submitted errors and amendments to the book. I think I speak for every consumer when I say that purchasing a technology-based book with a bunch of errors is simply unacceptable and a total waste of money. While many of the errors are simple and are relatively easy to fix if you're an experienced programmer, most of them may vex readers that are new to JS and programming in general. I buy a book of this caliber to learn and NOT to fix somebody's code samples. 2. JavaScript...What JavaScript? The majority of this book deals mainly with programming practices and standards, most of which you can find online or in other manuals. I purchased this book to learn more about JavaScript but instead got a manual on object-oriented scripting, and many techniques that are impractical when applied to JS. 3. Vague Code Samples The book suffers greatly from ambiguous code samples that introduce concepts that are not clearly explained or not explained at all. Again, if you're an intermediate programmer or have had experience with JS in the past, you may be able to decipher the cryptic code samples in this book. Otherwise, seek another source to truly learn JS from the start, such as "The Book of JavaScript, 2nd Edition: A Practical Guide to Interactive Web Pages." Overall, this book had a couple of decent chapters that answered some questions that I had about JS. But the reason I purchased the book was to learn JS from the start. I made the safe assumption that this book would help me accomplish my goal since it's clearly called "Learning JavaScript." Ultimately, I learned only one new thing (towards the end of the book) that dealt with some AJAX and DHTML. I highly suggest reading another book first then perhaps revisiting this one later.
19 of 23 people found the following review helpful:
5.0 out of 5 stars
More than a beginners book!,
By
This review is from: Learning JavaScript (Paperback)
Based upon the title, you would think that it's a very basic beginners JavaScript book, but you would be wrong. When I first started reading the first 10 pages of chapter 1 I knew this would be a great edition to my ever growing library of JavaScript books. This book covers the very popular scripting language from a programming perspective, not like a "here's how to create a variable and use document.write to the page".
Just within the first chapter the author talks about development tools such as the Firefox JavaScript console and Firefox DOM Inspector, and accessibility. Not the normal first chapters I have read in other JavaScript books. The book has a couple introductory chapters on the syntax basics such as Data Types and Variables (Ch. 2), Operators and Statements (Ch. 3), Objects (Ch. 4), and Functions (Ch. 5). Though these chapters really give you a lot of detail on the technical aspect of the language such as: equality with strings and objects, ternary operator, FIFO queue array techniques, anonymous functions, function closure and memory leaks. These more advanced topics I've never seen before in basic introduction chapters before. It was really interesting re-learning the basics with reviewing some new techniques and ideas. Then the book focuses on events, event bubbling and event handlers (Ch. 6) and forms and JIT Validation (Ch. 7). The JiT validation is a technique that is has been done a long time with JavaScript (validation after every form field entry) and has been usually replaced with form submission validation but the author has some good techniques with adding event listeners that may change your mind about it. The next chapter (Ch. 8), the author reviews using cookies, but also talks about alternative storage techniques like using Shared Object (SO) in Flash. This is only briefly mentioned but is something in never even heard about before so it was just interesting to think about another technique. Also, a practical application for SO storage was talked about with the Dojo.Storage component by Brad Neuberg that is a very popular in many Ajax toolkits. It kind of wets the appetites for more information, though. Additional topics of interest talked about in Chapter 8 were Cross-Site Scripting (XSS) and how to prevent similar type of JavaScript attacks that are gaining popularity like SQL Injection did a few years ago. The meat and potatoes of the book are the chapters on DOM (Ch. 10) and Creating Custom Objects (Ch. 11), Ajax Basics (Ch 13), APIs (Ch.14). This is where you get practical knowledge on all the new things these "JavaScript libraries are doing. There's too much information to summarize these chapters but believe me they are worth the price of the book alone. Unless you are a JavaScript expert, this is a book that you should buy to bring up your skills up to speed. A must buy!
11 of 13 people found the following review helpful:
2.0 out of 5 stars
Good info, not good teaching,
By
This review is from: Learning JavaScript (Paperback)
The author definitely sounds like she knows all about javascript, but there doesn't seem to be a real emphasis on teaching for a "learning" book.
The first couple chapters are a dry overview of the nuts and bolts of javascript, if you've have programming experience this will be familiar. After that the book goes into broader topics, but doesn't do much in the way of teaching. More examples, and more specifics would've been helpful. I wouldn't recommend this book, there has to be a better introductory javascript book on the market.
24 of 31 people found the following review helpful:
4.0 out of 5 stars
More of a gentle introduction to Javascript,
This review is from: Learning JavaScript (Paperback)
This book assumes you have experience with (X)HTML and CSS, as well as a general understanding of how web applications work. Programming experience isn't necessary, but the book covers all aspects of JavaScript, some of which are relatively sophisticated. Though the heavier pieces of this book are few, you will need to understand JavaScript enough to work with the Ajax libraries by the time you get to that part of the book. After you finish this book, "Javascript The Definitive Guide", may make more sense. Either book is OK for those new to Javascript, this book is just more of a gentle introduction, especially if you are not a programmer.
The book is broken into four sections: Chapters 1 through 3 provide an introduction to the structure of a JavaScript application, including the simple data types supported in the language, as well as the basic statements and control structures. These establish a baseline of understanding of the language for the sections that follow. Chapters 4 through 8 introduce the main JavaScript objects, including the function, script access for web-page forms, event handling, scripting security, and working with cookies. Combined, these topics comprise the core of JavaScript, and with these chapters, you can validate form elements, set and retrieve cookies, capture and provide functionality for events, and even create JavaScript libraries. The functionality covered in these chapters have always been basic to JavaScript. Chapters 9 through 11 cover more sophisticated aspects of web-page development. These chapters cover the Browser Object Model and the Document Object Model, and show how to create custom objects. Understanding these models is essential for creating new windows and individually accessing, modifying, and dynamically creating page elements. In addition, with custom objects, you can then move beyond the capabilities that are prebuilt into either language or browser. Chapters 12 through 14 get into the advanced uses of JavaScript, including DHTML, Ajax, and some of newer libraries that support both. Chapter 1, Introduction and First Looks Introduces JavaScript and provides a first look at a small web-page application. This chapter also covers some issues associated with the use of JavaScript, including the many tools that are available, as well as issues of security and accessibility. Chapter 2, JavaScript Data Types and Variables Provides an overview of the basic data types in JavaScript, as well as an overview of language variables, identifiers, and the structure of a JavaScript statement. Chapter 3, Operators and Statements Covers the basic statements of JavaScript, including assignment, conditional, and control statements, as well as the operators necessary for all three. Chapter 4, The JavaScript Objects Introduces the first of the built-in JavaScript objects, including Number, String, Boolean, Date, and Math. The chapter also introduces the RegExp object, which provides the facilities to do regular-expression pattern matching. Regular expressions are essential when checking form fields. Chapter 5, Functions Focuses on one other JavaScript built-in object, the function. The function is key to creating custom objects, as well as packaging blocks of JavaScript into pieces that can be used, again and again, in many different JavaScript applications. This JavaScript function is relatively simple, but certain aspects can be complex. These include recursion and closure, both of which are introduced in this chapter and detailed in Chapter 11. Chapter 6, Catching Events Focuses on event handling, including both the original form of event handling which is still commonly used in many applications, as well as the newer DOM-based event handling. Chapter 7, Forms and JiT Validation Introduces using JavaScript with forms and form fields, including how to access each field type--such as text input fields and drop-down lists--and validate the data once retrieved. Form validation before the form is submitted to the web server helps prevent an unnecessary round trip to the server, and thus saves both time and resource use. Chapter 8, The Sandbox and Beyond: Cookies, Connectivity, and Piracy Covers script-based cookies, which store small pieces of data on the client's machine. With cookies, you can store usernames, passwords, and other information so that users don't have to keep reentering data. In addition, since discussion of cookies inevitably leads to discussions of security, the section also covers some security issues associated with JavaScript. Chapter 9, The Basic Browser Objects Begins to look at object models accessible from JavaScript, starting with the Browser Object Model--a hierarchy of objects including the window, document, forms, history, location, and so on. Through the BOM, JavaScript can open windows; access page elements such as forms, links, and images; and even do some basic dynamic effects. Chapter 10, DOM: The Document Object Model Focuses on the Document Object Model, a straightforward, but not trivial, object model that provides access to all document elements and attributes. There are documents that are based in XML as well as HTML. Though the model is comprehensive and its coverage is fairly straightforward, there could be some challenging moments in the chapter for new programmers. Chapter 11, Creating Custom JavaScript Objects Demonstrates how to create custom objects in JavaScript and covers the entire prototype structure that enables such structures in the language. Some programming language concepts such as inheritance and encapsulation are discussed. Chapter 12, Building Dynamic Web Pages: Adding Style to Your Script Provides a general introduction to some of the more commonly used Dynamic HTML effects, including drag and drop, collapsing and expand page sections, visibility, and movement. Some understanding of CSS is required. Chapter 13, Moving Outside the Page with Ajax Introduces Ajax, which is actually not a complicated use of JavaScript. In addition to covering the components of Ajax, the chapter also provides one example of an application that has promoted Ajax probably more than any other: Google Maps. Chapter 14, Good News Covers some of the more popular libraries you can download and use for free including Prototype, Sabre's Rico, Dojo, MochiKit, Yahoo User Interface, and aculo.
13 of 16 people found the following review helpful:
4.0 out of 5 stars
Most likely the best starting point to date for JavaScript,
By
This review is from: Learning JavaScript (Paperback)
The advent of Ajax brings new approaches in developing JavaScript, increased complexity that requires more up to date techniques. As a result most of the existing entry level books on JavaScript are somewhat obsolete. This book brilliantly fills the gap. Shelley Powers is a seasoned author and deliver a gentle introduction to the language. The writing has a pleasant, personal style that makes the book more engaging than the average computer manual. The author is also a DHTML veteran, this allows her to bring an interesting historical perspective to the table. She is very aware of the reasons that ultimately lead DHTML to its failure and warn the readers about repeating the same old mistakes; definitely a valuable plus. Most likely the best starting point to date for JavaScript
15 of 19 people found the following review helpful:
3.0 out of 5 stars
I hope this isn't the best out there,
By
Amazon Verified Purchase(What's this?)
This review is from: Learning JavaScript (Paperback)
I've been a programmer for 35 years. On the web side, I've used PERL, CGI, and PHP. So I could work around the problems (and spot the numerous errors). But it was still disappointing. On the one hand, the book advertises that it's appropriate for "someone new to development" and then helpfully explains why a conditional statement is called "conditional." On the other hand, the author jumps right in in Chapter 4 to discussing objects (and related terms such as properties, methods, encapsulation, and instantiation) without providing any definitions at all. Often, the code examples given to demonstrate something simple crucially (and unnecessarily) rely on other constructs that haven't been introduced. Needlessly, the author wraps code fragments within the same, redundant set of declarations over and over again. This distracts from finding the code, and takes away from space that could be much better used with additional and much-needed examples. Like I said, if you've been around the block a few times, you can piece it all together. But the obstacles it presents to learners are really avoidable and unnecessary. After reading 4 chapters, I'm back at Amazon looking for something better.
7 of 8 people found the following review helpful:
1.0 out of 5 stars
Ughhh!!!!,
By William H. White "VBA Programmer" (New Jersey, USA) - See all my reviews
This review is from: Learning JavaScript (Paperback)
One does not read this book; one is tortured by it.
There are two major complaints I have with this book. The first is the number of errors in the text. (If you read another review of this book and it does not cite the problem with errors very early in the review, then you must be reading a review from Ms. Powers's fiance, sister-in-law, best friend, or cousin.) I have never seen anything close to this level of ineptitude in any other book I have ever read, programming-related or not. Just to tip-toe through this cow pasture: - By my quick count, there are eighty-three errors listed on the book's errata web page. (It took me about two hours simply to go through the book and write in all of the corrections from the errata page.) - Ms. Powers occasionally manages more than one error per page. - Not only do the errors occur often, the arise early. There are errors in each of the book's first three Examples, with Example 1-3 alone mangaging to contain two errors. - Beginning with Chapter 2, Ms. Powers concludes each chapter with a number of exercise questions - the answers to which are provided at the end of the book. Of the five Chapter 2 answers (i.e., the first five questions and answers in the book) there are errors in three. - Page 11 is missing, well, two pages! The errata file contains ten paragraphs of text that is missing! - Any number of errors are "simple" typos: the text uses a hyphen when there should be an underscore, variable names are misspelled, errant characters are enclosed, words are duplicated - that kind of thing. While this is sloppy and wholly unprofessional, one could argue that in The Grand Scheme of Things such errors are minor. However, a number of errors are more egregious. For example [all CAPS are mine].... -On page 94 the book talks about how "the shift RETURNS the first element." Oops! The text should talk about how "the shift REMOVES the first element." -On page 101 a sentence which begins "If a condition IS met...". Darn. It should read "If a condition ISN'T met..." (Details, details...) -On page 127 a phrase "cascade means that the LOWEST..." should be (Anyone? Anyone? Class?...) "cascade means the HIGHEST..." All in all, this is just shameful stuff. If you have a quasi-morbid sense of curiosity you might want to check out the Acknowledgments section which concludes Ms. Powers's Preface. There she thanks her editor, three "tech and content reviewers", a production editor, and a copy editor. I say "quasi-morbid sense of curiosity" because, presumably, all six individuals have since been, as the British like to say, "sacked." All that said, let us gingerly put aside, for a moment, the stupefying number of errors in this book. How does it fare otherwise? (Or, to cite a quip I just love, "Other than that, how was the play, Mrs. Lincoln?") Well, I come now to my second major complaint. Errors and typos aside, the book is just terribly written. The organization is dreadful and her grammar is rotten. In fact, the only thing I see Ms. Powers having done well is to compiled the epitome of how NOT to write a book on programming. The two essentials of a good book on programming are that the author: 1) Organizes the material in a logical, coherent manner. A GOOD author introduces essential concepts at the very beginning, and then steadily builds upon and expands upon what the reader has just learned. 2) Takes absolutely every pain to minimize 'jumping ahead' on topics. Ms. Powers, however, repeatedly drags the reader into complex asides before bailing out by saying "but we will cover that topic later." She does this from the get-go, and it is maddening. Here are some examples from Chapter 1 ALONE... - In a section about cross-browser incompatibility (p.4), Ms. Powers states most of these incompatibilities "are based on differences in the underlying Document Object Model (DOM) exposed by the browser...". She then goes on for a couple of sentences about why this is so. I, for one, knew next to nothing about the Document Object Model, and I bought the book, in part, because I saw that it contained a discussion of the DOM. Ms. Powers's in-depth discussion of the Document Object Model, however, occurs in Chapters 9 and 10! She should either have made these chapters, perhaps, numbers 1 and 2, or she should should avoid mentioning the DOM until the subject is covered. - In the section, beginning on p. 7, in which she introduces use of the <script> tag, Ms. Powers notes that this tag needs to include an attribute defining what type of script is being used. While Ms. Powers's book is, of course, about JavaScript, she duly notes that if you want to use any one of four other scripting languages the <script> tag attribute would be, say, "text/ecmascript" or "text/vbscript". I suppose this is all well and good, though it strikes me as something that could easily have been left to the end of the book. However, Ms. Powers then comes out of left field with this (p.9): "All these type values [i.e., the type of script being used] describe the MIME type of the content. MIME, or Multipurpose Internet Mail Extension, is a way to identify how the content is encoded (i.e., text), and what specific format it is (javascript). The concept arose with email, ..." Whoa! Where did the discussion of MIME come from?! Ms. Powers has not discussed MIME previously, and frankly, does not return to it for over 200 pages! In fact, as I reread this section, I found I understood the material much better simply by skipping over her discussion of MIME. To this day I don't understand MIME, nor do I want to. I imagine most novice programmers also understand little about MIME. Why bring MIME up then? IMHO, it serves only to slow down and irritate the reader. - Later on the same page Ms. Powers goes through a discussion of how there used to be a language attribute for the <script> tag, and shows how this attribute was used to finesse the problem of writing script code that would work regardless of the browser being utilized to view one's web site. She then writes, "Eventually, though, the preference shifted to an approach called 'object detection' - a move only encouraged when the language attribute was depracated. We'll look at object detection more closely in later chapters, particularly those associated with Ajax. For now, object detection involves testing to see if a particular object or property of an object exists..." Argh!!! Once again Ms. Powers befuddles the reader. She throws out this new and confusing concept called "object detection", but then tells you she won't explain it until later in the book! It would have been much easier had she simply said something like "The language tag has been deprecated, so the approach just shown no longer works. The current method for dealing with cross-browser incompatibility will be discussed in full later in the book, in the section on Ajax." Much simpler, eh?? - As I mentioned, organization aside, the English language is an abused victim in Ms. Powers's clumsy hands. I will give just one example, from page 6. Under a subheading that Javascript can "Hide and show elements [of a web page]", Ms. Powers writes: "Based on personal preferences or user actions, show or hide page content, such as form elements, expanding writing, and changing the displayed size of an image." Huh?? Does no one at Wiley understand the concept of parallel construction? How about the concept of restrictive vs. parenthetical clauses, which in turn governs whether these clause should be - or should NOT be - offset with a comma? Heck, would ANY editor at Wiley care to take a crack at diagramming Ms. Powers's little cow pie of a sentence? Overall, I have a vision of Ms. Powers having sat down to write her tome, and of being overwhelmed with unconnected bits of knowledge about JavaScript, and of simply rushing off to transcribe those thoughts in almost random order. Were she writing a book about driving a car, she would undoubtedly begin with a chapter about buckling up and turning the ignition key, but by the end of Chapter One she would veer off into discussions about how electrical signals travel down wires, how a rotor cap turns inside a distributor cap, and about the ratio of starter engine amps relates to engine liter size.... and would, realizing she'd gotten rather off-track, veer back each time by saying "But we'll discuss that later." I have to admit that I never did finish the book. I TRIED! In fact, I re-started this book at least twice. I wanted to be sure that it wasn't my pea-sized brain that was the reason Ms. Powers's book is so incomprehensible. I highlighted and reviewed text. Again, I read some sections THREE times. But, my re-readings increased not my knowledge of JavaScript, but my knowledge of what a disaster the book is. On my last foray into "Learning JavaScript", I finally gave up without having even made it back to page 90. Ummmm.... I would recommend one NOT buy this book. (At least not for reading....)
9 of 11 people found the following review helpful:
1.0 out of 5 stars
Too many errors,
By
This review is from: Learning JavaScript (Paperback)
I am an experienced software engineer who has worked in many languages and is trying to get up to speed with JavaScript(JS). I am a novice when it comes to JS but I have used it in a commercial environment before.
I have returned this book since the number of errors in the examples and question sections are far too many. These sections are the important part of the book that one learns from. I got halfway through Chapter 3 and gave up since almost half of all the examples are incorrect. For example an alert("some string") call was listed with three different strings in the example, a reference to it in the text and the expected outcome. Also for anyone who is not a developer or has little knowledge of common terms in development this book is NOT for you. Shelly assumes you know what a strongly/loosely typed language is and other such concepts.
4 of 5 people found the following review helpful:
1.0 out of 5 stars
This book is a train wreck,
By
This review is from: Learning JavaScript (Paperback)
Beginning with the first example, the book is filled with errors (function `hello()' is called without being defined in example 1-1). Some (not all) are enumerated on the book's errata page. Since the first half of the book discusses syntax, a CS background can allow a reader to read around the errors. The second half discusses BOM, DOM, and Ajax making it's impossible to spot the errors without being a JavaScript expert, which makes the book worthless.
The last third of the book is written as a first person narrative. The book should be about JavaScript, not the author. Bad writing takes place everyday. How a book like this made it past the editors at a reputable publisher like O'Reilly makes one wonder about their process. Avoid this book. |
|
Most Helpful First | Newest First
|
|
Learning JavaScript by Shelley Powers (Paperback - October 24, 2006)
Used & New from: $0.33
| ||