This article introduces Kissy, an open-source javascript project, as a js framework pushed by the taobaoUED team. Let's take a simple look at why taobao is so respectful of him.
About kissy
What is kISSY?
KISSY is an open-source javascript project, and its main body is a front-end UI development framework, that is, KissyUI. The kissy mentioned in this article only refers to the language and framework design ideas in the kissy. js kernel. The Open Source site for the KISSY project is: http://kissyteam.github.com/
How to Use kissy?
Although we proposed some new concepts and framework models in the process of migrating KissyUI to kissy kernel, we did not actually change any usage practices of KissyUI. From the code point of view, kissy. js and lang. other modules in js have not changed. Therefore, if you only use kissy as a UI system, you can refer to the above open source website, the existing KissyUI documentation is completely effective, and KissyUI itself is an excellent and convenient Web UI framework. However, the kissy system's ability to merge and organize models is greatly enhanced.
After downloading the source code, we can see that the size of the compressed kissy-min.js file is 42kb (jQuery-min is 71kb, dojo core is 88kb)
Check the official documentation and find that the kissy project is divided into nine parts.
The core structure of kissy. js can be divided
The base class is kissy. The following methods are provided:
(Here is a small suggestion for developers. When I first read this document, I always thought that kissy is required to access the add method. kissy. the declaration method such as add may be reading more ext/dojo documents. Seeing documents such as kissy makes me unable to take a glance and know how to use them, hope to improve it ...)
Understand core APIs
Like all js frameworks, kissy provides the kissy. Config object for initial loading of the kissy framework,
And a DocumentReady event, the kissy. ready (fn) method,
(The developer did not write it here. The execution sequence of multiple events registered by ready can be seen by viewing the source code. The events registered by ready are placed in a list. During execution, according to the first-in-first-out principle)
There is also an available method that can be executed when the monitoring element is available
However, I always think that the immediate execution here is ambiguous. Its principle is generally a timer. delayed scanning cannot be regarded as immediate.
Encapsulates a simple debug output, implements a log and error method, and uses the console of the browser
For componentized management, namespace, Object Inheritance (extend), object member copy (mix/merge), prototype copy (argument), and object Declaration (app) are implemented) and other methods,