Open-source javascript project Kissy introduction _ javascript tips-js tutorial

Source: Internet
Author: User
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,

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.