Friday, 23. January 2009
“JavaScript The Good Parts” by Douglas Crockford is one of the most subjective books on JavaScript because it dares to divide JavaScript language specifications into good parts and bad parts.
Most of good parts are well-known, but not widely used. I can see they are fully and correctly used in JavaScript frameworks or toolkits but they are rarely or inappropriately used by page designers.
For me, sections on bad parts are much useful. I tell “===” from “==” but I have never used “===” just because I, as a Java programmer, am not familiar to it. The book helps use bad parts less rather than use good parts more.
Sunday, 30. March 2008
Recently, I found Douglas Crockford’s blog. Although I am very interested in his articles, finding his blog took a long time since http://www.crockford.com/ doesn’t provide any link to it. Reading posts was enjoyable. I note down some impressive posts.
Introducing other’s work
- A paper, Using JavaScript as a Real Programming Language
- The Non-Designer’s Design Book
Introducing his work
- Adsafe
- Contributions to JSON
Informative but arguable (in my view)
- XML’s future in WEB : XML is on web trending down. XHTML failed to displace HTML because
- Its client-side validation is not so beneficial.
- It lacks security model
- Thread is evil.
- Scribe, the first trial of data-document translation, is similar to JSON. Adopting SGML and XML instead of it was a bad choice.
Security of JavaScript seems to be one of his current concerns. His recent talk shows his approaches toward the security problems.
Tuesday, 29. January 2008
The “Pro JavaScript Techniques” authored by John Resig, the creator of jQuery, is a excellent book. I neither bought nor read the book. Instead I just read sample code snippets from http://jspro.org/code/ and tested them. Guessing from the code snippets, Ch.2 and Ch.3 describe backgrounds of JavaScript. I think these chapters are the core of this book and they really help us understand the concept of “prototype-based” and write object-oriented JavaScript code gracefully. Remaining chapters are for advanced techniques and tips: Ajax, DOM, cross-browser supporting, new features of JavaScript 1.6/1.7 and so on. Even though these chapters are not so much impressive to me, they also seem to be worthwhile to read.
Monday, 26. November 2007
JavaScript is a prototype based language, and it has many characteristics of functional languages. For example, JavaScript regards a function as a first-class object. Among many type checking functions YUI provides, YAHOO.lang.isObject() reflects the characterstic.
<script src="http://yui.yahooapis.com/2.3.1/build/yahoo/yahoo-min.js" type="text/javascript"></script>
foo= function() {} // function is storable in variables
YAHOO.lang.isObject(foo) // returns true