Javascript Anthology, SitePoint
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
|
Contents |
C# Online.NET Book Review
The mere thought of Javascript summons up unpleasant experiences on Web sites written by special-effects-besotted youths or crass comercialists. Sites containing no-Back-button scripts, elusive cursor scripts, status line scroll scripts which hide the mouse-over URL, or frustrating pop-up windows.
As a sometime Javascript programmer, I am firmly committed to the CPA development cycle—Copy, Paste, Adapt. As it happens, my need of Javascript is sudden and critical. At such times, I need a ready storehouse of Javascript recipes for various purposes. I have often been frustrated by trying to use the Web as my cookbook, seldom finding a script good enough to CPA.
Unfortunately, my traumatic browsing experiences and my episodic need of Javascript have meant that I have always looked down upon it and have never mastered it.
Enter The Javascript Anthology—which is more of a cookbook than an anthology yet I still prefer the term "anthology". First and foremost, it is loaded to the gunwales with well-documented, efficient, real-world Javascript examples. I defy any reader to scan a mere five pages without finding a useful code snippet which they can put to immediate effect in their own Web pages.
But, the book is not merely a compendium of copy-and-paste code snippets. It is, in fact, a great Javascript introduction for anyone who already knows how to program in some computer language. The reader is thrust directly into the Javascript World—circumscribed as it is, or at least was, by the browser. And, as the reader comes to terms with first one, then another, interesting or practical Javascript example, the reader finds their Javascript competence growing by leaps and bounds. The learning that occurs while reading is akin to that which occurs during foreign language immersion programs. I heartily recommend the book as a Javascript as a Second Language (JSL) text. In short, the book enables even cut-and-pasters like me to understand Javascript.
The format of the book is straightforward. Each tip, trick, or hack (sic) begins with a brief problem description, followed by the solution, and finished off by a thorough discussion of how the code functions and how it can be used and abused. Unlike most of the Javascript examples I find on the Web, these solutions are efficient and professional. Javascript experts will object to muddling the presentation layer and the script code by embedding specific property values in scripts instead of modifying the style class of an object. Otherwise, the book's coding practices are first rate. And, the book takes account of all the latest browser standards.
Perhaps fifty percent of the book is given over to learning to use the browser application program interface (API) effectively—i.e. manipulating the Document Object Model (DOM). My favorite parts of the book are, of course, the parts I copied first for use on my own Web site. But, a few sections really excel, e.g. "DHTML Menus and Navigation" and "Javascript Accessibility". However, I would hope that a future edition of the book would contain more elaborate examples of Javascript usage in displaying data tables and form scripting.
This book focuses on low level Javascript code; so, it is not a book on Ajax with its developer libraries.
Bottom line
The Javascript Anthology is a great Javascript cookbook—my personal favorite.
Publisher's description
Among the 101 Tips, Tricks & Hacks you'll learn how-to:
- Create a slick yet accessible drop-down menu system
- Take control of your web pages with the DOM
- Validate forms in real time using regular expressions
- Optimize your code so that it runs faster
- Manage style sheets and modify styles on-the-fly
- Produce sophisticated drag-and-drop interaction
- Enhance your site with slick, animated transitions
- Create AJAX applications with the XMLHttpRequest object
…and much more. Far too many things to mention here!
The Authors:
- Are renowned experts in JavaScript
- Regularly speak at usergroup meetings and conferences
- Together, have more than 15 years of experience in web development
Overview
Following the same format as SitePoint's hugely popular The CSS Anthology, this is the most complete question-and-answer book on JavaScript. It’s a collection of over 100 thoroughly-tested, customizable and elegant solutions that will show you how to add usable and accessible interactivity to your site: from slick drop-down menus, to style sheet switchers, to AJAX applications, and much more.
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks also includes download access to all of the best practice code samples used throughout the book -- plug them right into your own web sites without any retyping!
What will you learn?
- Search and replace text using regular expressions.
- Navigate the DOM and create, delete, and move elements on the page.
- Validate email addresses on your web forms.
- Print inline error messages when validating forms.
- Minimize the problems associated with popup windows.
- Make a slideshow of images.
- Ensure your code works on different browsers.
- Make a style sheet switcher.
- Build an accessible drop-down menu system.
- Construct drag 'n' drop interfaces using AJAX.
- Use JavaScript and Flash together.
- Make your JavaScript accessible: an in-depth look at minimizing the accessibility problems associated with using JavaScript.
- Use the XMLHttpRequest object to build AJAX applications.
- Optimize your JavaScript code so that it runs faster.
- And much more!
Who Should Read This Book?
If you're using JavaScript on your projects right now, and you want to do things faster and better, this book is for you. The JavaScript Anthology will save you the frustration of hunting down code on the Web only to find that it isn't customizable, and doesn't represent best practice or work across different browsers.
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks contains thoroughly tested, cross-browser code that you can easily modify to suit your own needs.
The book is written in the usual SitePoint style: it’s clear and fun to read, with plenty of example code that you can apply immediately to your own web sites. Plus, it’s super-easy to navigate the book to find exactly what you want thanks to its cookbook approach and professionally-produced index. It’s the perfect reference book.
There’s no need to re-type any of the code in the book. As always, customers receive instant download access to all the files used in the book, so you can apply them immediately to your own projects.
About the author(s)
James Edwards (aka brothercake) is a freelance web developer based in the United Kingdom, specializing in advanced DHTML programming and accessible web site development. He is an outspoken advocate of standards-based development, a part-time forum moderator, and author of the Ultimate Drop Down Menu system—the first commercial DHTML menu to be WCAG-compliant.
Cameron Adams has a degree in law and one in science; naturally he chose a career in web development. His business cards say, “Web Technologist” because he likes to have a hand in graphic design, JavaScript, CSS, PHP, and anything else that takes his fancy that morning. While running his own business —themaninblue.com— he’s consulted and worked for numerous government departments, nonprofit organizations, large corporations, and tiny startups. Cameron lives in Melbourne, Australia, where, between coding marathons, he likes to play soccer and mix some tunes for his irate neighbors.
Table of Contents (abbreviated)
* Getting Started with JavaScript
* Working with Numbers
* Working with Strings
* Working with Arrays
* Navigating the Document Object Model
* Processing and Validating Forms
* Working with Windows and Frames
* Working with Cookies; Working with Dates and Times
* Working with Images; Detecting Browser Differences
* Using JavaScript with CSS; Basic Dynamic HTML
* Time and Motion; DHTML Menus and Navigation
* JavaScript and Accessibility
* Using JavaScript with Flash
* Building Web Applications with JavaScript
* Object Orientation in JavaScript
* Keeping up the Pace
Categories: CSharp-Online.NET Reviews | CSharp-Online.NET Book Reviews | Javascript (Web 2.0) Book Reviews