dean.edwards.name
Dean Edwards: Callbacks vs Events
http://dean.edwards.name/weblog/2009/03/callbacks-vs-events
Two steps forward one step back. Most of the major JavaScript libraries claim to support custom events in one form or another. For example, jQuery, YUI and Dojo all support a custom “document ready” event. However, the implementation of these custom events is always some form of callback system. Before I answer that, let’s look at some code. Here is some simple code that uses the. Event to perform two separate initialisations:. What do you expect to see in the console when the document is loaded? Init: 1...
danwebb.net
danwebb.net - Custom Attributes And Class Names
http://danwebb.net/2007/10/7/custom-attributes-and-class-names
Custom Attributes And Class Names. At the Rich Web Experience, Alex Russell did a presentation entitled Standards Heresy. In the presentation, which I didn’t attend so forgive me if I’ve gotten the wrong end of the stick, he spoke about how Dojo has been forced to abandon web standards in some cases in order to get the job done. The conversation was furthered by Aaron Gustafson’s response. And is a really interesting discussion. However, I’m not going to comment on the politics of the W3C. Is critically ...
blogs.adobe.com
JavaScript: Operators | Web Platform Team Blog
https://blogs.adobe.com/webplatform/2012/09/21/javascript-operators
Web Platform Team Blog. Making the web awesome. Follow us on Twitter. Next post →. September 21, 2012. In the previous article. I talked about types and type coercion in JavaScript. In this one I want to talk more about how this coercion applies to JavaScript operators. Lets go over six major operators and look at how they work:. Operator returns a string representation of the type of the passed expression. There are two major points to note:. Unresolvable references will produce. Lies in two cases for.
kangax.github.io
Named function expressions demystified
http://kangax.github.io/nfe
Named function expressions demystified. By Juriy "kangax" Zaytsev. Function expressions vs. Function declarations. Function names in debuggers. Surprisingly, a topic of named function expressions doesn’t seem to be covered well enough on the web. This is probably why there are so many misconceptions floating around. In this article, I’ll try to summarize both theoretical and practical aspects of these wonderful Javascript constructs; the good, bad and ugly parts of them. Must always have an. We can see t...
peter.michaux.ca
peter.michaux.ca - JSON DB: a compressed JSON format
http://peter.michaux.ca/articles/json-db-a-compressed-json-format
JSON DB: a compressed JSON format. Published June 16, 2007 in JSON. Is far less verbose than XML. But sometimes even JSON is more verbose than necessary. An example is sending many database rows to the browser. If we want to send rows of data representing users and books to the browser then the basic JSON approach would be something like the following. Users": { "cols": ["first", "last"], "rows": [ "Homer", "Simpson"], ["Hank", "Hill"], ["Peter", "Griffin"] }, "books": { "cols": ["title", "author", "year...
justjavac.com
命名函数表达式探秘 - justjavac的博客
http://justjavac.com/named-function-expressions-demystified.html
作者 Juriy "kangax" Zaytsev. 我觉得很奇怪,网上好像一直没有人认真地讨论过命名函数表达式 Named Function Expression,即 有名字函数表达式 ,与 匿名函数 相对。 Function Identifier ( FormalParameterList. 显然,在省略标识符的情况下, “表达式” 也就只能是表达式了。 可要是不省略标识符呢 谁知道它是一个函数声明,还是一个函数表达式 毕竟,这种情况下二者是完全一样的啊 实践表明,ECMAScript是通过上下文来区分这两者的 假如. Function foo(){}; / 声明,因为它是. 的一部分 var bar = function foo(){}; / 表达式,因为它是. New function bar(){}; / 表达式,因为它是. 的一部分 (function(){ function bar(){}; / 声明,因为它是. 译者注 } ({ "x": 5 }); / 分组操作符会导致解析器强制将{和}作为对象字面量来解析. If (true) { function foo(){ return 1; ...
danwebb.net
danwebb.net - From The Archives: Cleaner Callbacks With Partial Application
http://danwebb.net/2006/11/3/from-the-archives-cleaner-callbacks-with-partial-application
From The Archives: Cleaner Callbacks With Partial Application. When I redesigned this site a couple of months back a really wanted to start with a clean slate so I purposefully didn’t import old posts from either the old danwebb.net or The Web’s Bollocks. I’ll come up with some new content soon, promise. JavaScript has a lot of weaknesses. In this article I’m going to tackle one aspect of JavaScript functional programming, partial application and how you can use it to create reusable callback functions f...
redsquirrel.com
Red Squirrel Reflections
http://redsquirrel.com/cgi-bin/dave
Dave Hoover explores the psychology of software development. Thu, 05 Mar 2009. Of Red Squirrel Reflections, I'm calling it quits. I've now officially gone nuts. Update your RSS feeds and subscribe to http:/ feeds2.feedburner.com/redsquirrel. Fri, 02 Jan 2009. Looking back on my goals for 2006 and 2007, it's gratifying to see that I've accomplished some things. In 2006 I wanted to finish writing the book. Yeah! It's 2009 and the book is done! So, without further delay, my goals for 2009:. Thu, 04 Dec 2008.