JS

TwitterFacebook
Get flash to fully experience Pearltrees
http://markembling.info/2011/07/json-date-time

JSON and Dates/Times - Mark Embling

Lately I've noticed that JSON and dates/times do not go together well. JSON allows integers, fractional numbers, strings, arrays and so on, but no way to natively specify a point in time. It turns out this relatively minor-sounding point can cause a fair bit more pain than it probably should. Current Options It seems there are at least three relatively common methods of representation of a point in time in JSON.
http://ckeditor.com/demo

Demo | CKEditor

Standard editor The following is the standard editor configuration provided with the standard option in the download page . CKEditor with lots of features enabled
Dijit is Dojo's UI Library, and lives as a separate namespace dijit . Dijit requires Dojo Core and Dojo Base . Each of the widgets and functionality provided by Dijit are described in the following sections, though the Getting Started guides and the Tutorials cover some basics. For most of the Dijit widgets, you can provide a refNode which is a placeholder to position your node. Beware that any attribute set on it (form action, input value, etc.) won't be taken into account.

Dijit Overview view /dijit

http://livedocs.dojotoolkit.org/dijit
http://forum.jquery.com/topic/datafilter-function-and-json-string-result-problems It seems there's problem with the dataFilter function when the result returned is an already parsed JSON string. I'm using a dataFilter to basically perform custom JSON conversion trying to completely bypass jQuery's JSON parsing. Here's what my code looks like: Copy code

dataFilter function and JSON string result problems

As of jQuery 1.7, jQuery will register as an AMD module, but only if the AMD loader sets define.amd.jQuery to a true value. This was done because jQuery is very popular, being used as part of third party script utilities like analytics scripts. In those cases, multiple versions of jQuery could be loaded on a page, outside of an AMD loader. However, since jQuery calls define, the AMD loader will be notified of each jQuery version loaded, if they are versions past jQuery 1.7.

jQuery and AMD · amdjs/amdjs-api Wiki

https://github.com/amdjs/amdjs-api/wiki/jQuery-and-AMD

AMD · amdjs/amdjs-api Wiki

https://github.com/amdjs/amdjs-api/wiki/AMD The Asynchronous Module Definition (**AMD**) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded. This is particularly well suited for the browser environment where synchronous loading of modules incurs performance, usability, debugging, and cross-domain access problems. It is unrelated to the technology company AMD and the processors it makes.

Работаем с jQuery Templates

http://habrahabr.ru/post/112843/ Плагин jQuery Templates – это «движок шаблонов», работающий на стороне клиента как расширение jQuery . Этот плагин помогает показать в браузере данные, которые находятся в объектах и массивах JavaScript, избавляя вас от рутинных операций по созданию HTML-кода, экранированию специальных символов и т.п. Кроме того, он обладает очень интересными возможностями – например, позволяет обновлять созданный с его помощью HTML-код при изменении исходных данных. Разумеется, jQuery Templates – не единственный и не первый «движок шаблонов», но у него есть большое преимущество перед альтернативными вариантами – поддержка со стороны jQuery Team . Это позволяет нам не бояться того, что этот плагин окажется заброшенным, и различные проблемы, возникающие при выходе новых версий браузеров, придется решать своими силами.

Mediator Pattern applied to Javascript — Fancy Bread

Posted by Paul Marcotte | Tags: Design Patterns , Ext JS , Javascript In a previous post about JSLint AIR , I introduced my concept of an "Application" object that was responsible for registering and initializing individual components. In turn, each of these components was responsible for a specific piece of the application, either a UI element, generating a report, or interfacing with the Adobe AIR API. At the time, I thought that it was a good way to initialize different Ext JS components, encapsulate and organize my code. I've since refined that object slightly as I have learned that I was actually employing the Mediator design pattern. http://www.fancybread.com/blog/post.cfm/mediator-pattern-applied-to-javascript
http://arguments.callee.info/2009/05/18/javascript-design-patterns--mediator/

JavaScript Design Patterns: Mediator - arguments.callee

(skip to the code example) The Mediator Design Pattern The Mediator is a behavioral design pattern in which objects, instead of communicating directly with each other, communicate only through a central message passing object (the Mediator). The Mediator pattern facilitates both loose couple and high cohesion.
Today we're going to discuss an effective set of patterns for large-scale JavaScript application architecture. The material is based on my talk of the same name, last presented at LondonJS and inspired by previous work by Nicholas Zakas. Who am I and why am I writing about this topic? I'm currently a JavaScript and UI developer at AOL helping to plan and write the front-end architecture to our next generation of client-facing applications. As these applications are both complex and often require an architecture that is scalable and highly-reusable, it's one of my responsibilities to ensure the patterns used to implement such applications are as sustainable as possible.

Patterns For Large-Scale JavaScript Application Architecture

http://addyosmani.com/largescalejavascript/