-
Semantics works?
A developer is a creativity entity. There are so many software technologies emerging everyday, many of us are struggling to keep pace with the them. I am just an average developer, and I still tirelessly studying these technologies, because programming is my passion and love. Gradually, I understand semantics is the driven force of the evolution of software tools, framework, platform, methodologies and standards. As a .net developer, I use the object-oriented programming, domain driven development, agile programing, mocking framework, asp.net mvc, css, xhtml, wpf, RESTful web service.
I truely believe that semantics works. Today I am moving my studying notes to SemanticsWorks.
-
Best practice to develop jQuery plugin
- Create a private scope for $
- Attach plugin to $.fn alias
- Add implicit iteration
- Enable chaining
- Add default options
- Add custom options
- global custom options
<div id="counter1"> </div> <div id="counter2"> </div> <script> (function($) { $.fn.count = function(customOptions){
-
javascript reflection in jQuery
String: typeof object === "string" Number: typeof object === "number" Boolean: typeof object === "boolean" Object: typeof object === "object" Function: jQuery.isFunction(object) Array: jQuery.isArray(object) Element: object.nodeType null: object === null undefined: typeof variable === "undefined" or object.prop === undefined null or undefined: object == null
-
it must be "new"ed.
The following is constructor which prevent not using "new" keyword
-
javascript scope
In JavaScript, {blocks} do not have scope.