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.
Description and perspectives
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 has a graphical user interface like a desktop app.
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
He no longer has to deal with the port on Windows, Linux or Mac: the application is independent of the user's system.
It is freed of all the tasks of distribution, he can update the software just by putting the new version on line.
Possibly it can supplement its incomes by adding advertisements in the interface.
Advantages for the user
No installation is necessary, except maybe the framework.
The application always work on his operating system
even if it is Linux or Mac.
He has always the
last version. He uses the software on any station, desktop or mobile (except if its data are
saved locally).
He does not fear viruses or hardware failures.
Techniques of RIA
Asynchronous mode
The asynchronous mode consists to launch operations and to return the hand
to the user without awaiting the response from the server. RIA frameworks
incorporate Ajax
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.
Sandbox
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.
Offline mode
An RIA should continue to work after one closed the Internet connection,
during a displacement for example. With this intention several techniques
are implemented.
- Databases are transferred on a local IndexedBD data 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.
Dynamic pages
RIA is built from components of dynamic Web pages, therefore Ajax who includes JavaScript, DOM, CSS, the XMLHttpRequest object. RIA must be compatible with the standards of the Web to function on all browsers.
Web services
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.
Frameworks
To the Web environment could be added a framework for the client side: the virtual machine Java, .NET, etc. Or HTML 5 may be used.
The 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 the offline mode that is now is supported by all browsers.
The JavaFX framework uses the syntax of JSON to define interfaces and requires the Java runtime.
Conclusion
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...
See also...
- What interface for a modern application? Comparing systems and languages.
- HTML 5 frameworks. JavaScript libraries for apps.
- Rich Ajax Platform. Eclipse-based development interface with Java on server side.