What is a JavaScript framework? How can you call it a framework?

Source: Internet
Author: User

This article mainly describes what the JavaScript framework is, what can be called the framework, this article explains what is JavaScript framework, JavaScript framework of the typical features and so on, the need for friends can refer to the

Just beginners, you will always hear about the framework of some things. I don't know what a frame is until I finish JQ. It is a reprint of an article, hope that the children are still confused a little help.

What is a JavaScript framework?

JavaScript itself is a powerful language, and you don't need an extra framework to create rich Internet applications (RIA). However, using JavaScript is not an easy task, mainly due to the complexity of supporting multiple Web browsers. As with HTML and CSS, different browsers have different JavaScript implementations. Making JavaScript Code Cross-browser compatible is a nightmare.

A JavaScript framework or library is a set of tools and functions that easily generate Cross-browser-compliant JavaScript code. Each library is reliably tested on modern versions of many popular Web browsers, so you can safely use these frameworks, and your JavaScript-based RIA will work in a similar way on different browser platforms.

In addition to addressing cross-browser issues, using the JAVASCRIPT framework makes it easier to write code that retrieves, traverses, and operates DOM elements. Not only do they provide shortcut functions to get DOM element references, but they also allow DOM traversal functions to find the parent, child, and sibling elements of any depth in a daisy-chained (daisy-chaining) way. Finally, the framework provides a series of functions to manipulate these objects more easily, to change, add, or delete the content itself, or to use CSS style classes to change the appearance of the elements.

Another important feature of the framework is its improved event-handling support. Cross-browser event handling can be very difficult because different browsers are implemented differently. The JavaScript framework therefore typically encapsulates browser events and provides a useful set of Cross-browser-compatible functions for processing. Some frameworks also provide a standard set of keyboard codes to represent keyboard based events (such as pressing the Escape key, return key, cursor key, and so on).

All of these features are useful, but the JAVASCRIPT framework has an attribute that is important for its recent popularity--Ajax support. Like many other aspects of JavaScript, each Web browser often supports Ajax in a different way, making it complex to handle Ajax in a way that is supported in all Web browsers. Almost all JavaScript frameworks contain some form of AJAX library support, typically providing AJAX request and response objects, and help functions (helpers) for evaluating responses, updating DOM elements, and querying for specific requests.

Typical features of JavaScript frameworks

Now, let's take a look at the useful features that most JavaScript frameworks have. Including:

1. Selector (Selector)

2.DOM traversal

3.DOM operation

4. Practical (Utility) functions

5. Event Handling Ajax

When interpreting each feature, I will use one or more of the following JavaScript frameworks to illustrate: Prototype, JQuery, YUI, ExtJS, and MooTools. Although the implementation and syntax of each framework are different, the concepts are the same. Each framework has a detailed API reference that can help you understand how to use the attributes in that particular library.

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.