FREE Delivery in the UK.
Temporarily out of stock.
Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we dispatch the item.
Dispatched from and sold by Amazon. Gift-wrap available.
+ £2.80 UK delivery
Used: Good | Details
Condition: Used: Good
Comment: Shows some signs of wear, and may have some markings on the inside. 100% Money Back Guarantee. Shipped to over one million happy customers.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

ppk on JavaScript (Voices That Matter) Paperback – 26 Sep 2006

3.7 out of 5 stars 3 customer reviews

See all 2 formats and editions Hide other formats and editions
Amazon Price
New from Used from
Kindle Edition
"Please retry"
Paperback
"Please retry"
£31.99
£31.99 £1.98
Note: This item is eligible for click and collect. Details
Pick up your parcel at a time and place that suits you.
  • Choose from over 13,000 locations across the UK
  • Prime members get unlimited deliveries at no additional cost
How to order to an Amazon Pickup Location?
  1. Find your preferred location and add it to your address book
  2. Dispatch to this address when you check out
Learn more
£31.99 FREE Delivery in the UK. Temporarily out of stock. Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we dispatch the item. Dispatched from and sold by Amazon. Gift-wrap available.
click to open popover

Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone

To get the free app, enter your mobile phone number.



Product details

  • Paperback: 528 pages
  • Publisher: New Riders; 01 edition (26 Sept. 2006)
  • Language: English
  • ISBN-10: 0321423305
  • ISBN-13: 978-0321423306
  • Product Dimensions: 18.8 x 2.3 x 23.1 cm
  • Average Customer Review: 3.7 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Bestsellers Rank: 1,007,717 in Books (See Top 100 in Books)

Product Description

Review

"ppk on JavaScript is a well-written and cleanly structured walk through useful JavaScript examples. It is extremely practical, and goes right to the core of what a web programmer needs to know about JavaScript to build real sites, right now.

In essence, it reminds me of how I learned to work on the web in the first place: careful examination of other people’s work. At its best, this book is a clearly annotated view source of Koch’s projects. It’s a comprehensive exploration of Koch’s thoughts about the problems he’s run into (problems that you’ll run into, too), how he approached them, and ultimately how he’s solved them."  -- Mike West, Managing Editor, Digital Web Magazine

From the Back Cover

Whether you're an old-school scripter who needs to modernize your JavaScripting skills or a standards-aware Web developer who needs best practices and code examples, you'll welcome this guide from a JavaScript master.

Other JavaScript books use example scripts that have little bearing on real-world Web development and are useful only in the chapter at hand. In contrast, Peter-Paul Koch's book uses eight real-world scripts he created for real-world clients in order to earn real-world money. That means the scripts are guaranteed to do something useful (and sellable!) that enhances the usability of the page they're used on.

The book's example scripts include one that sorts a data table according to the user's search queries, a form validation script, a script that shows form fields only when the user needs them, a drop-down menu, and a data retrieval script that uses simple Ajax and shows the data in an animation.

After an overview of JavaScript's purpose, Peter-Paul provides theoretical chapters on the context (jobs for JavaScript, CSS vs. JavaScript), the browsers (debugging, the arcana of the browser string), and script preparation. Then follow practical chapters on Core, BOM, Events, DOM, CSS Modification, and Data Retrieval, all of which are explained through a combination of theoretical instruction and the taking apart of the relevant sections of the example scripts.

See all Product Description

Customer Reviews

3.7 out of 5 stars
5 star
1
4 star
0
3 star
2
2 star
0
1 star
0
See all 3 customer reviews
Share your thoughts with other customers

Top Customer Reviews

Format: Paperback
I read this book hoping to learn a little bit of javascript for a website. It's a very comprehensive review, but for beginners it's probably too advanced to pick much up without reading from cover to cover.

I tend to like to try out some examples and get a feel for the basic of a language first, but this book doesn't take that approach - instead, it explains a lot of theory, and then gets you doing things towards the end.

Furthermore, the author makes reference to a set of example scripts which he wrote for various projects, but never actually gives the full scripts - instead, he looks at bits of each in every chapter. I found this very very confusing. One of the example scripts was to do dropdown menus, which was what I wanted to do, but the script was so split up over different chapters that I was unable to put it back together to try it out.

He also gives a number of deliberately wrong examples, to demonstrate how not to do things, but again I was confused by these, especially as some of them came before the corresponding correct example - I want things I can type in and play with, and then maybe some wrong examples at the end - but ultimately, I want to know how to do it, not how to not do it!

I think that if you read this book cover to cover, you'd probably come away as a bit of an expert, but if, like me, you like to dip in and out of computer books and try examples and get a feel for the language early on, then this is not the book for you.

In saying that, it is very comprehensive and covers a lot of ground, so for someone who already knew some javascript, it'd be a good reference guide.
Comment 9 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback Verified Purchase
This is a fantastic practical javascript book. Its not for the absolute beginner. You should have a basic understanding of Javascript before attempting this book. However once you do you will not regret it and the book lives up to its authors promise of getting you up to intermediate javascript developer level. Five stars all the way for being such a practical useful book.
Comment One person found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Kindle Edition
This book is pretty outdated. For a book that is about writing JavaScript for the browser Google Chrome isn't mentioned here at all, no LocalStorage either. This is also not a book about writing good JavaScript. That said as a reference to JS browser quirks with the DOM it's an easy read.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Helpful Customer Reviews on Amazon.com (beta)

Amazon.com: 4.3 out of 5 stars 19 reviews
1 of 1 people found the following review helpful
5.0 out of 5 stars A bit outdated, but a great manual nonetheless 7 July 2013
By Blue Vanilla - Published on Amazon.com
Format: Kindle Edition Verified Purchase
Since this was written circa 2007, I expected it to be a bit outdated, and it is. HOWEVER, it is one of the easiest-to-understand manuals on Javascript that I have read. Very clear explanations, the logic is very linear, and the examples are very illustrative. I'm traditionally an artist learning Javascript, and was unsure about the logic behind the code. This explains a lot of it and gives you some great ground to stand on.
2 of 2 people found the following review helpful
4.0 out of 5 stars From beginner to specialist 17 Feb. 2008
By Francois Piat - Published on Amazon.com
Format: Paperback Verified Purchase
This book talks about scripting the DOM. Everything is clearly exposed : the history that make browsers like they are and not better, the tree behind an HTML document and the nodes behind tags and attributes, how to use css properties for the best, and how to manage events and their properties in all browsers, and of course the core of the javascript language.
There is nothing about objects and all other OOP stuff, so I think this book is very well suited for beginners. But specialist will also find a lot of interesting things.
One more advantage, the presentation and layout are really more pleasant than what is generally found in this category's books.
7 of 9 people found the following review helpful
5.0 out of 5 stars Most thorough walk through JavaScript in a book 1 Aug. 2007
By Nate Klaiber - Published on Amazon.com
Format: Paperback Verified Purchase
PPK on JavaScript by Peter-Paul Koch might just be the most thorough JavaScript book I have read. Through the use of eight real-world example scripts, PPK walks us through JavaScript from the very beginning. Over the years JavaScript has had its ups and downs. This is mainly due to the flux of poorly optimized scripts that are scattered around the Internet. So how do you know what source to trust? What are some best practices for JavaScript? How can you utilize JavaScript to add enhancements to your site without breaking in the browser? How can you create scripts that will enhance the user experience and not hurt it? All of these topics and more are discussed in this book.

Throughout the ten chapters and 499 pages of this book, there is very little that isn't covered on the topic. Let's take a look at the organization and flow of the book:

Purpose
This chapter paints the big picture for us. There is no jumping into scripts or coding in the first few chapters. Here we get an overview of some important aspects of JavaScript. One of the most important aspects is the coverage of the history of JavaScript. Though some might find this to be boring, I believe it to be invaluable. Understanding the history of JavaScript gives you a better idea of how it has formed into the language it is today. This is one of the most valuable parts of the book. It sets a solid foundation for everything else that is covered.

Context
Along with understanding the history, it is good to see where JavaScript fits into the big picture of web development. Here we take an in-depth look at HTML, CSS, and JavaScript. There are many distinctions to be made here as each could potentially mix with the other. It is important to keep a clean separation of your structure (HTML), presentation (CSS), and your behavior (JavaScript). At some points the line may become blurry on mixing the two, which is why each aspect is discussed in detail. These include separation of presentation and structure, separation of behavior and structure, and separation of behavior and presentation.

Not every user or device has JavaScript enabled. Moving forward we look at the impact on accessibility and how it affects things such as no mouse, screen readers, and usability. These are all important pieces that must be addressed as we begin adding advanced functionality to our website.

Lastly we are introduced to the eight example scripts that we will encounter: Textarea MaxLength, Usable Forms, Form Validation, Dropdown Menu, Edit Style Sheet, Sandwich Picker, XMLHTTP Speed Meter, and Site Survey.

Browsers
This chapter provides a little more context and history into the different browser families. We look not only at browsers but other devices such as mobile phones and screen readers. We look at each of these and are then shown some of the incompatibilities that they suffer. We address the problems and look to build solutions to patch the holes. Next we look at solving problems by using two different techniques: object detection and browser detection. Object detection works by checking if the methods you are using are supported before you use them. Browser detection tries to detect the current User Agent and then build from there. Browser detection has many flaws associated with it. One specifically is browser spoofing where you can send a different User Agent string to the server, lying to the application about the available technology. There are correct uses, but this should mostly be avoided.

If you have been developing JavaScript for a while then you are probably used to using the alert method to help in the debugging process. Here were are introduced to debugging, figuring out some of the cryptic messages returned by the browser, and how we can deal with browser bugs.

Preparation
Planning is important for all projects. Here we are introduced to preparing our application for enhancements. This involves having the proper placements of hooks. Hooks are found by using an ID, class, custom attributes (not a widely accepted solution), and name/value pairs.

Once we have our hooks in place, we have to get access to them to make our modifications. Having access is only part of the process. We also have to learn how to generate content when necessary and understanding the relationships inside of the DOM. We get a brief primer on setting up our script tag and how we can utilize multiple scripts if necessary.

Our hooks are in place, and we know where we want to apply our effects. How and when should they fire? We stop to take a look at the initialization of scripts and the load event. This method has its pitfalls, which are discussed and alternate solutions are addressed. We take a look back to the example scripts for some more insight and real-world use cases.

Core
Everything we have done to this point hinges on our ability to actually program the functionality we are trying to achieve. This section walks through the basics of programming in JavaScript. We look at statements, comments, code blocks, operators, values, and case sensitivity. Next we look at the six different data types that are available to us, and how JavaScript handles conversion and concatenation. We look at ways to explicitly convert our data types when necessary. After looking at the data types we look at some of the common operators. These are inherent to every programming language, so there isn't much new in this area. We've looked at the constructs, now we move to discussing variables: proper naming, the var keyword, and variable scope. This is very important to grasp as we move forward and create our own functions to achieve our tasks. Next we look at working with numbers, strings, and booleans inside of our scripts. We have a good foundation, now we move to control structures such as if, switch, for, while, do/while, break and continue, and try/catch. The next few sections focus on defining and working with custom functions, creating and defining objects and their methods and properties, and finally dealing with arrays. The section on arrays is especially helpful as it discussed how you can loop over them and how you can add, delete, and locate specific sections inside of an array.

BOM
This section looks at the Browser Object Model and the window object. We take a look at the global window object and its impact on creating new pages and cross communication between windows. We then look at navigation within the window and the location and history. We learn how to manipulate the geometry of the window, and how to retrieve information about the current window dimensions.

The chapter rounds off with discussion of some miscellaneous functions such as alert, confirm, prompt and timeouts and intervals. We take a closer look at some of the available methods for the document object. Finally, we take a look at working with cookies and utilizing/managing them within our application.

Events
This is probably one of the most important sections of this book. This section gives a thorough look at all of the available events. The chapter first starts by looking at some compatibilities and how to resolve them case by case. We take an in-depth look at all of the available events at our disposal and how they work. We look at event registration and the best way to handle it. The rest of this chapter discusses event bubbling and capturing and the browser support related to each, the event object and its properties available to us, targeting your elements, and then implementing some of our new-found knowledge in the example scripts. Sometimes grasping events and event registration can be tough, but this chapter makes it easy through illustration and the example scripts.

DOM
We have come a long way to this point. We have set our foundation, looked at the core of JavaScript, examined the browser window and its properties, and learned how to set our events in motion. Now it is time to look at the Document Object Model. The DOM holds all of the information inside of our pages. It is comprised of all elements and attributes and their relationship to one another. They are commonly referred to as nodes that build the family tree. Understanding of this structure is what gives us the power to build elements and insert them or delete them. We have full control over our internal structure.

However, it is never that easy. Traversing the DOM can sometimes be painful, especially when you see some of the differences between browsers. We take a look at how to find our nodes, how we can retrieve information about those nodes, and how we can change our document tree through appending, inserting, removing, and replacing. We are also introduced to creating elements and creating text nodes, and then how we can achieve some of the above tasks.

This chapter rounds off with the always heated discussion of the use of innerHTML, finding attributes and setting their values, dealing with text nodes - even empty text nodes that sometimes cause confusion, understanding and traversing the nodeLists, and dealing with forms and the Level 0 DOM. All of these pieces help us put together the big puzzle as we are using JavaScript to manipulate our pages.

CSS Modification
Earlier we discussed the aspect of keeping your presentation separate from your behavior. This chapter discusses best practices for working between the two. We learn how to get style information from our elements, and then how we can add classes dynamically. We take a brief look at the possibility of changing the entire stylesheet via JavaScript. While this is a nice introduction, I think it would require a specific project.

The last parts of this chapter look at some examples of keeping the clean separation, but applying some visual enhancements. We work through some examples of toggling display of elements, animating elements, and changing the dimensions and position of elements.

Data Retrieval
This chapter is all about AJAX. We look at the XMLHttpRequest object and how to make it work cross browser through some conditional checks. Once we have sent the request, we need to know how to handle the response. We look at the different statuses and response codes that we will be dealing with and how to set callback functions to handle the response. We look at the available return formats such as XML, HTML, JSON, and CSV. The final part to this chapter looks at the impact that AJAX has on accessibility.

This review alone does not do this book justice. This book thoroughly discussed each and every aspect to JavaScript, from its history to looking to its future. The example scripts helped to grasp the different concepts, but the real meat of the book was in the specific coverage of each aspect. There are many books about specific aspects of JavaScript, but this book combines them all into one resource. If you are just getting your feet wet in JavaScript, then this book is the perfect book to help take you to the next level.
5.0 out of 5 stars One of my favorite books on JavaScript 28 Aug. 2008
By Jeff White - Published on Amazon.com
Format: Paperback Verified Purchase
I've been a fan of PPK's web site for sometime, and finally bought the book. I really like the way it's organized, and presents subjects within a project that will definitely improve your .js skills and the way you approach .js problems. I highly recommend it.
1 of 3 people found the following review helpful
5.0 out of 5 stars one of the better javascript books 9 Jan. 2007
By Madden - Published on Amazon.com
Format: Paperback Verified Purchase
I would group this book with The Javascript Anthology and The Complete Reference Javascript - all three should be on your bookshelf. The Anthology because it is current and has a lot of solutions to current problems. The Reference because it is the bible of javascript and ppk because it well thought out with many good examples.

The only drawback to ppk is the use of the author's real-world scripts. He suggests you check them out beforehand on his excellent and timely web site, [....] The scripts are good but never printed out completely in the book. That said, there is enough information in this book that you'll reference it over and over.
Were these reviews helpful? Let us know


Feedback