 |
Learning JavaScript by Shelley Powers
Book Summary InformationAuthor: Shelley Powers Edition: Paperback Audio: English (Unknown); English (Original Language); English (Published) Published: 2006-10-24 ISBN: 0596527462 Number of pages: 352 Publisher: O'Reilly Media
Book Reviews of Learning JavaScriptBook Review: Looking at JavaScript throught the eyes of an ActionScripter Summary: 5 Stars
Learning JavaScript
by Shelley Powers
Copyright 2007
ISBN-10: 0-596-52746-2 or ISBN-13: 978-0-596-52746-4
Review written by Linda Weller
This book was really a surprise!! I wasn't sure that I was going to like it. It however, proved to be packed with lots of useful information. As a huge fan of ActionScript, I saw the many parallels that are spoken of in regards to these two languages. It was fun going through it to see that there is so much I already know of JavaScript because I know ActionScript.
There are similarities but, there are also differences. One being that JavaScript hasn't gone in the direction of OOP as much as ActionScript has.
Shelley makes clear that Java Script cross-browser incompatibility has been based on DOM or CSS differences not the Java Script language.
JavaScript is useful for form field validation, setting and retrieving web cookies, providing feedback for incorrect form entries, hiding and showing elements, moving elements about the page, capturing user events and adjusting them on the page accordingly, scrolling content, and interfacing with a server-side application without leaving the page.
The syntax for including a JavaScript library or script file in your web page is <script type = "text/javascript" src="somejavascript.js'></script>
This is helpful to know when as a Flash developer you will need to use this line of code in the header of your HTML file to use the Flash (SWF) Object as a work around for the Microsoft Eula. Comments are written the same way in both languages.
I appreciate the higher-level view of programming this book gives you. The author has written books not only on JavaScript but, ASP and Unix so it really has a technical flavor.
Comments are written the same way in both languages. One thing that is quite different is the use of ellipses.... They mean that what follows is processed if the equality operators are evaluated to be true.
The author gives you a real history of the use of JavaScript. She explains how ten years ago when most browsers were on their first or second version, JavaScript contents were enclosed in HTML comments <!--and -->. This was done to keep some browsers from printing the output of the script tag to the page. When the script was enclosed between these HTML comment tags the browsers didn't know it was there. However, that is not something we do today because browsers that don't understand JavaScript are long gone and use of these tags conflicts with pages created as XHTML.
There is discussion about all the programming basics for JavaScript like data types and variables, scope, statements, conditional statements, switch statements, and conditional operators, loops, regular expressions, functions, and objects.
Shelley even gives you the URL for a free JavaScript editor. And many useful links full of JavaScript libraries.
The DOM 2 Event Model is discussed. Each object has 3 methods: addEventListener, removeEventListener, and dispatchEvent.
Then the author goes on to talk about JIT Validation. This stands for Just-in-Time. It is timely forms validation that is triggered as the user goes through the form fields.
Shelley gives you the method to store/read cookies. You will need the cookie name or key, an associated value (cookieName = cookieValue, an expiration date, and a path associated with the cookie (at the top most level of your domain for security). You also must specify whether the cookie is HTTP or HTTPS.
JavaScript derives its OO functionality from prototyping. ActionScript used prototyping in the 1.0 version of the language and has gone way beyond prototyping.
Another great feature of this book is that it discusses AJAX (Asynchronous JavaScript and XML).AJAX is outside the page and requires a server component. It allows web-page form validation to happen in place. By clicking a button a huge form will collapse and clear up the clutter on the page. AJAX handles sending a request to the server, invoking a service and returning data all within the context of the same page. An example of a famous AJAX/DHTML/JS application is Google Maps.
It is a theoretical history with some code examples, which refer you to other links for code libraries you can work with. It is not, however, project based. I recommend it to people interested languages other than JavaScript because it gives you a higher level view of the programming field.
Summary of Learning JavaScriptAs web browsers have become more capable and standards compliant, JavaScript has grown in prominence. JavaScript lets designers add sparkle and life to web pages, while more complex JavaScript has led to the rise of Ajax -- the latest rage in web development that allows developers to create powerful and more responsive applications in the browser window. Learning JavaScript introduces this powerful scripting language to web designers and developers in easy-to-understand terms. Using the latest examples from modern browser development practices, this book teaches you how to integrate the language with the browser environment, and how to practice proper coding techniques for standards-compliant web sites. By the end of the book, you'll be able to use all of the JavaScript language and many of the object models provided by web browsers, and you'll even be able to create a basic Ajax application.
|
 |
|
|
JavaScript Pocket Reference (2nd Edition)by David Flanagan O'Reilly Media; Published: 2002-11-05; Paperback; BookBest price: $5.09Price in other shops: $9.95
CSS: The Definitive Guideby Eric A. Meyer O'Reilly Media; Published: 2006-11-14; Paperback; BookBest price: $22.98Price in other shops: $44.99
Learning PHP 5by David Sklar O'Reilly Media, Inc.; Published: 2004-07; Paperback; BookBest price: $6.98Price in other shops: $29.95
|