Read more
With HTML5 and improved web browser support, JavaScript has become the tool of choice for creating high-performance web graphics. This faced-paced book shows you how to use JavaScript, jQuery, DHTML, and HTML5's Canvas element to create rich web applications for computers and mobile devices.
By following real-world examples, experienced web developers learn fun and useful approaches to arcade games, DHTML effects, business dashboards, and other applications. This book serves complex subjects in easily digestible pieces, and each topic acts as a foundation for the next. Tackle JavaScript optimization and understand how it impacts performance Create fast-moving graphics by combining old-school DHTML with jQuery Learn advanced UI techniques using the jQuery UI and Ext JS libraries Build games with collision detection, object handling, and JavaScript scrolling techniques Master HTML5 Canvas basics for drawings, fills, bitmaps, animation, and more Create applications for the small screen with jQuery Mobile and PhoneGap Use Google's data visualization tools to create interactive dashboards
List of contents
Preface;
Audience and Assumptions;
Organization;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Chapter 1: Code Reuse and Optimization;
1.1 Keeping It Fast;
1.2 What and When to Optimize;
1.3 Homespun Code Profiling;
1.4 Optimizing JavaScript;
1.5 Optimizing jQuery and DOM Interaction;
1.6 Other Resources;
Chapter 2: DHTML Essentials;
2.1 Creating DHTML Sprites;
2.2 Converting into a jQuery Plug-in;
2.3 Timers, Speed, and Frame Rate;
2.4 Internet Explorer 6 Background Image Caching;
Chapter 3: Scrolling;
3.1 CSS-Only Scrolling Effects;
3.2 Scrolling with JavaScript;
Chapter 4: Advanced UI;
4.1 HTML5 Forms;
4.2 Using JavaScript UI Libraries;
4.3 Creating UI Elements from Scratch;
Chapter 5: Introduction to JavaScript Games;
5.1 Game Objects Overview;
5.2 The Game Code;
Chapter 6: HTML5 Canvas;
6.1 Canvas Support;
6.2 Bitmaps, Vectors, or Both?;
6.3 Canvas Limitations;
6.4 Canvas Versus SVG;
6.5 Canvas Versus Adobe Flash;
6.6 Canvas Exporters;
6.7 Canvas Drawing Basics;
6.8 Animating with Canvas;
6.9 Canvas and Recursive Drawing;
6.10 Replacing DHTML Sprites with Canvas Sprites;
6.11 A Graphical Chat Application with Canvas and WebSockets;
Chapter 7: Vectors for Games and Simulations;
7.1 Operations on Vectors;
7.2 Creating a JavaScript Vector Object;
7.3 A Cannon Simulation Using Vectors;
7.4 Rocket Simulation;
Chapter 8: Google Visualizations;
8.1 Limitations;
8.2 Chart Glossary;
8.3 Image Charts;
8.4 Interactive Charts;
Chapter 9: Reaching the Small Screen with jQuery Mobile;
9.1 jQuery Mobile;
9.2 TilePic: A Mobile-Friendly Web Application;
9.3 PhoneGap;
Chapter 10: Creating Android Apps with PhoneGap;
10.1 Installing PhoneGap;
10.2 Creating a PhoneGap Project in Eclipse;
Colophon;
About the author
Raffaele Cecco is a veteran software developer from the European video games industry, publishing his first title in 1986. After working on a freelance basis and publishing numerous products to accolades, he served as Technical Director at London-based software studio, King of the Jungle Ltd, where he created software for clients such as Hasbro and Virgin. In 2003, shifted to web technologies, both client and server-side, and spent some time developing retail e-commerce systems. He enjoys experimenting on his website, professorcloud.com, and the need to push pixels around quickly and make systems do things above their station has never left him.
Summary
Thanks to improved web browser support and the advent of HTML5, JavaScript now plays a major role in programming high-performance web graphics. This hands-on book shows you how to create rich web applications for big-screen computers and small-screen mobile devices using JavaScript, jQuery, DHTML, and HTML5's Canvas element.