Pragmatic Guide to JavaScript

( 1 )

Overview

JavaScript is everywhere. It's a key component of today's Web-a powerful, dynamic language with a rich ecosystem of professionalgrade development tools, infrastructures, frameworks, and toolkits. This book will get you up to speed quickly and painlessly with the 35 key JavaScript tasks you need to know.

The task-oriented two-page spreads get you up and running fast. The left pages explain the underlying implementation for each task, and the ...

See more details below
Paperback
$21.60
BN.com price
(Save 13%)$25.00 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (9) from $2.14   
  • New (5) from $12.95   
  • Used (4) from $2.14   
Sending request ...

Overview

JavaScript is everywhere. It's a key component of today's Web-a powerful, dynamic language with a rich ecosystem of professionalgrade development tools, infrastructures, frameworks, and toolkits. This book will get you up to speed quickly and painlessly with the 35 key JavaScript tasks you need to know.

The task-oriented two-page spreads get you up and running fast. The left pages explain the underlying implementation for each task, and the right pages contain code snippets for that task, along with cross-references to related tasks.

You'll learn essential JavaScript tasks in a framework-agnostic way. Learn How to manipulate the DOM and CSS, and how to use event handling and timers. You'll discover JavaScript tricks for user interface functionality: tooltips, lightboxes, image processing, infinite scrolling, and more. You'll work with forms for receiving and validating input and explore the client-server relationship with cookies, JSON, and Ajax, as well as mashups with Twitter, Flickr, and geo-related APIs. We round it off with a cheat sheet that gives you JavaScript at a glance.

Use this Pragmatic Guide to get started creating your own killer web applications, quickly and professionally.

Read More Show Less

Product Details

  • ISBN-13: 9781934356678
  • Publisher: Pragmatic Programmers, LLC, The
  • Publication date: 12/8/2010
  • Edition number: 1
  • Pages: 160
  • Sales rank: 1,515,964
  • Product dimensions: 5.90 (w) x 8.90 (h) x 0.60 (d)

Meet the Author

Christophe Porteneuve has been doing IT R&D for more than 10 years, specializing early in Web development. He joined Prototype Core in 2006, wrote Prototype and script.aculo.us in 2007, and sometimes speaks at conferences such as The Ajax Experience. He's the CTO of Ciblo.net in Paris, France, where he lives with his wife, Elodie.

Read More Show Less

Table of Contents

Dedication xi

Acknowledgments xiii

Introduction xv

What's This Book About, and Who Is It For? xv

This Book and JavaScript Libraries xvi

This Book at a Glance xvii

How to Read This Book xviii

I Bread and Butter: Pure JavaScript 1

Task 1 Dynamically Selecting a Method/Property 4

Task 2 Achieving Code Privacy with the Module Pattern 6

Task 3 Using Optional, Variable, and Named Arguments 8

II The DOM, Events, and Timers 11

Task 4 Obtaining References to DOM Elements 14

Task 5 Dynamically Styling Content 16

Task 6 Changing an Element's Contents 18

Task 7 Running Code When the DOM Is Loaded 20

Task 8 Listening for Events (and Stopping) 22

Task 9 Leveraging Event Delegation 24

Task 10 Decoupling Behaviors with Custom Events 26

Task 11 Simulating Background Processing 28

III UI Tricks 31

Task 12 Pulling Off Classy Tooltips 34

Task 13 Making Unobtrusive Pop-Ups 36

Task 14 Preloading Images 38

Task 15 Creating a Lightbox Effect 40

Task 16 Implementing an "Infinite Scroll" 42

Task 17 Maintaining Viewport When Loading Content 44

IV Form-fu 47

Task 18 Temporarily Disabling a Submit Button 50

Task 19 Providing Input Length Feedback 52

Task 20 (Un)checking a Whole Set of Checkboxes at Once 54

Task 21 Validating Forms: The Basics 56

Task 22 Validating Forms: Going Further 58

Task 23 Validating Forms: The Whole Nine Yards 60

Task 24 Providing On-the-Fly Help Tooltips on Forms 62

Task 25 Autocompleting Input As It's Typed 64

Task 26 Using Dynamic Multiple File Uploads 66

V Talking with the Server Side 69

Task 27 Reading/Writing Cookies 72

Task 28 Loading Stuff Through Ajax (Same Domain) 74

Task 29 Using JSON 76

Task 30 Using JSON-P 78

Task 31 Cross-Domain "Ajax" (Take 1) 80

Task 32 Cross-Domain "Ajax" (Take 2) 82

VI Making Mashups 85

Task 33 Syndicating Your Twitter Updates 88

Task 34 Syndicating Your Flickr Updates 90

Task 35 Geocoding a Location and Getting Photos For It 92

VII Appendices 95

A JavaScript Cheat Sheet 97

B Debugging JavaScript 101

B.1 Here Be Dragons 101

B.2 Firefox and Firebug 102

B.3 Safari and Web Inspector 106

B.4 IE6, IE7, the IE Toolbar, and Web Developer Express 108

B.5 IE8 and Developer Tools 111

B.6 Opera and Dragonfly 112

B.7 Virtual Machines Are Your Friends 113

B.8 The Network May Be Your Enemy 114

C JavaScript Frameworks 115

C.1 Prototype, script.aculo.us, and Scripty2 116

C.2 jQuery and jQuery UI 117

C.3 MooTools 119

C.4 YUI 119

C.5 ExtJS 121

C.6 Dojo 122

D Getting Help 125

D.1 Help on JavaScript in General 125

D.2 Help on Frameworks 127

E Bibliography 131

Index 133

Read More Show Less

Customer Reviews

Average Rating 4
( 1 )
Rating Distribution

5 Star

(0)

4 Star

(1)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Posted September 12, 2011

    JavaScript at a glance

    This book is written in a style that some people will like and others will not. It's a small book with less than 150 pages, so it is not a book for learning JavaScript. Don't pick this book as a beginner's guide to JavaScript or if you want a complete book on everything to do with JavaScript.

    The book gives a look at JavaScript at a glance. Showing examples of different aspects of JavaScript. What is good about the book is that most of the book is written with the left page as a discussion of the code on the opposite page. It makes for easy reading and lots of code examples. On the other hand, if looking at code and writing out code examples is not your cup of tea, you will not like this book. With only one page to discuss the code, don't expect in-depth discussions of the subject matter.

    In the section on working with DOM elements the author shows examples in several libraries (Prototype, jQuery, MooTools, YUI 3, Dojo) and discusses some of the differences.
    I found the book easy and quick to get though, the examples simple to understand and write.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)