How to build a RIA?
The majority of the innovations in the field of development converge to only one direction: improvement of rich Web applications to facilitate their programming and their use, to increase performances and possibilities. As if RIA wanted to supplant the traditional desktop software. However, if new tools facilitate the programming, the new techniques also make it more complex and choices must be made before beginning the design of an RIA.
Let us define a RIA as a Web application, a program hosted on a server and
executed on the browser, and which has all the functionalities of a local
application such as a word processing software. RIA is cleared from the slowness
of Internet applications and it has access to the files on the local computer,
contrary to Web scripts.
However, to take safety in account (one could be connected to a malicious software) RIA ran inside a clean environment which is called sandbox.
To be able to get these advantages on Web applications, a runtime must be downloaded on the client computer.
Thanks to new technologies which we will detail and with new possibilities of which they are equipped, RIA have as well advantages on local applications as they can only replace them in the short run, tendency which is noted on all the plans: new development tools, investments and repurchases of companies, offers employment (administration of servers, webmasters).
Advantages for the editor
The editor has a means of promotion for his application that is free and
considerable: search engines. It obtains from to the start a large audience
without expenses and distributing anything.
It is delivered of all the tasks of distribution, it is enough for him to put the last version of the application on line.
Possibly it can supplement its incomes by adding publicities in the interface, which will be put in day in real time.
Advantages for the user
No installation is necessary, except the framework, which will be common
to all applications. The application does not depend on the operating system
and functions under Linux as under Windows or Mac. The user always has the
last version. He uses the software on any station (except if its data are
saved locally). It does not fear viruses or material breakdowns.
The asynchronous mode consists to launch operations and to return the hand
to the user without awaiting the response from the server. RIA frameworks
to allow this operating mode.
With that one can associate a function of prefetching, which consists to anticipate the needs and to launch the requests to obtain the answers without waiting. For example when a map is display, Google Maps downloads the adjacent areas which are displayed then immediately when one moves on the map.
Si named because it is used it to perform tests. It is an environment of
execution equipped with a memory capacity and resources. Programs, mainly
libraries, do not have access to the files around on the computer out of the
allocated space. The Java virtual machine which makes function applets of
Web pages is an example. But that spreads with the other environments such
as XAML, XUL, etc.
On the contrary ActiveX do not function in a sandbox and require complex safety measures.
An RIA should continue to work after one closed the Internet connection,
during a displacement for example. With this intention several techniques
- Databases are transferred on a local SQLite base.
- Resources such as Web pages and images are chosen and stored on the local hard disk.
- The third function consists in transposing on the local station operation on the Web. Thus Ajax must function locally, which is not allowed by the XMLHttpRequest object in normal mode.
These three functions correspond to the three modules of Google Gear.
The application can use Web services, on the site of the application or coming from third sites and which achieve processing to provide specific information.
To this Web environment must be added a framework for the client side: the virtual machine Java, .NET, the flash player, etc.
The war of the environments started with the announce of Silverlight by Microsoft.
In front of it, exist various, different and incompatible origins solutions,
but Silverlight with its XML language of interface its portable and light
plug-in seems to want to crush competition and to replace Flash by a Microsoft
However the world of the Web reacted, Adobe announces an open source and free development environment, the W3C takes into account HTML 5 to replace the current format and Google proposes a plug-in to run RIA without connection.
Thus the programmer is faced to a wide panel of technologies...
The Silverlight framework of Microsoft depends on on the
for the 1.1 version.
Silverlight uses an ActiveX control under IE. Let us give an example of creation of control with Silverlight. The placement of the object is defined with a div or other tag:
Then the object is created with a function of the plug-in:
It is now mainly targeted at Windows Phone 7 but is still usable on the desktop.
This Flash binary format is displayed thanks to an ActiveX control under IE, and plug-ins for other browsers. Its advantage is that it is spread now enough and the developers can use it without fearing for compatibility.
The new HTML 5 standard, is designed for Web applications.
It has a Canvas tag making it possible to draw graphic components, and
also more complete elements of forms.
It has offline features, but we could also use Gears for that until it is supported by all browsers.
The future of Web applications will not be limited to a single environment... It does not depend upon features of technologies offered to make the choice to create an RIA, because they tend to be equivalent, but rather in a culture which would like to be placed in the wake of Microsoft or elsewhere...
- What interface for a modern application?
- Rich Ajax Platform. Eclipse-based development interface with Java on server side.
- Firebug. Firefox Extension to facilitate debugging Ajax applications.
- The Ajax tutorial. Complete tutorial with GET and POST examples.