Ajax, an xml-based asynchronous JavaScript, referred to as Ajax, is a crown in the current web innovation (called Web2.0). Thanks to the various technologies that make up Ajax, Web application interactions such as Flickr,backpack and Google have made a qualitative leap in this area. The term derives from a description of the conversion from web-based Web applications to data-based applications. In a data-based application, the user needs data such as a contact list that can be obtained from a server that is independent of the actual Web page and can be dynamically written to the Web page, rendering the slow Web application experience as a desktop application.
Although most developers have used XMLHTTP in the past or used an IFRAME to load data, only now do we see traditional developers and companies starting to adopt these technologies. Like new programming languages or models with more pain, developers need to learn new tricks and how best to make use of these new technologies.
Ajax mode
Many important technologies and Ajax development patterns can be obtained from existing knowledge. For example, in an application that sends a request to a server, it must include the order of request, priority, timeout response, error handling, and callbacks, many of which have already been included in the Web service, like today's SOA. Ajax developers have a complete knowledge of the system architecture. At the same time, as the technology matures there will be many areas to improve, especially the usability of the UI component.
Ajax development differs greatly from the traditional CS development. These differences introduce new programming problems, and the biggest problem is ease of use. Because Ajax relies on browser JavaScript and XML, browser compatibility and support standards become as important as JavaScript run-time performance. Most of these problems come from a combination of browsers, servers, and technologies, so it is important to understand how best to use these technologies.
With the combination of varying technologies and a strong coupled client-server environment, AJAX presents a new development approach. Ajax developers must understand the traditional MVC architecture, which limits the boundaries between application hierarchies. At the same time, developers need to consider the outside of the CS environment and use AJAX technology to reset the MVC boundaries. Most importantly, AJAX developers must prevent the Web application from being considered as a single page in the form of a collection of pages. Once the scope between the UI design and the service architecture is strictly differentiated, the developer needs to update and change the technology collection.
Always thinking about the user
The biggest opportunity for Ajax is the user experience. The rules for defining Web applications are being rewritten in the process of making applications more responsive and innovative, so developers must focus more on users. Now the user has become accustomed to using web apps. For example, users usually want to have a few seconds of delay and screen refresh for each button click, but Ajax is breaking this long time. So the user needs to relive the button click Response.
Usability is an exciting place for Ajax and has produced several novel technologies. One of the most striking is a technology called "Yellow Stealth", which turns the user interface into yellow before the data is updated, and restores the original color immediately after the update is complete. Ajax developers freed users from the load of Web applications, carefully leveraging the rich interfaces provided by Ajax, and soon desktop developers found Ajax to be their direction.
Several tools and techniques
As Ajax quickly stands out, I think the developer's expectation of this technology is increasing rapidly. Like any new technology, the boom in Ajax needs to be supported by a whole development tool/programming language and related technology systems.
Javascript
The most important and most overlooked of the Ajax concepts shown in the name is that he is also a JavaScript programming language. JavaScript is an adhesive that integrates the parts of an AJAX application. Most of the time, JavaScript is often considered by the server-side developer as an enterprise-class application that should be avoided as much as possible. This view comes from the previous experience of writing JavaScript code: a complex and error-prone language.
Similarly, he is also thought to spread the application logic arbitrarily across both the server and the client, making the problem difficult to discover and code difficult to reuse. In Ajax, JavaScript is used primarily to pass data from the user interface to the server and return results. The XMLHttpRequest object is used to respond to data passed over HTTP, and once the data is returned to the client, it is immediately possible to use the DOM to place the data on the network surface.
XMLHttpRequest
The XMLHttpRequest object is implemented on most browsers and has a simple interface that allows data to be delivered from the client to the server, but does not interrupt the user's current operation. Data transmitted using XMLHttpRequest can be in any format, although it is suggested from the first name as XML-formatted data.
Developers should already be familiar with many other XML-related technologies. XPath can access data in an XML document, but it is necessary to understand the XML DOM. Similarly, XSLT is the simplest and fastest way to generate HTML or XML from XML data. Many developers are already familiar with XPath and XSLT, so it makes sense for Ajax to choose XML as a data interchange format. XSLT can be used on both the client and server side, and he can reduce the number of application logic written in JavaScript.
Css
CSS is an important weapon that Ajax developers need to navigate to the right AJAX application. CSS provides a mechanism for separating application styles and designs from content. Although CSS plays a crucial role in AJAX applications, it is also a major impediment to building a Cross-browser application because different browser vendors support a variety of CSS levels.
Server-side
But unlike on the client side, AJAX applications at the server end are used or built in like Java. NET and PHP language based mechanisms; there is no change in the main way in this field.
That being the case, our interest in the Ruby on Rails framework has increased rapidly. More than a year ago, Ruby on Rails had attracted a large number of developers to build web and Ajax applications based on their powerful capabilities. While there are many quick application development tools available, Ruby on rails seems to have the ability to simplify building AJAX applications.
Development tools
In the actual building of AJAX applications, you need more than just a text editor. Since JavaScript is not compiled, he can easily write and run in the browser, however, many tools offer useful extensions such as syntax highlighting and intelligent completion.
Different ides provide different levels of support for JavaScript. IntelliJ idea from JetBrains is a better IDE for JavaScript development, although many developers also like Microsoft's Visual Studio products (promising to improve AJAX support in the latest release). Eclipse contains two free JavaScript editor plug-ins and a commercially available Komodo IDE from Activestat.
Another problem with JavaScript and Ajax development is the difficulty of debugging. Different browsers provide different Run-time error messages that are usually hidden, and JavaScript bugs such as double variable assignment (usually due to lack of data types) make debugging more difficult.
In the development of Ajax, debugging is more complicated, because it needs to identify whether the client or server-side error. In the past, the way JavaScript was debugged was to delete all the code and then increase the line until the error occurred. Now, more developers are back to Microsoft Script Debugger for IE and the Venkman for Mozilla browsers.
Browser compatibility
The biggest problem with JavaScript programming comes from the support of different browsers for various technologies and standards. Building a run in different browsers (IE and Firefox) is a difficult task. So several Ajax JavaScript frameworks either generate JavaScript based on server-side logic or tag libraries, or provide a client JavaScript library that conforms to cross-browser Ajax development. Some popular frameworks include: Ajax.NET, Backbase, Bitkraft, Django, DOJO, DWR, MochiKit, Prototype, Rico, Sajax, Sarissa, and Script.aculo.us.
These frameworks give developers more room than they need to worry about cross-browser issues. While these frameworks enhance the developer's ability to build applications, there are a number of other factors to consider in the Ajax component market as vendors have developed a more detailed user interface packaged component solution. For example, several vendors that provide common user interface components such as combo boxes and data grids can be used to create a good experience in the application to view and edit data in a spreadsheet-like format. These components, however, not only encapsulate the user interface of the component, but also communicate with the server-side data, which typically uses a tagging approach to implement such as ASP.net or JSF controls.
Prospect
The recent browser rivalry between IE and Firefox has become hot, so Ajax developers need to be quick enough to respond. Key points are in some issues such as CSS or XML, although various browsers form different camps with the latest standards (such as Mozilla embracing SVG and e4x standards and using XUL in the latest Firefox beta version, while Microsoft uses its own XAML technology).
All of these technologies represent a change in the market direction of current Ajax mainstream JavaScript and XML. In general, Ajax developers must follow up on the latest technology and take advantage of the high productivity toolset as quickly as possible. Successful AJAX developers also need to keep an eye on their users to avoid magnifying any problems. and Ajax developers need to innovate continuously to create new ways to enhance usability of Web applications.
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.