Saturday, December 18, 2010

AJAX



AJAX namely "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), AJAX not abbreviations, but by Jesse James Gaiiett created a noun, it is to point to create interactive web application web development technology.

AJAX is introduced

The Web application interaction as call it Flickr, Backpack and Google in this respect has a qualitative leap. This term originated from the web-based describing Web application to the application based on data of conversion. Based on the data of the application, the needs of the user data such as contact list, can be independent of actual from Web server obtained and can be dynamically writing your pages, to slow the Web application experience shading make like desktop application is same. Although most developers in the past used XMLHttp or use Iframe to loading data, but only until now we don't see the traditional development personnel and company started using these techniques. Like new programming language or model with more pain, developers need to learn new skills and how to best use these new technologies.

Brief history

This technology in 1998 has been applied before and after. Allows the client scripts sent an HTTP request (XMLHTTP) the first component by A written ccess Outlook Web team. This component originally owned by Microsoft Exchange Server, and quickly became part of Internet Explorer 4.0. Partial observers, Outlook Web Access is first applied the Ajax technique of successful business applications, and become including Oddpost Web mail products, many products leader. But, at the beginning of 2005, many event makes Ajax were mass acceptance. Google in its famous interactive applications use asynchronous communication, such as Google discussion groups, Google maps, Google search Suggestions, Gmail, etc. Ajax this word by the Ajax: A New Approach of Web is A marketing method, this paper brings to the rapid spread improved people using the technology of consciousness. In addition, Mozilla/Gecko support allows the technology maturity, become more user-friendly.

AJAX prospect very optimistic, it can improve system performance, optimize the user interface. AJAX existing framework is introduced to AjaxPro, directly AjaxPro. 2. DLLS, can directly in front desk page JS calls backstage page method. But this framework and FORM validation clashed. Another Microsoft also introduced AJAX components, need to add AjaxControlToolkit. DLLS, can be in control list arise related controls.

AJAX mode

Many important technology and AJAX development mode can be gained from existing knowledge. For example, in a send request to the server applications, must contain request sequence, priority, overtime response, error handling and callback, many of which element already included in a Web service, be like now of SOA. AJAX developers have a complete system architecture knowledge. At the same time, along with the technical mature will still have many places that need improvement, especially UI part of accessibility.

AJAX development and traditional CS development has the very big difference. These different introduced a new programming problem, the biggest problem lies in usability. Due to the AJAX rely on the browser's JavaScript and XML, browser compatibility and support standard also becomes and JavaScript runtime performance as important. Most of these questions from the browser and server and technical combination, and therefore must understand how to best use of these techniques.

Comprehensive all sorts of change of technology and strong coupling customer server environment, AJAX forward a new kind of development mode. AJAX developers must understand the traditional MVC framework, limiting application levels of the boundaries between. Meanwhile, the developers have to consider the external environment and use CS AJAX technique to heavy finalize the design MVC boundary. Most importantly, AJAX developer must be prohibited from page collection way to consider the Web application and needs to be considered a single page. Once the UI design and service structure between the scope is strictly distinguish, developers will need to update and changing technology collection.

A better user experience

AJAX the biggest opportunity lies in the user experience. In makes application faster response and innovation process, define the Web application rules are being rewrite; So developers must pay more attention to the user. Now users have been getting used to how to use the Web application. For example the user usually wants every click on the button will cause a few seconds delay and screen refresh, but AJAX are breaking this long condition. Therefore, the user needs to experience again the response of the button is clicked.

Availability is AJAX exciting place and it has had several new technology. One of the most conspicuous is called a "yellow hidden out" technology, it will in data updated before user interface into yellow, update instantly restore after the completion of the original color. AJAX developers will users from the Web application load liberated, Carefully using AJAX provide rich interface, soon desktop developers will find AJAX is their direction.

Several tools and techniques

With AJAX quickly spectacular rise, I want to developers to this kind of technology of expect or multiplying rapidly. Like any new technique, AJAX prosperous also need a whole development tools/programming languages and related technical system to support.

Consists mainly of technology

Base web standards (present - based wang) XHTML + CSS said,

Using Document Object Model (DOM) dynamically display and interactive,

Using XML and XSLT exchange data and relevant operation;

Use XMLHttpRequest asynchronously data query, retrieval,

Using JavaScript will all things bind together. English Jesse James initiator [Ajax Garrett original; the original title (Ajax: A New Approach Web is A marketing method).

Similar to DHTML or technologies, AJAX not refer to a single technology, but organically using a series of related technologies. In fact, some based on AJAX "derivative/synthetic" type (derivative/composite) technology is appear, such as "AFLAX".

AJAX application using support above technical web browser as operation platform. These browsers currently include: Mozilla, Firefox, Internet Explorer, Opera, and Konqueror Safari. But Opera don't support the XSL formatting objects, nor will he support XSLT.

JavaScript

As the name as shown, AJAX in the concept of the most important and the most easily overlooked is that it is a kind of JavaScript programming language.

JavaScript is a kind of adhesive to AJAX application each section of the integrated together. At most of the time, JavaScript is usually server-side developer think that it is a enterprise applications need not use thing should try to avoid it. This view from previous write JavaScript code experience: multifarious and and error-prone language. Similarly, it is also believed to application logic arbitrarily distributed on the server and client, this makes the problem is difficult to detect and code is difficult to reuse. In AJAX in JavaScript are mainly used to transfer the user interface data to the server and return results. XMLHttpRequest object response to the data passing through HTTP, once the data returns to the client can immediately use DOM will figures into nets surface.

XMLHttpRequest

XMLHttpRequest object in most browsers have been implemented and had a simple interface allows data transmission from the client to the server, but can not interrupt user current operating. Use XMLHttpRequest data transmitted can be any format, though from the name on the suggestion is XML format data.

Developers should already familiar with many other XML related technologies. XPath can access the data in an XML document, but understand XML DOM is a must. Similarly, XSLT is the most simple and fast from XML data generating HTML or XML way. Many developers have been familiar with Xpath and XSLT, therefore AJAX choose XML as data exchange format is meaningful. XSLT can be used on the client and the server, it can reduce a lot of using JavaScript written application logic.

CSS

In order to correctly browsing AJAX application, CSS is a kind of AJAX developers need an important weapon. CSS offers from the content of separation style and design of application mechanism. Although CSS in AJAX application crucial role, but it is also construct cross-browser application of one large block, because of different browser vendors supports a variety of CSS level.

The server

But unlike on the client side, on the server AJAX application or use based on such as Java, the.net and PHP language based on mechanism, Does not change the main way in this field.

If so, we Rails framework of Ruby o n the interest also has increased rapidly. In more than a year ago, Ruby o n Rails has attracted a lot of developers to build strong function based on the Web and AJAX application. Although at present, there are also many rapid application development tools exist, Ruby o n Rails seems to have been a simplified constructing AJAX application reserves of ability.

Edit this paragraph debugging and browser compatibility problem

Debugging problem

In practical applications, constructing AJAX you need not only the text editor. Since JavaScript are compiled, it can easily be to write and operation in the browser. However, many tools provide a useful expand as syntax highlighting and intelligent complete.

Different IDE provides support for the different level. JavaScript From the JetBrains IntelliJ IDEA is a used to develop better JavaScript IDE, although many developers also like Microsoft 's Visual Studio products (promised in the latest version to improve AJAX supported). Eclipse contains two free JavaScript editor plug-ins and a business from the ActiveStat Komodo IDE. Another JavaScript and AJAX development in question is debugging difficulties. Different browsers provide different is usually hidden runtime error messages, while JavaScript defects, such as double assign values to variables (usually due to the lack of data type) and makes debugging more difficult. In AJAX development, debugging are more complicated, because its need to mark exactly client or server errors generated. In the past, JavaScript debugging method is to delete all the code and line of increase until errors occur. Now, more developers back to prepare for Microsoft IE Debugger and Mozilla browser Script for preparation Venkman.

Browser compatibility

The biggest problem JavaScript programming from different browser of various technologies and standards support. Construct a run on different browser (e.g., IE and firefox) is a difficult task. Therefore some AJAX JavaScript framework or generate based on server logic or a tag library's JavaScript, or provide conforms to the cross-browser AJAX development client JavaScript library. Some of the more popular framework includes:, Backbase, Bitkraft Django DWR DOJO,,,,,, MochiKit Prototype Rico, Sajax, Sarissa worth Script.

These framework to developers more space makes they need not worry cross-browser problem. Although these frame promoted developers build applied ability, but because firms have developed more details user interface packaged components solutions, thereby in AJAX component market need to consider some other factors. Such as providing general user interface components such as combo and data grid of several manufacturers, can be used to create good in applications by similar spreadsheets way to view and edit the data of the experience. But these components are not only encapsulates the components of the user interface and included with the server data communication manner, these components often use based on the way to realize such as or mark JSF controls.

looking

Recent IE and between firefox browser toferraris becomes hot rise, therefore AJAX developers need enough nimble response. Key points in some problems such as the CSS or XML, although all sorts of browser forms using the latest standard of different factions (such as Mozilla hug SVG and E4X standards and in the latest BETA version firefox use XUL and Microsoft using their own XAML technology). All these techniques represent the current AJAX mainstream JavaScript and XML market change.

Overall, AJAX developers must quickly follow the latest technology and using high yield tool set. Successful AJAX developers need attention they users to avoid any problems evolved over time. And AJAX developers need continuously innovation to create enhance the Web application ease-of-use new method.

No comments:

Post a Comment