Synopses & Reviews
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.
Synopsis
This authoritative book offers a detailed explanation of the features that make JavaScript an outstanding object-oriented programming language. As a result, this guide defines a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole.
Synopsis
Now that JavaScript plays such a key role in modern websites, programmers who once dismissed it as a language for amateurs find themselves immersed in JavaScript code. JavaScript Patterns identifies key problem areas you might face when working with the language, and provides coding and design patterns as solutions. JavaScript expert Stoyan Stefanov -- Senior Yahoo! Technical and architect of the performance optimization tool 'YSlow' 2.0 -- includes several examples for each pattern as well as practical advice for implementing it.
- Learn how to look at your application code through a patterns lens
- Use code and design patterns to write clean and maintainable JavaScript code
- Recognize antipatterns -- solutions that create more problems than they solve
Synopsis
Eloquent JavaScript is a guide to JavaScript that focuses on good programming techniques rather than offering a mish-mash of cut-and-paste effects. The author teaches you how to leverage JavaScript's grace and precision to write real browser-based applications. The book begins with the fundamentals of programmingvariables, control structures, functions, and data structuresthen moves on to more complex topics, like object-oriented programming, regular expressions, and browser events. With clear examples and a focus on elegance, Eloquent JavaScript will have you fluent in the language of the web in no time.
Synopsis
HTML5 is revolutionizing the way web applications are developed, and this practical, hands-on book puts you right in the middle of the action. You'll learn how to build interactive multimedia applications with HTML5's Canvas, using this new element to draw, animate, compose images, and more. You'll also learn the best way to use existing JavaScript libraries, as well as how to incorporate related aspects such as audio and video.
Ideal for web developers and experienced Flash and Silverlight developers, HTML5 Canvas shows you how to build several interactive web games as a way to learn the topics presented. The book also includes tips for Flash developers on how to transfer their skills to HTML5 programming. Now is the time to join the HTML5 revolution, and this is the book to get you started.
- Get an introduction to working with HTML 5 Canvas and JavaScript
- Create an application to learn how to use HTML5 text and text animation
- Use the Canvas drawing and animation API to build a progressive breakout-style game
- Learn how to use the image API, and create an application using drag-and-drop
- Create an advanced arcade game to learn about HTML5's
Synopsis
JavaScript is the language of the Web, and it's at the heart of every modern website from the lowliest personal blog to the mighty Google Apps. Though it's simple for beginners to pick up and play with, JavaScript is not a toyit's a flexible and complex language, capable of much more than the showy tricks most programmers use it for.
Eloquent JavaScript goes beyond the cut-and-paste scripts of the recipe books and teaches you to write code that's elegant and effective. You'll start with the basics of programming, and learn to use variables, control structures, functions, and data structures. Then you'll dive into the real JavaScript artistry: higher-order functions, closures, and object-oriented programming.
Along the way you'll learn to:
- Master basic programming techniques and best practices
- Harness the power of functional and object-oriented programming
- Use regular expressions to quickly parse and manipulate strings
- Gracefully deal with errors and browser incompatibilities
- Handle browser events and alter the DOM structure
Most importantly, Eloquent JavaScript will teach you to express yourself in code with precision and beauty. After all, great programming is an art, not a scienceso why settle for a killer app when you can create a masterpiece?
About the Author
Steve is an R.I.A. and web game developer who has been cultivating an audience for news, stories, blogs and tutorials about Flash, Silverlight, and now the HTML 5 Canvas at their own web site, http://www.8bitrocket.com, for the past 3 1/2 years. He has one of the highest Alexa rankings among Flash game developers blogs.
Steve has worked as a web development manager at Mattel Toys for the past 14 years, helping to create Mattels extensive online presence.
Jeff is an R.I.A. and web game developer who has been cultivating an audience for news, stories, blogs and tutorials about Flash, Silverlight, and now the HTML 5 Canvas at their own web site, http://www.8bitrocket.com, for the past 3 1/2 years. He has one of the highest Alexa rankings among Flash game developers blogs.
Jeff has worked as a web development manager at Mattel Toys for the past 14 years, helping to create Mattels extensive online presence.
Table of Contents
Dedication; Preface; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Good Parts; 1.1 Why JavaScript?; 1.2 Analyzing JavaScript; 1.3 A Simple Testing Ground; Chapter 2: Grammar; 2.1 Whitespace; 2.2 Names; 2.3 Numbers; 2.4 Strings; 2.5 Statements; 2.6 Expressions; 2.7 Literals; 2.8 Functions; Chapter 3: Objects; 3.1 Object Literals; 3.2 Retrieval; 3.3 Update; 3.4 Reference; 3.5 Prototype; 3.6 Reflection; 3.7 Enumeration; 3.8 Delete; 3.9 Global Abatement; Chapter 4: Functions; 4.1 Function Objects; 4.2 Function Literal; 4.3 Invocation; 4.4 Arguments; 4.5 Return; 4.6 Exceptions; 4.7 Augmenting Types; 4.8 Recursion; 4.9 Scope; 4.10 Closure; 4.11 Callbacks; 4.12 Module; 4.13 Cascade; 4.14 Curry; 4.15 Memoization; Chapter 5: Inheritance; 5.1 Pseudoclassical; 5.2 Object Specifiers; 5.3 Prototypal; 5.4 Functional; 5.5 Parts; Chapter 6: Arrays; 6.1 Array Literals; 6.2 Length; 6.3 Delete; 6.4 Enumeration; 6.5 Confusion; 6.6 Methods; 6.7 Dimensions; Chapter 7: Regular Expressions; 7.1 An Example; 7.2 Construction; 7.3 Elements; Chapter 8: Methods; Chapter 9: Style; Chapter 10: Beautiful Features; Awful Parts; Global Variables; Scope; Semicolon Insertion; Reserved Words; Unicode; typeof; parseInt; +; Floating Point; NaN; Phony Arrays; Falsy Values; hasOwnProperty; Object; Bad Parts; ==; with Statement; eval; continue Statement; switch Fall Through; Block-less Statements; ++ −−; Bitwise Operators; The function Statement Versus the function Expression; Typed Wrappers; new; void; JSLint; Undefined Variables and Functions; Members; Options; Semicolon; Line Breaking; Comma; Required Blocks; Forbidden Blocks; Expression Statements; for in Statement; switch Statement; var Statement; with Statement; =; == and !=; Labels; Unreachable Code; Confusing Pluses and Minuses; ++ and −−; Bitwise Operators; eval Is Evil; void; Regular Expressions; Constructors and new; Not Looked For; HTML; JSON; Report; Syntax Diagrams; JSON; JSON Syntax; Using JSON Securely; A JSON Parser; Colophon;