Customer Reviews

34
4.1 out of 5 stars
Pro JavaScript Techniques
Format: PaperbackChange
Price:$30.94 + Free shipping with Amazon Prime
Your rating(Clear)Rate this item


There was a problem filtering reviews right now. Please try again later.

68 of 70 people found the following review helpful
on March 19, 2007
Format: Paperback
§

"Pro JavaScript Techniques" is definitely for experienced and advanced scripters. The level of abstraction is high in this treatment of the latest trends of JavaScript. If you are looking for ready-made scripts to solve some specific problem in your site or application, you are looking for a different sort of book.

If you have ever gone to Douglas Crockford's site to learn about advanced concepts in JavaScript, and withdrew dazed and abused by his obtuse examples -- but with a conviction that there was something valuable to learn there -- this book is for you.

The author states, and I agree, that understanding Chapter 2, "Object Oriented JavaScript" is the key to the puzzle. "The phrase object-oriented JavaScript is somewhat redundant, as the JavaScript language is completely object-oriented and is impossible to use otherwise. However, a common shortcoming of most new programmers is to write their code functionally without any context or grouping."

The chapter contains a clear exposition of what the author means by "context or grouping." In fact, his concise but relevant example code to explain the distinction between privileged methods and static methods lit up all sorts of light bulbs in my head...Finally! :-)

Be aware that the author's approach has a particular bias in that it is often directed at the *programmer* coming into Web scripting. The idea is to make the JavaScripting world appear more like the programming languages already known. You learn "how to go about writing a variety of object-oriented code to suit anyone coming from another programming language."

This is a great book -- but not for all.

§
55 commentsWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
33 of 33 people found the following review helpful
on January 28, 2007
Format: Paperback
As a javascript dabbler, I was looking for a book aimed at someone already familiar with javascript and found this one. Having read a few apress books, I felt pretty confident that the quality of this one would be at least reasonable and I definitely wasn't let down.

The executive overview is that this is an excellent book for those who are already working in javascript and are looking to improve their game. It covers a world of techniques very well. Highly recommended.

Now, the longer review...

This is an excellent book that deftly avoids the pitfalls so many books that claim to be aimed at people familiar with the topic. So many of these types of books try to be accessible they end up giving a lot of basic information mixed in with the advanced information - ultimately becoming a text unsatisfying for people of any level. This book devotes the beginning 15% of pages going over the basics, but it covers a ton of ground by acting more as a refresher course - assuming at least basic familiarity with most of the topics. I think it really did a great job of this, starting in Chapter 1 with a broad overview of OO javascript, cross browser issues, being serious and rigorous with your development process and their particular views on how to deploy javascript unobtrusively.

The subsequent 3 chapters are the refresher course. These chapters work through a ton of topics, at times it refers you to sites on the net for further information. He starts the overview with pretty much every topic in OO development, from scope and closures to a remarkably sweet and concise description of context. He brings together all these topics and how together they form the building blocks for javascripts particular flavor of OO. Then he tackles the various ways to deal with inheritance - here he covers ways to do it yourself as well as a couple libraries that you can use. He also talks about packaging and ways to make your code play well with others. He wraps up the overview with a chapter about debugging and testing - a topic I think a bit under-discuessed in javascript and I was happy to get his views and suggestions on how to deal with these.

With those conveniently out of the way he dives right into several chapters where he talks about the DOM, events and css scripting and how they relate to his goal of creating unobtrusive scripts where no javascript intrudes on nice clean html. He covers these topics by presenting a small problem and working through the code to solve that problem. It's very easy to follow and works well. He introduces several libraries to help with the process, but is careful always to explain the fundamentals of how things are actually working under the hood. Too many books that start working with libraries gloss over what's actually happening and wind up being little more than extra documentation for the libraries, fortunately this book doesn't suffer from this problem.

He then goes into two more chapters bringing it all together with larger in depth projects, enhancing forms with validation and other features as well as a javascript image gallery.

The last major part covers Ajax - one chapter goes into nice detail and builds several helpful library functions. He also covers handling the return of these requests and the pros/cons of xml vs html vs json. And then it goes into two bigger projects enhanced blogs, autocomplete and wiki.

Finally, he talks a little about where javascripts going and provides some references for DOM, events and browsers in the appendix.

There's not much negative to say about this. It gives a great overview for those who don't know the language inside and out, it covers a huge number of topics in a very readable and instructive way and gives a very useful reference to DOM and event scripting at the end. It does suffer slightly from putting some code in that is unexplained until a future point in the book. But, it doesn't happen often.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
24 of 25 people found the following review helpful
on May 28, 2007
Format: Paperback
In the days of Ajax, a good understanding of JavaScript is crucial in really understanding how Ajax works. This book by John Resig (developer of JQuery) has written an intermediate - advanced book on JavaScript teaching the reader topics such as object-oriented practices, creating reusable code, DOM, events along with many useable examples. With all the fancy JavaScript libraries out now, it is good to have a book that teaches the reader how to create your own libraries or at least how many of those are create with proper object-based development.

Until Ajax came along (which brought about JS libraries), knowing how to create objects and reusable code wasn't really explained much in books. This book talks about it in the first chapter, where John shows how to create objects via Prototyping, function overloading and using the Object constructor. John also talks about closures, scope, property and method creation and namespacing. All of these topics are found in other languages (C++, Java, VB.NET), but were not really used much in JavaScript until recently. John also covers in detail inheritance (classical and prototypal) and goes through other libraries (YUI, Dojo, Prototype, etc) and how they are created. A very thorough explanation on objects and creating reusable code in JavaScript. Actually this is one of the few books that have covered these topics in such detail. Many other books just skimmed the surface with these topics that made it hard for the newbie to understand.

What current JavaScript book could be published without talking about the DOM. Every book nowadays talks about this topic since everything out on the web seems to use it in on form or another. This book goes in to great detail talking about the DOM with a complete explanation of the basics of what it is, when it can be accessed (waiting for the DOM to load), finding elements on a page, standard DOM methods and 3rd party functions that have been used for years to fill in the gaps of DOM methods that are not available. For instance: addEvent, getElementsByClassName, CSSQuery, JQuery and others. Without a solid foundation of the DOM, many of the cool things that are done on the web today could not be done.

Another important and often not talked about topic is event registration. Chapter 6 of this book goes into the various ways and element can respond to an event. From event phases, (capturing and bubbling), traditional event binding (DOM Level 1) to W3C DOM Binding. This can be a very difficult topic to understand since there are a few differences between the way IE and other browsers handle it. But John explains each difference in great detail and makes you fully aware of how to handle it with some nice examples.

John also covers creating unobtrusive scripts which doesn't assume that JavaScript will be available in the user's browser and how to handle this scenario. This also ties in to separating the three layers (Presentation, Structure and Behavior) which is also discussed. This teaches the user how to keep your inline JS event handling out of the HTML and in a separate .JS file. This makes updating your code easier and less problematic in the future.

The rest of the book focuses on using JavaScript with CSS and applying the previous techniques covered in useful examples such as form validation, creating a dynamic image gallery and some simple Ajax examples.

This is a great book if you know the basics of JavaScript and want to take your skills to the next level and especially if you're not a "true" programming and need a little more explanation. A great book!
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
11 of 11 people found the following review helpful
on January 19, 2008
Format: PaperbackVerified Purchase
After writing disorganized (yet effective) JavaScript functions for seven years, I really wanted to get more out of the language. I wanted to code more efficiently. As each new project started, I found myself scurrying to find old functions strewn across different computers or servers. Even when I found this code, I would often need to make some significant changes to it.

So, I did what any self-taught front-end developer would do: I hit the online tutorials. Online tutorials didn't really do it for me, though. The good tutorials seemed too short, and I kept reverting back to sloppy coding after a few days.

Then I came across this book.

The examples are excellent in demonstrating how the language can really work for you if you're willing to put the time into it. That being said, this book is not for beginners. This book is probably best for three groups of people:

1) Intermediate JavaScript developers who are ready to finally adopt code reuse and reap the nice things a loosely typed, object-based language can give you.

2) Java/C++ programmers who need to pick up JavaScript for a project. These people are already familiar with OO concepts and will probably have an easier time learning the language from a book like this.

3) Ambitious beginners with a lot of patience.

After only 3 chapters, I started to think about JavaScript in a different way. For the first time ever, I found myself reusing code with little to no change required. My code was easier to read, too.

I'm a big proponent of activities that give back the time you invest. Bad books don't do this. Good ones, like this book, do.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
12 of 12 people found the following review helpful
Format: PaperbackVerified Purchase
I agree with only one other reviewer who commented on the typos, etc. The demo code does not work until you debug it. The first couple of chapters on Javascript code are very good. The chapters on Forms (8) and Lightbox(9) are so poor I stopped reading. I am a jQuery user and admire Resig's contribution, but this book should be skipped.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
10 of 10 people found the following review helpful
on April 5, 2007
Format: Paperback
I an avid user of the concise JavaScript library jQuery. Though I am not a Star Trek fan at all, I like to think of jQuery as a universal translator of sorts. As long as I can intelligibly express in logical JavaScript syntax what I want to happen, jQuery does the heavy lifting, making it work in multiple browsers on differing operating systems, and it is all done unobtrusively. Needless to say, when I heard of the jQuery author writing a book, I was eager to read it.

I have just finished Pro JavaScript Techniques, penned by John Resig and tech-reviewed by Dan Webb. Let me just say that this book does not disappoint. This book takes a straightforward approach, and presupposes a fair amount of familiarity with JavaScript. It does not re-hash the history of the language as with many beginner books, and instead gets right into the fray. It picks up where its Apress predecessor Beginning JavaScript left off.

I appreciated that while this book could have easily been used as a selfish proclamational platform for jQuery, Resig took the high road and presented in-depth examples of writing complex DOM scripting. He also touches on other popular JS frameworks: Dojo, Moo.fx, Script.aculo.us and Prototype.

He also gets into the principles behind writing object-oriented code and optimizing it for reusability and avoiding of namespace collisions, when working alongside other developers. He then covers how to make the best use of Ajax, and the implications behind accessibility and need for a fall-back plan.

One of the serendipitous moments for me was seeing the name of a former coworker, Godbit contributor Cody Lindley. He was mentioned for his work on ThickBox, an in-browser modal window popup which can be used for image galleries and Ajax content. It runs atop the jQuery library, and I had the privilege of making the animated loading icon for it.

As the book's byline touts, this is a book full of real-world scenarios. As such, there are several code-complete examples: basic animations, form validation, infinitely scrolling WordPress blog archive, image gallery, auto-complete search, and an Ajax wiki. The last section covers what's on the JavaScript horizon: version 1.6, 1.7, Web Applications 1.0 recommendation, and the canvas tag.

There are also three appendices which are well worth reading, a DOM reference, Events reference and modern browser overview. When it's all said and done, this book is one that no scripting pro should be without. I am already eagerly awaiting Resig's next printed endeavor, the definitive jQuery Book.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
9 of 9 people found the following review helpful
on February 22, 2007
Format: PaperbackVerified Purchase
Pro Javascript Techniques by John Resig was a very in depth look at Javascript and its capabilities. I loved this book for the simple fact that the first chapter started by introducing you to objects in Javascript. No time was wasted on the basics, you were diving in deep right from the beginning. Also, even though John is the creator and lead developer of the jQuery Javascript library, this book was not about pushing his framework. He did a great job of introducing many of the different frameworks and listing their strengths and purposes.

The entire book had you building a library of usable scripts that allow for great portability while using Javascript in your applications (or even your personal website). Each chapter discussed the scripts, their functionality, their support, and giving great details to how they worked. Most chapters also gave you examples of the scripts in a working environment. A quick breakdown looks like this:

The first part of the book discussed Object Oriented Javascript. This included information related to creating your own objects and extending the core javascript objects. He then moved on to discussing testing of your code and how to package it for distribution. This is especially helpful for those working in an environment with multiple developers/programmers. Thankfully, he discussed unobtrusive DOM scripting, which still may be new to some developers. The first part closed with discussions related to AJAX and browser support, both of which we would see more of later. All of part one was a brief introduction to what we would read through the rest of the book

Part two discussed Object Orient Javascript in more detail. This included things such as basics of objects, object creation, references, overloading, scope, and closures. I found this chapter to provide a solid foundation for the rest of the chapters to come, as well as very descriptive related to objects. The next few chapters discussed creating reusable code and shined some light on several of the libraries available. Also, we got a glimpse into the wonderful world of debugging javascript and were introduced to some great tools to help you as you build.

Part three dives into unobtrusive Javascript and intricate details related to the DOM and how to manipulate the DOM. Once we learn how to properly manipulate and traverse the DOM, we move on to attaching events to elements. All of this was discussed in light of progressive enhancement and making sure content is always available. The last three chapters of this section discussed Javascript and CSS, how to improve forms (which is also a topic for another discussion), and a practical example of building an image gallery.

Part four pushes ahead to AJAX. The first chapters discussed the history of AJAX and some of its common uses. With a foundation of understanding what AJAX is, the next chapters were spent with practical examples of enhancing your blog (quick access to all posts dynamically on scroll), building an autocomplete search field, and creating an AJAX Wiki. I found that the blog and autocomplete were a little more valuable than the Wiki.

The final part looks to the future of Javascript. This section was very educational as we move forward. This is very important to be aware of what will be available in the near (hopefully) future.

The appendixes were extremely valuable, and I will use it as a quick reference as I begin developing more Javascript. A full listing of the DOM reference, Events reference, and the Browsers.

Overall, this book was an incredible read and is highly recommended for those who want to take their Javascript skills to the next level.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
12 of 13 people found the following review helpful
on March 10, 2009
Format: Paperback
In his instruction manual "Pro JavaScript Techniques", John Resig goes through a lot of great JavaScript tips and tricks, a lot of which are used in his extremely popular JavaScript framework, jQuery. That information is very durable against the eroding effects of time on technical information. If tips and tricks is what the book would have been about and would have devoted all of its pages on, it would have easily earned 5 stars from this reviewer.

However, the book also contains a LOT of dated information that isn't worth reading. This is obviously not John Resig's fault. Any technical book is going to find itself somewhat dated rather quickly. On the other hand, any review is given based on how useful the information provided is at the time it is reviewed. So the useless information dropped the book a few stars.

Given that its March 2009 (at the time of this review), this book was written in 2006, and John Resig has a new JavaScript book coming out in a few weeks (Secrets of the JavaScript Ninja), I would pass on this one and order the newer one.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
6 of 6 people found the following review helpful
on April 30, 2008
Format: PaperbackVerified Purchase
Pro JavaScript Techniques by John Resig is probably the best resource on the language I've encountered to date. I'm one of those web developers who has had something of a mental block when it comes to JavaScript. Despite its ubiquity, it always seemed like a toy language to me. It didn't help that JavaScript's syntax plays a bit fast and loose to my tastes, and that virtually all of the other resources on the language I've encountered barely scratched the surface on what the language can actually do. If you're like me - familiar with the basics, but knowing that you're not proficient enough to use it in a professional setting - then this book is for you.

First, the bad news. Like all aPress books I've encountered, this one suffers from a few small, but glaring, editing errors. Small things - variable names that change between examples for no good reason, in-text refrences to things the author didn't mention (no doubt something missed between drafts), that sort of thing - crop up. It's not enough to break the book, but it is annoying.

Also, the first section of the book moves at break-neck speed. While some of it is review, for those of us who have been toiling in web tutorials and older books, a few re-reads are necessary to truly understand what's going on. Thankfully, Resig addresses things in a logical manner, so each topic flows nicely into the next, making returning to those parts as painless as possible.

Finally, in the chapter where he discusses public, private, and privledged object properties and methods, he completely glosses over how private properties and methods function. Instead, he merely tells the user to visit Douglas Crockford's site on the matter. It's a bit of a cop-out, and I figure that since I'm spending ~$30 on the book, the least he can do is briefly condence Crockford's ideas.

All that said, though, the positives outweigh the negatives by far.

Despite the quick pacing of the book, the information (ignoring editing inconsistencies) is delivered in a straightforward manner. Resig addresses most, if not all, of those little things which are important in the real world (testing/debugging, how to work with libraries, how to ensure your code doesn't interfere with someone else's code, etc), but are often ignored in other resources.

In particular, the early chapters (chapters 2 and 3) on dealing with JavaScript objects are well done. While Resig doesn't go into all of the details (most notably with the link to Crockford's site I mentioned earlier), these chapters form the foundation of just about everything you'd want to do with the language. Indeed, these chapters address most of the pitfalls that create those pesky JavaScript errors we've all dealt with before: scope, closures, and context. Understanding how those three concepts work in unison is fundamental towards understanding modern, professional JavaScript as a whole.

Being a JavaScript book, this particular volume visits topics we're most likely all familiar with: DOM scripting, event handling, and even a bit of AJAX. Thanfully, Resig stays true to his mission of creating inobtrusive JavaScript, and keeps his HTML separated from the scripting code. This is a far cry from other self-proclaimed professional tomes that embed their JavaScript function calls within their HTML tags.

To conclude (and reiterate), Pro JavaScript Techniques is the perfect book for those developers caught in the middle. It's a resource aimed at those of us who have had experience with the language, but have never been pointed in the right direction to use it in a professional manner. Despite its annoying flaws, this book fills the rather large gap between beginner's JavaScripting and creating robust AJAX applications. It's worth owning if you ever want to do serious work with the language.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
6 of 6 people found the following review helpful
on October 25, 2007
Format: PaperbackVerified Purchase
Let me begin this review by mentioning, I've never had the desire to write a review for any of my 100+ owned technical literature pieces. John Resig's
Pro JavaScript Techniques (Pro) has inspired me to login and give three thumbs up for this phenomenal book.

Getting into John Resig's brain, author of the innovative library jQuery ([...] has been nothing short of an exciting ride. The author makes Object Orientated JavaScript surprisingly simple to understand, as well as thorough understanding of the DOM, Events models, Ajax and many other contemporary styles of JavaScript as its written by professionals today.

I no longer reference any of my other JavaScript books. Instead opening up John's piece proves valuable over and over when in need of a refresher or a utility function for my web applications.

For any web developer who's serious about writing clean, powerful, unobtrusive JavaScript code -- look no further than John Resig's Pro JavaScript Techniques.
0CommentWas this review helpful to you?YesNoSending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
     
 
Customers who viewed this also viewed
Secrets of the JavaScript Ninja
Secrets of the JavaScript Ninja by Bear Bibeault (Paperback - January 17, 2013)
$28.51

Professional JavaScript for Web Developers
Professional JavaScript for Web Developers by Nicholas C. Zakas (Paperback - January 18, 2012)
$29.65

JavaScript: The Good Parts
JavaScript: The Good Parts by Douglas Crockford (Paperback - May 2008)
$21.35
 
     

Send us feedback

How can we make Amazon Customer Reviews better for you?
Let us know here.

Your Recently Viewed Items and Featured Recommendations 
 

After viewing product detail pages, look here to find an easy way to navigate back to pages you are interested in.