Simplify the development process to understand the applicability of various Ajax frameworks (1)

Source: Internet
Author: User

With the prevalence of Ajax, many websites have adopted this technology. Behind the trend of this era, a variety of Ajax development frameworks can be said to be the greatest hero, so that developers do not need to duplicate the wheel, it eliminates the need to reconstruct a program from the bottom layer of JavaScript.

Simplify JavaScript usage

Many developers underestimate the difficulty of JavaScript. In the past, JavaScript was often regarded as a disturbing little thing. It was not just a bounce window, it was just a very popular application such as a lawn lamp or dynamic text. However, JavaScript's unique object concept and flexible syntax give it the ability to deeply operate the file object model DOM) and manipulate CSS, while fully applying the XMLHttpRequest object browser, more importantly, the success of today's Ajax blockbuster.

The full understanding of these applications is not as easy as you can imagine. Because the implementation method is flexible, you only need to examine the syntax of each framework to discover the differences between them. However, the existing frameworks are dedicated to simplifying the difficulty of JavaScript applications. Therefore, using Ajax frameworks allows developers to focus more quickly on development.

Solve annoying browser compatibility problems

Even if developers are very skilled, they can easily control the JavaScript syntax. However, once you encounter a wide variety of browsers, you will usually be defeated. Different browsers support different file parsing and syntaxes, and sometimes show different behaviors in different operating systems or versions, such as the differences between IE6 and IE7 ), it causes many JavaScript Application bottlenecks to occur in compatibility. One of the advantages of using the Ajax framework is that it has already solved browser compatibility problems for developers in advance.

Development process becomes simpler

People who have developed non-synchronous transmission programs will be able to understand the cumbersome process of writing. They must check the details such as the return status, specified backend applications, and callback programs, ajax frameworks are usually simplified to reduce the time for developers to struggle with details. In addition, many Ajax frameworks provide drag components, animation effects, and dynamic menus. You only need to specify a method to use them, saving a lot of development effort.

However, the Ajax framework is implemented in different ways. Some JavaScript syntax developers also use. NET or Java. In addition to running on the user end, there are also ways to use the server end. We have selected Ten Ajax frameworks to help developers understand the applicability of each Ajax framework.

1. APS. NET official Solution

ASP. net ajax is a solution on the Microsoft. NET platform. It provides the AJAX technology and JavaScript integration mechanism required by servers and clients. By downloading and installing ASP. net ajax to Visual Studio 2005, you can use the preset control items to develop some Visual effects and non-synchronous transmission applications.

In addition, ASP. net ajax also provides a Toolkit for control items, including the basic categories and project templates required by developers to develop AJAX applications on their own. ASP. net ajax not only handles browser compatibility issues, but also allows JavaScript on the user end to add object-oriented features during development, such as type systems, data types, namespaces, and events, this makes code debugging, maintenance, and reuse easier.

Although ASP. net ajax provides server and client solutions. With the support of Visual Studio2005, it also reduces the difficulty of Development and debugging. However, compared with other AJAX frameworks, many AJAX effects and functions are still in the test phase for users to test in the CTP version), and the functions that can be applied are limited.

2. Supported Functions

Some lightweight Ajax frameworks are designed to solve the ease-of-use or special effect problems encountered by JavaScript. In contrast, Dojo is more like a comprehensive JavaScript tool package, it can reduce the front-end development speed of web pages or web applications.

Dojo supports drag, fade out, fade in, move, transparency, and operations on dynamic effects such as SVG images. Its widgets also allow users to easily Use menus and tab pages) tree Structure, calendar, text editor, and other effects. Of course, non-synchronous Ajax functions are also supported.

In addition, because Ajax uses dynamic operations on file objects, users cannot use previous pages or next pages, or use functions like "My favorites, correct bookmarks are left on the pages required by the user, but these requirements have been addressed by Dojo. Compared with other lightweight Ajax frameworks, it is obvious that it takes a lot of effort to get familiar with Dojo. Currently, it is also a problem to have fewer files. However, because of its more complete functions, developers need to process less on their own.

3. Java syntax can be called by JavaScript

DWR is an Ajax framework designed for Java, allowing developers to call Java syntax using JavaScript programs. The operation of DWR can be divided into two parts: on the one hand, it is used in the browser to process the Java program connected to the server side, and on the other, it is used to display the return data. By calling Java via DWR, it will process the connection processing details. when the data is processed, DWR will execute the callback function for subsequent processing.

When installing DWR, you must edit the deployment description file of the Web application and the specific DWR file. The DWR configuration file specifies the categories that can be created remotely and called. The file contains the JAR file containing the server code, and the JavaScript file, which provides some auxiliary functions to process the interaction.

The biggest benefit of DWR is that Java developers can use familiar syntax to process pages and materials and use them with Struts and Tapestry. However, there are still some security concerns in calling the Remote Server Java program from the user end, so you must pay attention to it during use.

4. Aiming at ease of use and simplified syntax

JQuery is a recently popular Ajax framework. It is Prototype-oriented and simplifies and improves the functions of JavaScript syntax. JQuery is a bit like pushing Prototype to the extreme, allowing users to change the original JavaScript writing method. The most commendable part is its powerful page element access function. You can use the "$)" function to quickly access file nodes, CSS selector, or Xpath expressions, and give it more features. BKJIA-related articles recommended: Use jQuery to simplify Ajax Development)

In addition, its chainable method can combine a string of processing functions to make the code more concise. In addition, jQuery also provides some dynamic effects, but compared with other frameworks, this score is much more exciting.

The advantages and disadvantages of jQuery are actually on the same thing. On the one hand, it simplifies the JavaScript syntax and makes programming easier. It is indeed quite successful for the purpose of being easy to use. However, this makes JavaScript code develop into another way. For Beginners, it takes some time to adapt to it at the beginning.


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.