skip to main content
Skip header Section
JavaScript: The Definitive GuideAugust 2006
Publisher:
  • O'Reilly Media, Inc.
ISBN:978-0-596-10199-2
Published:01 August 2006
Skip Bibliometrics Section
Bibliometrics
Skip Abstract Section
Abstract

This Fifth Edition is completely revised and expanded to cover JavaScript as it is used in today's Web 2.0 applications. This book is both an example-driven programmer's guide and a keep-on-your-desk reference, with new chapters that explain everything you need to know to get the most out of JavaScript, including:Scripted HTTP and AjaxXML processingClient-side graphics using the canvas tagNamespaces in JavaScript--essential when writing complex programsClasses, closures, persistence, Flash, and JavaScript embedded in Java applicationsPart I explains the core JavaScript language in detail. If you are new to JavaScript, it will teach you the language. If you are already a JavaScript programmer, Part I will sharpen your skills and deepen your understanding of the language.Part II explains the scripting environment provided by web browsers, with a focus on DOM scripting with unobtrusive JavaScript. The broad and deep coverage of client-side JavaScript is illustrated with many sophisticated examples that demonstrate how to:Generate a table of contents for an HTML documentDisplay DHTML animationsAutomate form validationDraw dynamic pie chartsMake HTML elements draggableDefine keyboard shortcuts for web applicationsCreate Ajax-enabled tool tipsUse XPath and XSLT on XML documents loaded with AjaxAnd much morePart III is a complete reference for core JavaScript. It documents every class, object, constructor, method, function, property, and constant defined by JavaScript 1.5 and ECMAScript Version 3.Part IV is a reference for client-side JavaScript, covering legacy web browser APIs, the standard Level 2 DOM API, and emerging standards such as the XMLHttpRequest object and the canvas tag.More than 300,000 JavaScript programmers around the world have made this their indispensable reference book for building JavaScript applications."A must-have reference for expert JavaScript programmers...well-organized and detailed." -- Brendan Eich, creator of JavaScript

Cited By

  1. Zhangeldinov O Learning from Mistakes in an Open Source Software Course Software Engineering and Formal Methods. SEFM 2021 Collocated Workshops, (302-311)
  2. Zhang C, Gong Q and Koyamada K (2020). Visual analytics and prediction system based on deep belief networks for icing monitoring data of overhead power transmission lines, Journal of Visualization, 23:6, (1087-1100), Online publication date: 1-Dec-2020.
  3. Lechevalier D, Shin S, Rachuri S, Foufou S, Lee Y and Bouras A (2019). Simulating a virtual machining model in an agent-based model for advanced analytics, Journal of Intelligent Manufacturing, 30:4, (1937-1955), Online publication date: 1-Apr-2019.
  4. ACM
    Thanapattheerakul T, Kongmanee J and Chan J Network-based visualization tool for analyzing gene expression data Proceedings of the 10th International Symposium on Visual Information Communication and Interaction, (77-78)
  5. De Benedetti M, Messina F, Pappalardo G and Santoro C (2017). Web-based Simulations of Multi-agent Systems, Simulation, 93:9, (737-748), Online publication date: 1-Sep-2017.
  6. Vatanparvar K and Al Faruque M Eco-friendly automotive climate control and navigation system for electric vehicles Proceedings of the 7th International Conference on Cyber-Physical Systems, (1-10)
  7. ACM
    Pan X, Cao Y, Liu S, Zhou Y, Chen Y and Zhou T CSPAutoGen Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, (653-665)
  8. ACM
    Merelo J, Castillo P, García-Sánchez P, de las Cuevas P and García Valdez M NodIO Proceedings of the 2016 on Genetic and Evolutionary Computation Conference Companion, (1323-1330)
  9. ACM
    Na Y, Kim S and Han Y (2016). JavaScript Parallelizing Compiler for Exploiting Parallelism from Data-Parallel HTML5 Applications, ACM Transactions on Architecture and Code Optimization, 12:4, (1-25), Online publication date: 7-Jan-2016.
  10. Gupta S and Gupta B (2016). XSS-immune, Security and Communication Networks, 9:17, (3966-3986), Online publication date: 25-Nov-2016.
  11. Brunelle J, Kelly M, Weigle M and Nelson M (2016). The impact of JavaScript on archivability, International Journal on Digital Libraries, 17:2, (95-117), Online publication date: 1-Jun-2016.
  12. ACM
    Merelo-Guervós J and García-Sánchez P Designing and Modeling a Browser-Based DistributedEvolutionary Computation System Proceedings of the Companion Publication of the 2015 Annual Conference on Genetic and Evolutionary Computation, (1117-1124)
  13. Wei S and Ryder B State-Sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects Proceedings of the 28th European Conference on ECOOP 2014 --- Object-Oriented Programming - Volume 8586, (1-26)
  14. ACM
    Bonetta D, Binder W and Pautasso C (2013). TigerQuoll, ACM SIGPLAN Notices, 48:8, (251-260), Online publication date: 23-Aug-2013.
  15. ACM
    Yue C and Wang H (2013). A measurement study of insecure javascript practices on the web, ACM Transactions on the Web, 7:2, (1-39), Online publication date: 1-May-2013.
  16. ACM
    Bonetta D, Binder W and Pautasso C TigerQuoll Proceedings of the 18th ACM SIGPLAN symposium on Principles and practice of parallel programming, (251-260)
  17. ACM
    Kang S and Ryu S (2012). Formal specification of a JavaScript module system, ACM SIGPLAN Notices, 47:10, (621-638), Online publication date: 15-Nov-2012.
  18. ACM
    Kang S and Ryu S Formal specification of a JavaScript module system Proceedings of the ACM international conference on Object oriented programming systems languages and applications, (621-638)
  19. ACM
    Arthur R and Olsen D (2012). Window brokers, ACM Transactions on Computer-Human Interaction, 19:3, (1-21), Online publication date: 1-Oct-2012.
  20. ACM
    Zakai A Emscripten Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion, (301-312)
  21. ACM
    Mickens J and Dhawan M Atlantis Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles, (217-231)
  22. ACM
    Lee S and Moon S Selective just-in-time compilation for client-side mobile javascript engine Proceedings of the 14th international conference on Compilers, architectures and synthesis for embedded systems, (5-14)
  23. ACM
    Arthur R and Olsen D (2011). XICE windowing toolkit, ACM Transactions on Computer-Human Interaction, 18:3, (1-46), Online publication date: 1-Jul-2011.
  24. Mickens J, Elson J, Howell J and Lorch J Crom Proceedings of the 7th USENIX conference on Networked systems design and implementation, (9-9)
  25. ACM
    Mikkonen T and Taivalsaari A The mashware challenge Proceedings of the FSE/SDP workshop on Future of software engineering research, (245-250)
  26. ACM
    Jang D, Jhala R, Lerner S and Shacham H An empirical study of privacy-violating information flows in JavaScript web applications Proceedings of the 17th ACM conference on Computer and communications security, (270-283)
  27. ACM
    Bray Z and Kristensson P Using ensembles of decision trees to automate repetitive tasks in web applications Proceedings of the 2nd ACM SIGCHI symposium on Engineering interactive computing systems, (35-40)
  28. Arsov I, Preda M and Preteux F A server-assisted approach for mobile-phone games Mobile Multimedia Processing, (170-187)
  29. Mickens J Silo Proceedings of the 2010 USENIX conference on Web application development, (9-9)
  30. ACM
    Khoo Y, Hicks M, Foster J and Sazawal V (2009). Directing JavaScript with arrows, ACM SIGPLAN Notices, 44:12, (49-58), Online publication date: 25-Dec-2009.
  31. ACM
    Fernández L, Robles S, Fortier A, Ducasse S, Rossi G and Gordillo S Meteoroid towards a real MVC for the web Proceedings of the International Workshop on Smalltalk Technologies, (28-37)
  32. ACM
    Rose J Bytecodes meet combinators Proceedings of the Third Workshop on Virtual Machines and Intermediate Languages, (1-11)
  33. ACM
    Mikkonen T, Taivalsaari A and Terho M Lively for Qt Proceedings of the 6th International Conference on Mobile Technology, Application & Systems, (1-8)
  34. ACM
    Khoo Y, Hicks M, Foster J and Sazawal V Directing JavaScript with arrows Proceedings of the 5th symposium on Dynamic languages, (49-58)
  35. ACM
    Kuuskeri J and Mikkonen T Partitioning web applications between the server and the client Proceedings of the 2009 ACM symposium on Applied Computing, (647-652)
  36. ACM
    Mikkonen T and Taivalsaari A Creating a mobile web application platform Proceedings of the 2009 ACM symposium on Applied Computing, (177-184)
  37. ACM
    Yue C and Wang H Characterizing insecure javascript practices on the web Proceedings of the 18th international conference on World wide web, (961-970)
  38. ACM
    Chong S, Liu J, Myers A, Qi X, Vikram K, Zheng L and Zheng X (2009). Building secure web applications with automatic partitioning, Communications of the ACM, 52:2, (79-87), Online publication date: 1-Feb-2009.
  39. Wang H, Grier C, Moshchuk A, King S, Choudhury P and Venter H The multi-principal OS construction of the gazelle web browser Proceedings of the 18th conference on USENIX security symposium, (417-432)
  40. Maffeis S, Mitchell J and Taly A Isolating JavaScript with filters, rewriting, and wrappers Proceedings of the 14th European conference on Research in computer security, (505-522)
  41. ACM
    Rivolli A, Marinho D and Pansanato L WAUTT Companion Proceedings of the XIV Brazilian Symposium on Multimedia and the Web, (179-181)
  42. ACM
    Dourado Í and Costa D Interpretação de conteúdo AJAX em páginas dinâmicas para suporte à localização de informações na web Companion Proceedings of the XIV Brazilian Symposium on Multimedia and the Web, (140-142)
  43. ACM
    Rivolli A, Marinho D and Pansanato L Uma abordagem para o rastreamento da interaçao do usuário com aplicações interativas web Proceedings of the 14th Brazilian Symposium on Multimedia and the Web, (28-35)
  44. ACM
    Sharp R, Madhavapeddy A, Want R and Pering T Enhancing web browsing security on public terminals using mobile composition Proceedings of the 6th international conference on Mobile systems, applications, and services, (94-105)
  45. ACM
    Scaffidi C, Myers B and Shaw M Topes Proceedings of the 30th international conference on Software engineering, (1-10)
  46. ACM
    Guo R, Zhu B, FENG M, PAN A and ZHOU B Compoweb Proceedings of the 17th international conference on World Wide Web, (545-554)
  47. Popescu D, Selisteanu D, Dinulescu I and Lazar D Development of online experiments for a mobile robot via internet Proceedings of the 9th WSEAS International Conference on International Conference on Automation and Information, (519-524)
  48. ACM
    Chong S, Liu J, Myers A, Qi X, Vikram K, Zheng L and Zheng X (2007). Secure web applications via automatic partitioning, ACM SIGOPS Operating Systems Review, 41:6, (31-44), Online publication date: 14-Oct-2007.
  49. ACM
    Wang H, Fan X, Howell J and Jackson C (2007). Protection and communication abstractions for web browsers in MashupOS, ACM SIGOPS Operating Systems Review, 41:6, (1-16), Online publication date: 14-Oct-2007.
  50. ACM
    Chong S, Liu J, Myers A, Qi X, Vikram K, Zheng L and Zheng X Secure web applications via automatic partitioning Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principles, (31-44)
  51. ACM
    Wang H, Fan X, Howell J and Jackson C Protection and communication abstractions for web browsers in MashupOS Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principles, (1-16)
  52. ACM
    Hanus M Putting declarative programming into the web Proceedings of the 9th ACM SIGPLAN international conference on Principles and practice of declarative programming, (155-166)
  53. ACM
    Jin J, Maheswaran R, Sanchez R and Szekely P VizScript Proceedings of the 12th international conference on Intelligent user interfaces, (369-372)
  54. Raffetseder T, Kirda E and Kruegel C Building Anti-Phishing Browser Plug-Ins Proceedings of the Third International Workshop on Software Engineering for Secure Systems
  55. ACM
    Ungar D and Smith R Self Proceedings of the third ACM SIGPLAN conference on History of programming languages, (9-1-9-50)
  56. ACM
    Ho A, Fetterman M, Clark C, Warfield A and Hand S (2006). Practical taint-based protection using demand emulation, ACM SIGOPS Operating Systems Review, 40:4, (29-41), Online publication date: 1-Oct-2006.
  57. ACM
    Ho A, Fetterman M, Clark C, Warfield A and Hand S Practical taint-based protection using demand emulation Proceedings of the 1st ACM SIGOPS/EuroSys European Conference on Computer Systems 2006, (29-41)
Contributors
  • Massachusetts Institute of Technology

Recommendations

Reviews

Fernando Berzal

This is the fifth edition of a technical book that has been in print for a decade, a notable achievement in such a quickly changing environment as Web development. This thick, yet concise, clearly written reference book has been reviewed by key members of the JavaScript community, including JavaScript creator, Brendan Eich. Flanagan's writing style, always informative, and his elaborate examples, which are actually useful in practice, are a boon to professional Web developers, even though they probably detract a substantial segment from his book's potential audience. People looking for cookbook recipes might find this book overwhelming and even somewhat frustrating. For those who just want to cut and paste code snippets, I would recommend a quick Web search. A good online JavaScript tutorial would also probably be better for novice JavaScript programmers. In fact, this is not a book for beginners (previous exposure to object-oriented programming concepts is desirable), but it can be extremely useful for professional practitioners. The definitive reference would be a better subtitle for this otherwise excellent book. JavaScript is the programming language behind many Web technologies such as dynamic Hypertext Markup Language (DHTML), Ajax, and even Adobe Flash. DHTML allows users to interact with Web pages, while Ajax supports responsive user interfaces for the Web (Web 2.0, as some people like to say). Finally, the ActionScript language used by the Adobe Flash player is also a JavaScript implementation. In short, JavaScript is the enabling technology for creating a rich user experience on the Web. "JavaScript" is also used to refer to the context where JavaScript applications are executed, usually within a Web browser. Many developers mistake the language for the context, so it is not unusual to find people who, heavily influenced by platform compatibility issues that hinder their day-to-day jobs, tend to disregard JavaScript. Despite this, mastering JavaScript is still a required skill for Web developers. Compatibility issues will probably exist forever, but poor design practices can be corrected. For instance, you can resort to the "unobtrusive JavaScript" programming style advocated for in this book, thereby separating the content in HTML documents from the style in cascading style sheets (CSS) and the dynamic behavior specified in physically separate JavaScript scripts. JavaScript, as a language, is a loosely typed interpreted programming language with some interesting features. This book is considered to be the JavaScript book because its first part focuses on the language itself, separating the language from its common use within Web browsers. It clearly tackles all of the topics you might find in a good programming language reference, from its syntactic details concerning literals, expressions, and statements, to its loose type system and its support for modularization. In JavaScript, functions are first-order language elements, as in functional languages. You can also create pseudo classes using constructor functions. Instead of relying on class-based inheritance, as most object-oriented languages do, JavaScript uses prototype-based inheritance. Finally, JavaScript also allows mixins, that is, borrowing methods without inheriting. Flanagan has done a great job describing the language, and this part of the book alone, which delves into JavaScript innards, justifies its price. As a bonus, you will also learn how to script Java applications using JavaScript. This capability, whose origins trace back to Netscape LiveConnect, has been included as a standard feature in Java 6. The second part of the book focuses on client-side JavaScript: the use of JavaScript in Web browsers. Through its 360 pages, you will learn how to deal with browser windows through the Window object and how to manipulate Web page contents by means of the HTML document object model (DOM). Adding dynamic behavior with event handlers, controlling user input in HTML forms, and storing data in cookies are some of the most common tasks you will learn how to perform. As you might expect, you will find dedicated chapters to popular Web technologies, such as hypertext transfer protocol (HTTP) scripting (also known as Ajax) and Extensible Markup Language (XML), from Extensible Stylesheet Language Transformations (XSLT) style sheets to simple object access protocol (SOAP) Web services. The book also describes different techniques for dealing with images in order to dynamically create graphs and charts. The last chapter in this detailed survey of client-side JavaScript describes how to script Java applets and Flash movies. The third and fourth parts of this huge book include a comprehensive application programming interface reference for core and client-side JavaScript classes, respectively. These Javadoc-like glossaries describe each object, property, and method in the JavaScript libraries. They make clear the differences between the standard and the nonstandard capabilities that different Web browsers support. While JavaScript is an Ecma standard known as ECMAScript, and the HTML DOM is a World Wide Web Consortium standard, different versions of different Web browsers do not provide the same support for JavaScript. The availability information annotating each element in this reference is invaluable for Web developers, since it allows for the development of cross-browser compatible client-side Web applications (that is, applications that work for all common Web browsers: Internet Explorer, Firefox, Opera, and Safari). It is a pity this half of the book is not provided in digital form or, even better, as a Web page that could be kept up to date. It certainly would save some trees. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.