发布于 2012/03/21 10:45
字数 1144
阅读 14
收藏 0
JavaScript, for much of its existence, has been the subject of fear, invective, disdain, and
misunderstanding. In its early years, many “serious programmers” thought that JavaScript wasn’t
serious enough.
By contrast, many liberal arts majors drafted into web-developer service during the dotcom boom
thought JavaScript was mysterious and arcane. Many who had both the tenacity and the patience to fully
grok JavaScript as a language were nevertheless frustrated by its inconsistent implementation across
competing browsers. All of these factors helped lead to a proliferation of awkward and poorly conceived
scripts. And, through the extraordinary openness of front-end code on the Web, a lot of bad habits were
copied from one site and pasted into the source of another. Thus JavaScript’s bad reputation as a
language, which was generally ill-deserved, became intertwined with a deservedly bad reputation
surrounding its implementations.
Around 2001 (with the release of Internet Explorer 6), improved browser implementations and
improving practice in web development began to converge. The XMLHttpRequest object at the heart of
Ajax was slowly being discovered, and a new paradigm of desktop-style user interaction was emerging
within the browser. The DOM APIs that allowed JavaScript to manipulate the structure and content of
web documents had solidified. CSS, for all the contortions, omissions, and the willful insanity of its
implementations by browser vendors, had progressed far enough that beauty and responsiveness could
be combined with the Web’s new interactive power. As a result, JavaScript became the subject of a new
set of emotions: surprise, delight, and awe. If you think back to the first time you used Google Maps in
2004, you may recall the feeling.
Google Maps was among an emerging class of applications that took browser-based programming as
seriously as back-end programming and made us think differently about the application canvas provided
by the web browser. (Oddpost, which provided Outlook-style email functionality in a webmail client as
early as 2003, was another notable pioneer.) The proliferation of these applications and the increasing
market penetration of browsers that supported them led to a genuine renaissance in web application
engineering. “Web 2.0” was born, and Ajax became the “it” technology. The Web was suddenly interesting
all over again. JavaScript, as the only programming language of the Web, became more interesting, too.
Interesting, but hard to do well. JavaScript and its companion APIs in the Document Object Model (DOM)
and Browser Object Model (BOM) were inconsistently implemented, making cross-browser
implementations vastly more difficult than they needed to be. The profession of front-end engineering
was still young. University curricula had not (and still have not) stepped in to meet the training challenge.
JavaScript, arguably the most important programming language in the world by the end of 2004, was not
a first-class subject in the academic sense of the word. A new day was dawning on the Web, and there
was a serious question as to whether there would be enough knowledgeable, well-informed engineers to
meet the new challenges.
Many technical writers stepped in to fill the gap with books on JavaScript. There were dozens of these
over the years, but by and large they were a disappointing lot. Some of them promoted techniques that
were relevant only in retrograde browsers; some promoted techniques that were easy to cut and paste
but hard to extend and maintain. Puzzlingly, many books on JavaScript seemed to be written by people
who didn’t really like JavaScript, who didn’t think you should like it, and who weren’t optimistic about
your ability to understand it fully.
One of the genuinely good books in the world of front-end engineering arrived when Nicholas C. Zakas
published the first edition of Professional JavaScript for Web Developers in 2005. At the time, my colleagues
and I were working at Yahoo! to create the Yahoo! User Interface Library (YUI) as a foundation for
front-end engineering here and to evangelize best practices in our nascent discipline. Every Friday, we’d
gather in a classroom to talk about the front-end engineering and to teach classes on JavaScript, CSS, and
the creation of web applications in the browser. We carefully reviewed the offerings at the time for books
that would help new engineers learn how to build robust, standards-based, easy-to-maintain web
applications using advanced JavaScript and DOM scripting. As soon as it was published, Zakas’s book
became our textbook for JavaScript.
We’ve been using it ever since. We thought so highly of the book that we talked Zakas into coming to
Yahoo! to help shape the front-end engineering community here.
What Zakas accomplished with Professional JavaScript for Web Developers is singular: He treated JavaScript
as a subject that is both serious and accessible. If you are a programmer, you will learn where JavaScript
fits into the broader spectrum of languages and paradigms with which you’re familiar. You’ll learn how
its system of inheritance and its intrinsic dynamism are, yes, unconventional but also liberating and
powerful. You’ll learn to appreciate JavaScript as a language from a fellow programmer who respects it
and understands it.
If you’re one of those liberal arts majors who was drawn into this profession in the boom years and never
left, and if you want to fill in the gaps of your understanding of JavaScript, you’ll find Zakas to be the
mentor you’ve always wanted — the one who will help you make the transition from “making things
work” to “making things that work well.” He’ll leave you with a serious understanding of a serious subject.
Best of all, you’ll find that he doesn’t pander to preconceived notions about how deeply you should
understand the language. He takes it seriously, and in a patient, accessible way he helps you to do the same.
This second edition of Professional JavaScript for Web Developers — expanded, updated, improved — drops
some subjects that are less relevant to the profession today and upgrades the rest with what we’ve
learned between 2005 and 2008. These years have been important ones, and Zakas is on the front line of
the process of learning. He’s spent those years architecting the current generation of the Web’s most
popular personal portal (My Yahoo!) and the next version of the web’s most visited site (Yahoo!’s front
page). Insights forged in these complex, ultra-high-volume applications inform every page of this new
volume, all passed through Zakas’s unique filter as a teacher/author.
As a result, his solutions go beyond being book-smart and include the kind of practical wisdom you can
only get by living and breathing code on a daily basis.
And that’s seriously good news for the rest of us. Professional JavaScript for Web Developers is now even
better, even more relevant, and even more important to have on your shelf.
Eric Miraglia, Ph.D.
Sr. Engineering Manager, Ya

© 著作权归作者所有

上一篇: tip
下一篇: Diving In
粉丝 0
博文 5
码字总数 2737
作品 0
私信 提问

分享51本关于JavaScript方面的学习书籍(免费下载) 1、JavaScript面向对象15分钟教程 2、原型、作用域、闭包的完整解释 3、Javascript面向对象特性实现(封装、继承、接口) 4、JavaScript面向...

JavaScript 开发者必备的7个资源

JavaScript 最近几年已经由一个二流选手变成使用最广的函数式编程语言。越来越多的资源投入到这个语言的开发中。 我最近做了很多JS开发,有前台的,也有在后台使用 Node.js 的。我想在这里分...


分别归类为:  javascript变量  javascript运算符  javascript数组  javascript流程语句  javascript字符串函数  javascript函数基础  javascript基础DOM操作  javascript正则表达式...

React Native iOS混合开发实战教程

在做RN开发的时候通常离不了JS 和Native之间的通信,比如:初始化RN时Native向JS传递数据,JS调用Native的相册选择图片,JS调用Native的模块进行一些复杂的计算,Native将一些数据(GPS信息,...


今天刚刚学习easyui 在引入easyui的js时,如果把自己的js放在easyui的js之前的话,easyui就不能成功引入例如: <script type="text/javascript" src="js/login.js"></script> //自己的js <s......






看过这篇《2000字谏言,给那些想学Python的人,建议收藏后细看!》的读者应该都对一个命令有点印象吧?没错,就是 linux 中经常会用到的 ls 命令。 文章中我就提到如何提升自己的 python 能力...


一、hashmap数据结构:哈希表结构:数组+链表 hashmap调用默认构造方法会产生一个默认底层是长度为16的Entry数组,首先调用key的hasCode()方法来得到一个整数, int hash = hash(key.hashCode...

第五章 spring-connet之Imports注解来龙去脉

前言 imports是一个在spring体系里非常重要的注解,基本每个Enable开头的注解必然有一个import注解。接下来我们深入研究下import的作用。看小节的同学建议先取看PostProcessorRegistrationDe...


关于Harbor Harbor是用于存储和分发Docker镜像的镜像仓库服务,相比Docker Registry,Harbor在安全、标识、管理等方面做了增强,更适合企业使用; 官方网站:https://goharbor.io/ 官方开源:...


每个JavaScript开发者都用过console.log()来调试程序,但实际上Console对象还提供了很多其他方法可以提高调试效率。本文将介绍8个有趣的Console方法,即使JavaScript老手也不一定知道! 1、c...