The latest tools and technologies for AJAX developers

Source: Internet
Author: User
Tags format object error handling include net object model ruby on rails visual studio
Ajax

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. This article describes how developers use Ajax to ping  's tomb Takezo yo lt;br/>
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.


Author
Dave Johnson is the founder and preacher of ebusiness applications, a software consultancy company in Vancouver, Canada, with over seven years of experience in XML related work.


Resources
Ajax Developer's compilation mode: http://www.ajaxpatterns.org
XMLHttpRequest Tutorial: "Dynamic Web Interface": http://www.xml.com/pub/a/2005/02/09/xml-http-request.html
JavaScript Performance Benchmark: http://blogs.ebusiness-apps.com/dave/?p=14
Ajax Resources: http://www.ajaxmatters.com
JavaScript Specification: http://www.ecma-international.org/publications/standards/Ecma-262.htm
• Introduction to JavaScript Object identification: http://www.crockford.com/JSON/index.html
Mozilla Venkman JavaScript debugger: http://www.mozilla.org/projects/venkman/
XML DOM Reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/
Xmlsdk/html/e9da2722-7879-4e48-869c-7f16714e2824.asp
Microsoft Dynamic HTML reference:http://msdn.microsoft.com/library/default.asp?url=/
Workshop/author/dhtml/reference/dhtml_reference_entry.asp
Gecko DOM reference:http://www.mozilla.org/docs/dom/domref/
• "Transplant IE application to Mozilla"
http://www-128.ibm.com/developerworks/web/library/wa-ie2mozgd/
Mozilla XUL Reference:
http://www.xulplanet.com/
Microsoft XAML Reference:
http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/
En-us/wcp_conceptual/html/0ff5f36e-dd84-44d1-aa3e-5bb4f147b169.asp?frame=true
James Jesses Garret introduced the term AJAX in he article "Ajax:a New approach to WEB applications," (Adaptive Path, February (in): "AJAX: New Web application Development approach"
http://www.adaptivepath.com/publications/essays/archives/000385.php
jetbrains IntelliJ Idea:
http://www.jetbrains.com/
Microsoft Visual Studio:
http://msdn.microsoft.com/vstudio/
Jseditor:
http://jseditor.sourceforge.net/
Jseclipse:
http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/
ActiveState Komodo:
http://www.activestate.com/Products/Komodo/
XHTML:
http://www.w3.org/TR/xhtml1/
Document Object Model:
http://www.w3.org/DOM/
cascading Style Sheets:
http://www.w3.org/Style/CSS/
Extensible Stylesheet Language:
http://www.w3.org/Style/XSL/
XForms:
http://www.w3.org/MarkUp/Forms/
Scaling Vector Graphics:
http://www.w3.org/Graphics/SVG/
XPath:
Http://www.w3.org/TR/xpath
ajax.net:
Http://ajax.schwarz-interactive.de/csharpsample/default.aspx
Backbase:
Http://www.backbase.com
Bitkraft:
http://www.tiggrbitz.com/
Django:
http://www.djangoproject.com/
Dojo:
http://www.dojotoolkit.org/
dwr (Direct Web Reporting):
http://getahead.ltd.uk/dwr/
MochiKit:
http://mochikit.com/
prototype:
http://prototype.conio.net/
Rico:
Http://openrico.org/rico/home.page
Sajax:
http://www.modernmethod.com/sajax/
Sarissa:
http://sarissa.sourceforge.net/doc/
script.aculo.us:
http://script.aculo.us/
Ruby on Rails:
http://www.rubyonrails.org/
for more on Ajax and DWR, read "Ajax Made simple with DWR, cloves Carneiro Jr. (Javaworld, June 2005): For Ajax and DWR, please read" a Jax Use DWR simpler "
Http://www.javaworld.com/javaworld/jw-06-2005/jw-0620-dwr.html
for more articles in Java Development tools, browse the Development tools section of Javaworld ' s topical Index: more Java development Tool articles, browse Javaworld's Development Tools Section index page
Http://www.javaworld.com/channel_content/jw-tools-index.shtml
for more articles in XML, browse the Java and XML section of Javaworld ' s topical Index: For more XML articles, browse javaworld Java and XML sections Index page
Http://www.javaworld.com/channel_content/jw-xml-index.shtml
for more articles in UI design, browse the User Interface designing section of Javaworld ' s topical Index: For more UI-designed articles, see Java World's UI Design Section index page
Http://www.javaworld.com/channel_content/jw-ui-index.shtml



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.