[Blue ideal] RIA and AJAX Analysis

Source: Internet
Author: User
Tags high cpu usage ruby on rails

Analysis of RIA and AJAX in the @ RIA email system and @ AJAX email system in the experience age

This article mainly compares the user experience of the RIA mail application and AJAX mail application, and upgrades the experience to rationality by means of comparative analysis. At the same time, this article can also be used for reference by all designers and developers engaged in WEB work, as well as common knowledge of RIA and AJAX. The article references some articles and resources on the Internet. I hope the author will be considerate. Main reference resources are: http://www.richbox.com, http://xpgao.blogchina.com/3991873.html
Http://gocom.primeton.com/modules/techresource/article_page.php? Linkid = 319
Http://www.ljxt.com/blog/post/113.html
Thanks to these resource providers

---------------------------------------------------------
Goowy email of RIA Application
Http://www1.goowy.com

Google Mail for AJAX applications
Http://mail.google.com
---------------------------------------------------------

Common Characteristics of AJAX and RIA:
They are all web applications.
All have a user-friendly design concept

AJAX is different from RIA:
AJAX is simple, elegant, user-friendly, and fast to access. Disadvantages: the code is messy, the compilation is complicated, and does not comply with the standards. It is unfriendly to search engines. Low program efficiency.
RIA is more scalable, more user-friendly, and more visual and interactive, but its disadvantage is slow access speed, large file downloads, and high CPU usage for RIA applications, which is less efficient, many problems still need to be solved.

---------------------------------------------------------
RIA
---------------------------------------------------------

Introduction to rich Internet Application System (RIA): RIA basics: getting started with RIA

Please pay attention to the technologies that go beyond the HTML standards that are losing vitality

In the past two years, people have been interested in building a "rich client": This is a user interface, it is more robust, responsive, and visually interesting than HTML interfaces. Rich Internet Application (RIA) technology allows us to deploy Rich client programs on the Internet in a simple way like using Web. Whether or not RIA can completely replace the HTML Application System as people have guessed in the future, for those institutions that use the fat client technology to run complex application systems, RIA does provide a cheap option.

In this column, I will list some of the current RIA products and technologies and provide some inspiration for how to start using these products and technologies. At the DevTrends site and the upcoming Oracle Magazine, I will discuss in detail specific technologies and strategies for deploying RIA using the Oracle platform.

Why RIA?

The reason why HTML-based applications become popular is that the deployment cost of application systems is low, the structure is simple, and HTML is easy to learn and use. Many users and developers are willing to give up the user interface improvement brought about by the desktop computer to achieve quick access to new data and application systems. Compared with the loss of some important UI functions, the Web-based approach brings more benefits.

However, some application systems are not fully suited to HTML technology. Complex application systems may require multiple web pages to complete a transaction. In some fields, such as medicine and finance, this often leads to low interaction speeds. Let me consider a project management system: we can implement it as an HTML application system, but if you can see and operate charts, schedules, and various hierarchies, it will obviously work better.

In addition, although HTML is simple, even simple interaction activities still require a lot of scripts. Even after careful arrangement and comprehensive script design, an input form can only send simple "name/value" pairs from a browser. If an HTML form can send and receive more complex data structures in XML format, it will be much better.

RIA uses a relatively robust client description engine, which provides content-intensive, fast response speed, and rich graphic user interfaces. In addition to an interface with various controls (slide, date selector, window, tab, fine-tuning controller, and ruler), RIA generally allows the use of SVG (Scalable Vector Graphics, scalable Vector graphs) or other technologies to build images at any time. Some RIA technologies can even provide full-activity animations to respond to data changes.

Another advantage of RIA is that the data can be cached on the client, which enables a user interface that is faster than HTML-based response and has less data to and from the server. For wireless devices and devices that need to be connected occasionally, the trend in the future is certainly to the direction of rich clients, and will gradually stay away from text-based Web clients. Application Systems running on laptops can be designed to work offline, or at least work offline when the connection is lost.

Figure 1 shows a typical RIA architecture. XML is usually used as the format for data transmission and is sometimes used to describe the layout of a form. In many instances, the client can maintain a connection with the data source, so that the server can update the client data in real time. You can call a Web service to access an Oracle data.


Figure 1

Technology for rich clients

Below are some available RIA technologies:

Java: some very complex client applications (Oracle's JDeveloper, Eclipse) are written in Java, this shows that Java can be used to build almost any imaginary rich client application. So far, Java has been around for a few years and supports creating a form-based user interface. In addition to the user interface components in the Java basic class (JFC/Swing), developers can also use the SWT toolbox from the Eclipse Project and many third-party toolboxes for development. For graphics, you can use Java 2D API-a very complete and complex graphic API. Java also supports unmatched XML and Web services. You can use a Web browser to use Java Plug-in software, or use a newer Java Web Start Technology in the Java Runtime Environment to deploy applications. The main drawback of using Java to build rich client programs is its complexity (even for simple forms and graphics that require very cumbersome code ). It has the advantages of Java's full support for Web standards and Profound Connotation of the language and class library.

XUL: XUL (Nian Zuo "zool") is an XML-based user interface language from Mozilla's open source code project. It can be used to create a form application. These applications can run not only on the Mozilla browser, but also on other description engines, such as Zulu (a Flash MX component) and Thinleys (a Java implementation ). The XUL description engine is very small (less than KB). It can use XML data or generate XML data. Like Java, XUL also has a very large user group with a large number of open source tools, such as Theodore ThinletEditor (see "Next ") -- a Java application that allows you to layout user interfaces in a graphical manner and generate corresponding XUL. A major drawback of XUL is that it has not yet been supported by a major commercial entity. The biggest advantage of XUL is its integration with the Gecko engine (opening the door to a large number of Web standards ), compared with most other XML user interface description languages, it is a very expressive and concise language.

Macromedia Flash and Flex: Flash is a mature commercial product that can introduce interactive graphic interfaces to Web pages. After the upgrade, the new version includes the function of creating a form-style application. Although Flash is still controversial as the most widely deployed front-end technology on the Web (depending on the selected Flash Player version), it is said that more than 98% of desktop systems support Falsh. The Flash tool used to create animated images is powerful and visualized (in contrast to other technical requirements for low-level graphic coding), so graphic designers are very handy. The script language used by Flah is a variant of ActionScript -- ECMAScript 1.5, which is also called JavaScript. The Flex product adds an XML Description Language for Flash so that the user interface can be compiled and described at any time using Flash Player. Flex enables traditional development institutions to better understand and use Flash. The biggest disadvantage of Flex and Flash is that they have limited support for standards such as XML and Web services, and the environment as an application development tool is not yet mature. The advantage of Flex and Flash is that it can be easily used to create complex animated displays and third-party attachments.

Oracle Forms: Oracle Forms is a mature commercial product used to build a database-centric Internet application system. With Oracle Forms, you can use a visual designer of the output form module File to create a form. To facilitate further processing outside the design tool, module files are either in private FMT Format or XML format. These module files drive a Java Runtime Environment that describes the form. In addition to the standard widgets of all forms, you can also integrate additional pluggable Java components and custom an to implement more functionality. Oracle Forms uses the PL/SQL scripting language, and Oracle databases use the same scripting language. An interesting feature of Oracle Forms is that it is used to create, edit, and compile Java APIs for form module files. developers can create scripts to generate many Forms applications, or make global changes. The main disadvantage of Oracle Forms is that Web deployment requires the use permission of the Oracle Application Server. It has the advantage that it can be closely integrated with Oracle databases and other parts of the Oracle platform (such as Single Sign-On and Enterprise Manager, extensive international support and extremely efficient creation of data-centric applications.

Start to select and use RIA Technology

Here we only discuss some representative examples of technologies that can be used to create RIA, and there are many other technologies. When selecting an RIA technology, you need to weigh the following factors:

  • Comparison between open source products and commercial products;
  • Mature features are compared with the latest features;
  • The range of lightweight features is compared with the richness of the UI;
  • Comparison between media-centric applications and data-centric applications;

---------------------------------------------------------
AJAX
---------------------------------------------------------

As a J2EE developer, we often seem to be concerned with backend mechanisms )". We often forget that the main success of J2EE lies in Web applications. Many reasons make people prefer to use Web to develop applications, however, it is mainly because of its ease of deployment that allows websites to own millions of users at the lowest possible cost. Unfortunately, over the past few years, we have invested too much time at the backend, but we have not invested enough in making our Web user interfaces more responsive and natural to users.

This article introduces a method called Ajax that can be used to build more dynamic and responsive Web applications. The key of this method is the combination of JavaScript, DHTML, and asynchronous communication with the server. This article also demonstrates how easy it is to enable this method: using an Ajax framework (DWR) to construct an application that communicates directly with the backend service from the browser. If used properly, this powerful force can make the application more natural and responsive, thus improving the user's browsing experience.

The sample code used in this application has been packaged as a separate WAR file for download.

Introduction

The term Ajax is used to describe a group of technologies that allow browsers to provide users with a more natural browsing experience. Before Ajax, the Web site forces the user to enter the submit/Wait/re-display example, and the user's actions are always synchronized with the "thinking time" of the server. Ajax provides the ability to communicate asynchronously with the server, freeing users from the loop of requests/responses. With Ajax, you can use JavaScript and DHTML to immediately update the UI when you click a button, and send an asynchronous request to the server for updating or querying the database. When a request is returned, you can use JavaScript and CSS to update the UI, instead of refreshing the entire page. Most importantly, users do not even know that the browser is communicating with the server: The Web site seems to be responding instantly.

Although the infrastructure required by Ajax has been around for a while, the real power of asynchronous requests has not been exploited until recently. It is really exciting to have a very responsive Web site, it eventually allows developers and designers to use standard HTML, CSS, and JavaScript stacks to create "desktop-like" availability.

Usually, in J2EE, developers focus too much on service and persistence layer development, so that the availability of user interfaces has lagged behind. In a typical J2EE development cycle, we often hear this: "We have no time to invest in the UI" or "HTML cannot be used for implementation ". However, the following Web sites prove that these reasons are no longer justified:

BackPack
Google Suggest
Google Maps
PalmSphere

All these Web sites tell us that Web applications do not have to rely entirely on re-loading pages from servers to present changes to users. Everything seems to happen in an instant. In short, when the response sensitivity of the user interface is involved, the benchmark is set higher.

Define Ajax

Jesse James Garnett of Adaptive Path defines Ajax as follows:

Ajax is not a technology. In fact, it is a combination of several booming technologies in a new and powerful way. Ajax includes:

Representation Based on XHTML and CSS standards;
Use Document Object Model for Dynamic Display and interaction;
Use XMLHttpRequest for asynchronous communication with the server;
Use JavaScript to bind everything.

This is very good, but why is it named after Ajax? In fact, the term Ajax was created by Jesse James Garnett, who said it was "Asynchronous JavaScript + XML shorthand ".

How Ajax works

The core of Ajax is the JavaScript Object XmlHttpRequest. This object was first introduced in Internet Explorer 5. It is a technology that supports asynchronous requests. In short, XmlHttpRequest allows you to use JavaScript to request and process responses to the server without blocking users.

When creating a Web site, executing screen updates on the client gives you great flexibility. The following functions can be completed using Ajax:

Dynamically Update the total number of items in the shopping cart. You do not need to click Update and wait for the server to resend the entire page.

This improves site performance by reducing the amount of data downloaded from the server. For example, on the Amazon shopping cart page, when updating the number of items in the basket, the entire page is reloaded, which must download 32 K data. If Ajax is used to calculate the new total, the server returns only the new total value, so the required bandwidth is only 1% of the original total.
This eliminates the page refresh for each user input. For example, in Ajax, if you click Next on the page list, the server data will only refresh the list rather than the whole page.
Directly edit table data, rather than requiring users to navigate to a new page to edit data. For Ajax, When you click Edit, You can refresh the static table as an editable table. After you Click Done, you can send an Ajax request to update the server and refresh the table so that it contains static and read-only data.
Everything is possible! Hopefully it will inspire you to start developing your own Ajax-based site. However, before getting started, let's introduce an existing Web site that follows the traditional example of submitting, waiting, and re-displaying. We will also discuss how Ajax improves user experience.

---------------------------------------------------------
RIA and AJAX
---------------------------------------------------------

Richard Monson-Haefel, a senior analyst at Burton Group in Midvale, utehe, believes that when talking about the widely publicized Rich Internet Application (RIA) technology, even less is better. This technology can greatly promote the user's Web experience, because there is no need to refresh the page from the server, the Ajax style is a single page interface. However, he said in his recent short video about Ajax that over-use will make navigation difficult.

He said that the main advantage of Ajax over other RIA technologies is seamless HTML integration, so it can be used in large quantities without changing the existing Web content. "Think of it as a Web site seasoning. The risk of doing so is very small. Ajax is irrelevant to the background and does not require any plug-ins. Ajax is a powerful tool used in combination with other RIA technologies, such as Macromedia Flash ."

However, this technology is not yet mature, and tools and frameworks are not yet supported. Monson-Haefel said: "Ajax is not suitable for you if you do not like toolsets and class libraries ."

Burton Group defines that "rich" Internet applications can provide functions based on standard HTML frameworks and links. Google Maps is such an excellent Ajax example.

Unlike Ajax, JavaScript has existed for a long time. It is based on JavaScript/ECMAScript, Cascading Style Sheets, document object models, and xml http requests. Initially, it was difficult to design Ajax-style applications across different browsers. But now, mainstream browsers have evolved to support the implementation of Microsoft technology and become the most common feature.

Today, the dominant RIA technology is Macromedia's Flash/Flex. Other RIA technologies include the user interface Markup Language developed for the Microsoft Windows Presentation Foundation, known as the Extensible Application Markup Language (XAML ). There are also Mozilla's XML-based user interface language XUL, droplets, Java applets, and Windows Presentation Foundation/Everywhere (WPF/E) to be launched by Microsoft ).

Monson-Haefe said: "Flash is a good technology that is suitable for enriching animations and graphics, But Flash is like a big fish in a small pond. The real market is not so big now, so it is still a question as the market grows, whether it can occupy the market. Microsoft will launch WPF/E as a strong competitor ."

Microsoft also plans to launch an Ajax framework extension called Atlas. Monson-Haefel thinks it is very promising. He said that other integrated development environments of Ajax have not yet become mainstream. This includes Javascript Synthsis Technology (JST) of Morfik Technology, IntelliJ IDEA 5.0 of JetBrains, Tibco General Interface (GI) of Tibco Software), JackBe company Visual GUI Builder, Backbase B. v. the company's Backbase and open-source Ruby on Rails framework.

He said: "It has built-in Ajax functions that enable you to write Ajax applications in Ruby programming language ."

Monson-Haefel said: "The Tibco tool for compiling Ajax applications is very good. JackBe is also a good RIA technology, and Backbase may be a better one now. The advantage of IDE is the WYSIWYG development method, but you have purchased their GUI, and you are also constrained by the perception ."

In addition to IDE and framework extensions, Monson-Haefel also mentioned that there are many available Ajax UI tools and remote tools, including private and open-source products. He said, there is only one part. According to a recent survey by Burton Group, among the 488 Ajax developers, the most popular tool set, class library, and framework extension are JavaScript frameworks with MIT-style certificates-Prototype, javaScript class library -- Script. aclo. us, Direct Web Remoting with Apache 2.0 certificate, Dojo UI tool set with Academic Free License v 2.1, and Ruby on Rails.

As for data, the focus on Ajax is mainly on B2C Web sites, but Monson-Haefel points out that Ajax is actually closely related to Web Services and SOA, which can affect enterprise portals.

"Some people believe that Ajax will become a major recovery factor for portal solutions. The portal has been publicized for a long time, but it is not actually called a silver bullet. The combination of Ajax presentation layer and portal will promote the experience of all users ."

Monson-Haefel warned that Ajax is easily abused. "If developers do not understand the use of theory, they will randomly apply it and people will deliberately avoid JavaScript. My reasoning comes from the browser pop-up window. This technology comes from an available feature, but because it is abused, it has become a lower-level citizen of Web technology, and people no longer use it ."

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.