Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad, having been developed and released in a hurry before it could be refined. This authoritative book scrapes away these bad features to reveal a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole-a subset you can use to create truly extensible and efficient code.
Considered the JavaScript expert by many people in the development community, author Douglas Crockford identifies the abundance of good ideas that make JavaScript an outstanding object-oriented programming language-ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation. Unfortunately, these good ideas are mixed in with bad and downright awful ideas, like a programming model based on global variables.
When Java applets failed, JavaScript became the language of the Web by default, making its popularity almost completely independent of its qualities as a programming language. In JavaScript: The Good Parts, Crockford finally digs through the steaming pile of good intentions and blunders to give you a detailed look at all the genuinely elegant parts of JavaScript, including:
Syntax
Objects
Functions
Inheritance
Arrays
Regular expressions
Methods
Style
Beautiful features
The real beauty? As you move ahead with the subset of JavaScript that this book presents, you'll also sidestep the need to unlearn all the bad parts. Of course, if you want to find out more about the bad parts and how to use them badly, simply consult any other JavaScript book.
With JavaScript: The Good Parts, you'll discover a beautiful, elegant, lightweight and highly expressive language that lets you create effective code, whether you're managing object libraries or just trying to get Ajax to run fast. If you develop sites or applications for the Web, this book is an absolute must.
About this product: Since the earliest days of Internet scripting, Web developers have considered JavaScript: The Definitive Guide an essential resource. David Flanagan's approach, which combines tutorials and examples with easy-to-use syntax guides and object references, suits the typical programmer's requirements nicely. The brand-new fourth edition of Flanagan's "Rhino Book" includes coverage of JavaScript 1.5, JScript 5.5, ECMAScript 3, and the Document Object Model (DOM) Level 2 standard from the World Wide Web Consortium (W3C). Interestingly, the author has shifted away from specifying--as he did in earlier editions--what browsers support each bit of the language. Rather than say Netscape 3.0 supports the Image object while Internet Explorer 3.0 does not, he specifies that JavaScript 1.1 and JScript 3.0 support Image. More usefully, he specifies the contents of independent standards like ECMAScript, which encourages scripters to write applications for these standards and browser vendors to support them. As Flanagan says, JavaScript and its related subjects are very complex in their pure forms. It's impossible to keep track of the differences among half a dozen vendors' generally similar implementations. Nonetheless, a lot of examples make reference to specific browsers' capabilities.
Though he does not cover server-side APIs, Flanagan has chosen to separate coverage of core JavaScript (all the keywords, general syntax, and utility objects like Array) from coverage of client-side JavaScript (which includes objects, like History and Event, that have to do with Web browsers and users' interactions with them. This approach makes this book useful to people using JavaScript for applications other than Web pages. By the way, the other classic JavaScript text--Danny Goodman's JavaScript Bible--isn't as current as this book, but it's still a fantastic (and perhaps somewhat more novice-friendly) guide to the JavaScript language and its capabilities. --David Wall
Topics covered: The JavaScript language (version 1.0 through version 1.5) and its relatives, JScript and ECMAScript, as well as the W3C DOM standards they're often used to manipulate. Tutorial sections show how to program in JavaScript, while reference sections summarize syntax and options while providing copious code examples.
This eagerly anticipated update to the breakout book on JavaScript offers you an in-depth look at the numerous advances to the techniques and technology of the JavaScript language. You'll see why JavaScript's popularity continues to grow while you delve through topics such as debugging tools in Microsoft Visual Studio, FireBug, and Drosera; client-side data storage with cookies, DOM storage, and client-side databases; HTML 5, ECMAScript 3.1, the Selectors API; and design patterns including creational, structural, and behavorial patterns.
About this product: Once listed in the "nice to have" sections of job postings, these days the knowledge of JavaScript is a deciding factor when it comes to hiring web developers. And rightly so. Where in the past we used to have the occasional few lines of JavaScript embedded in a web page, now we have advanced libraries and extensible architectures, powering the "fat-client", AJAX-type rich internet applications.
JavaScript is the language of the browser, but it's also heavily employed in many other environments: server-side programming, desktop applications, application extensions and widgets. It's a pretty good deal: you learn one language and then code all kinds of different applications. While this book has one chapter specifically dedicated to the web browser environment including DOM, events, and AJAX tutorials, the rest is applicable to all the other environments too.
This book treats JavaScript as a serious object-oriented language, showing you how to build robust, maintainable, and powerful libraries and applications. Along the way, we cover many of the recent innovations such as AJAX, JSON, and interesting design and coding patterns. After reading this book, you'll be prepared to ace your JavaScript job interview and even impress with some bits that the interviewer maybe didn't know. You should read this book if you want to be able to take your JavaScript skills to a new level of sophistication.
What you will learn from this book?
* Learn to think in JavaScript, the language of the web browser * The basics of object-oriented programming, and how they apply to JavaScript * Set up and use your training environment (Firebug) * Master data types, operators, and flow control statements * Understand functions: usage patterns, variable scope, and built-in functions * Closures demystified * Create and use objects * Understand and use prototypes * Reuse code with common patterns for inheritance * Understand and work with the BOM (Browser Object Model) * The DOM (Document Object Model) - accessing, modifying, adding, and deleting nodes * Build responsive web pages with AJAX * JSON (JavaScript Object Notation) * Listen and respond to browser events * Apply design patterns to solve common problems * Adopt coding patterns that unleash the unique power of the language * Make your programs cleaner, faster, and compatible with other programs and libraries * Achieve missing object-oriented features in JavaScript such as private properties and methods
Who is this book written for?
The book requires no prior knowledge of JavaScript and works from the ground up to give you a thorough grounding in this powerful language. If you do already know some JavaScript, you will find plenty of eye-openers as you discover just what the language can do.
This book takes a do-it-yourself approach when it comes to writing code, because the best way to really learn a programming language is by writing code. You are encouraged to type code into Firebug's console, see how it works and then tweak it and play around with it. There are practice questions at the end of each chapter to help review what you have learned.
JavaScript is essential for creating modern, interactive Web sites. But, unlike HTML and CSS, JavaScript is a true programming language with complex rules that are challenging for most Web designers to learn. In JavaScript: The Missing Manual, bestselling author David McFarland teaches you how to use JavaScript in sophisticated ways -- even if you have little or no programming experience.
In a clear, entertaining way, the book starts out by teaching you how to build a basic JavaScript program. Then, once you've mastered the structure and terminology, you'll learn how to use advanced JavaScript tools to add useful interactivity to your sites quickly and painlessly, rather than scripting everything from scratch.
To jump-start your progress, the book offers several "living examples" -- step-by-step tutorials for building Web site components with JavaScript using raw materials, such as graphics and half-completed Web pages, that you can download from the book's companion Web site.
In this book, you will learn:
How to get started. The book introduces the building blocks of JavaScript, and general tips on computer programming. Learn to add scripts to a Web page; store and manipulate information; communicate with the browser window; respond to events like mouse clicks and form submissions; and identify and modify HTML.
How to build Web Page Features. McFarland provides real-world examples of JavaScript in action. Learn to create pop-up navigation bars, enhance HTML tables, build an interactive photo gallery, and make Web forms more usable. Create interesting user interfaces with tabbed panels, accordion panels and pop-up dialog boxes.
How to troubleshoot and debug. The book will teach you how to avoid the ten most common errors new programmers make, and how to find and fix bugs.
How to communicate with the Web server. In addition to basic JavaScript, this manual covers Ajax, the approach that made JavaScript glamorous. Learn to use JavaScript to communicate with a server so that your Web pages can receive information without having to reload.
If you want to put JavaScript to work right away without getting tangled up in code, JavaScript: The Missing Manual is the best book available.
Create dynamic Web pages complete with special effects using today's leading Web development language. JavaScript: A Beginner's Guide, Third Edition gives you step-by-step coverage of the fundamentals, including variables, functions, operators, event handlers, objects, arrays, strings, forms, and frames. You'll also learn about more advanced techniques, including debugging and security. This hands-on guide explains how JavaScript works with XHTML Transitional and covers the new features available in JavaScript. Get started using JavaScript right away with help from this fast-paced tutorial.
Designed for Easy Learning:
Key Skills & Concepts--Chapter-opening lists of specific skills covered in the chapter
Ask the Expert--Q & A sections filled with bonus information and helpful tips
Try This--Hands-on exercises that show you how to apply your skills
Notes--Extra information related to the topic being covered
Tips--Helpful reminders or alternate ways of doing things
Self Tests--End-of-chapter reviews to test your knowledge
Annotated syntax--Example code with commentary that describes the programming techniques being illustrated
If you're new to JavaScript, or an experienced web developer looking to improve your skills, Learning JavaScript provides you with complete, no-nonsense coverage of this quirky yet essential language for web development. You'll learn everything from primitive data types to complex features, including JavaScript elements involved with Ajax and dynamic page effects. By the end of the book, you'll be able to work with even the most sophisticated libraries and web applications.
Complete with best practices and examples of JavaScript use, this new edition shows you how to integrate the language with the browser environment, and how to practice proper coding techniques for standards-compliant websites. This book will help you:
Learn the JavaScript application structure, including basic statements and control structures
Identify JavaScript objects -- String, Number, Boolean, Function, and more
Use browser debugging tools and troubleshooting techniques
Understand event handling, form events, and JavaScript applications with forms
Develop with the Browser Object Model, the Document Object Model, and custom objects you create
Learn about browser cookies and more modern client-side storage techniques
Get details for using XML or JSON with Ajax applications
Learning JavaScript follows proven learning principles to help you absorb the concepts at an easy pace, so you'll learn how to create powerful and responsive applications in any browser.
So you're ready to make the leap from writing HTML and CSS web pages to creating dynamic web applications. You want to take your web skills to the next level. And you're finally ready to add "programmer" to the resume. It sounds like you're ready to learn the Web's hottest programming language: JavaScript. Head First JavaScript is your ticket to going beyond copying and pasting the code from someone else's web site, and writing your own interactive web pages.
With Head First JavaScript, you learn:
The basics of programming, from variables to types to looping
How the web browser runs your code, and how you can talk to the browser with your code
Why you'll never have to worry about casting, overloading, or polymorphism when you're writing JavaScript code
How to use the Document Object Model to change your web pages without making your users click buttons
If you've ever read a Head First book, you know what to expect -- a visually rich format designed for the way your brain works. Head First JavaScript is no exception. It starts where HTML and CSS leave off, and takes you through your first program into more complex programming concepts -- like working directly with the web browser's object model and writing code that works on all modern browsers.
Don't be intimidated if you've never written a line of code before! In typical Head First style, Head First JavaScript doesn't skip steps, and we're not interested in having you cut and paste code. You'll learn JavaScript, understand it, and have a blast along the way. So get ready... dynamic and exciting web pages are just pages away.
About this product: Step-by-step instruction teaches beginning JavaScript programmers and Web designers to create windows, display moving text, and generate sound or other multimedia elements with ease. Uses the successful Beginner's Guide teaching system, which countless new users have praised for giving them a solid foundation in technology.
In today's Web 2.0 world, JavaScript and Dynamic HTML are at the center of the hot new approach to designing highly interactive pages on the client side. With this environment in mind, the new edition of this book offers bite-sized solutions to very specific scripting problems that web developers commonly face. Each recipe includes a focused piece of code that you can insert right into your application. Why is JavaScript & DHTML Cookbook so popular? After reading thousands of forum threads over the years, author and scripting pioneer Danny Goodman has compiled a list of problems that frequently vex scripters of various experience levels. For every problem he addresses, Goodman not only offers code, but a discussion of how and why the solution works. Recipes range from simple tasks, such as manipulating strings and validating dates in JavaScript, to entire libraries that demonstrate complex tasks, such as cross-browser positioning of HTML elements, sorting tables, and implementing Ajax features on the client. Ideal for novices as well as experienced scripters, this book contains more than 150 recipes for: Working with interactive forms and style sheets Presenting user-friendly page navigation Creating dynamic content via Document Object Model scripting Producing visual effects for stationary content Positioning HTML elements Working with XML data in the browser Recipes in this Cookbook are compatible with the latest W3C standards and browsers, including Internet Explorer 7, Firefox 2, Safari, and Opera 9. Several new recipes provide client-side Ajax solutions, and many recipes from the previous edition have been revised to help you build extensible user interfaces for Web 2.0applications. If you want to write your own scripts and understand how they work, rather than rely on a commercial web development framework, the JavaScript & DHTML Cookbook is a must.