📜 ⬆️ ⬇️

RIA Platform Overview

To develop RIA applications, we need a simple and convenient way to write code that would run in the browser and the ability to make requests to the server. Let's consider different approaches for solving this problem. It will not be a detailed analysis and comparison of all frameworks, toolkits, etc., but simply a general overview.


I publish at the request of sidney3172 , so plus him!


')

Handwritten javascript


This is the first and most widespread way to develop Ajax applications - this is the development of a simple web application, adding Ajax capabilities by adding JavaScript. Usually, already written libraries are used, which allows you to focus only on solving problems that are important to you, by expanding / modifying / adding functionality, such as classes, to make the user interface dynamic.

There are four main problems with this approach:

• JavaScript is fundamentally different from developing Java applications. This is not only another language, with its own concepts and constructions, it also requires its own set of tools for work. And while it’s good for a developer to learn another language, it’s not the best choice from a business point of view. The logical solution is to hire a professional JavaScript programmer, but they are very difficult to find.
• These are browser features - the most time consuming part of developing JavaScript, and takes a very long time.
• If you are not going to reinvent the wheel, you will have to make a choice from a huge number of libraries (frameworks), and most often use several of them, while finishing them (and in order to do this you need to figure it out), as well as trying to get them to work together, which leads to a small code efficiency and, again, to a large amount of time.

This approach is possible when the Ajax-functional is added partially. But if we take into consideration the construction of a completely Ajax-based application (which is essentially what any RIA application is), then this approach is almost impossible.


Flex


Adobe Flex is a rich Internet application development toolkit on the Adobe proprietary platform.
Flash Flash provides much more features than you could get from HTML in terms of interactivity. Nevertheless, the development of RIA on flash is a very complicated and not “intuitive” process for simple programmers. Flash development tools are aimed more at designers, and are developed according to a strange concept for a programmer, not according to the timeline, but according to user actions. Flex removes this barrier by providing a software way of developing RIA applications. Although Flex was developed by Macromedia in 2004 as a commercial product, in 2007 part of the platform became open after buying Macromedia Adobe
When developing an RIA with Flex, you use the tools provided by Adobe, and you can use a large number of built-in functions (such as widgets, drag-and-drop, vector graphics, animation), this speeds up application development, especially if you are familiar with Flash and ActionScript.
The main advantage of using Flex is that you develop applications that run inside the Flash Plug-in runtime. Therefore, you do not have to think about which browser it will be executed on. But on the other hand, the client should have a plugin installed, which is not always realistic (schools, government organizations, etc.).
If you look at an application on Flex, you cannot call it an Ajax application, since it does not use standards such as XHTML or JavaScript. In February 2008, Adobe released Adobe AIR Runtime, which allows applications developed in Flex to be deployed as desktop applications and at the same time enjoy the benefits of Ajax - no installation / upgrade is required, which gives application developers the best of both worlds.
Adobe Flex, especially after the release of Adobe AIR, is a good choice for building an RIA. Especially if you can not do without integration with the desktop (for example, autorun application when the OS starts, and that the most important access to the client's file system). Flex is mostly open source, but requires the installation of a proprietary plug-in.

Official Flex Website http://www.adobe.com/products/flex
Adobe AIR http://www.adobe.com/products/air


Java Applets and JavaFX


Another approach for building RIAs is to use Java applets or their replacement not so long ago - JavaFX. JavaFX, a scripting language for creating interactive content, is more suitable for our task. However, javaFX is built on a Java platform. Javafx deployment is no different from java applet deployments, so you will need a browser plugin, as is the case with Flex.
The main advantage of Java applets is that it is a Java program that runs on the client side. Although there are some obvious security restrictions when working with a browser, you can do everything you want inside Java applets, for example, establish connection with the server and generate threads, access the file system (this is all limited only by a certificate). So if you want to build rich Internet applications, this is the perfect solution.
The main problem (like all java applications) is the necessity of the Java Runtime Environment (JRE) installed on the client. Another problem is that your application requires not only the JRE, but also (possibly) a special version of the JRE itself. And also a fairly large JRE size for offline installation. The table will provide a comparison of the market penetration of each technology (Flash / Java / Silverlight)

Flash / FlexSize: 1.87 Mb (without Air)99.00%
Java (JRE)Size: 15.89 Mb90% (including mobile devices)
SliverlightSize: 4.7 Mb30% (in US)

Official website: http://java.sun.com/javafx


Silverlight


Silverlight is a recent attempt by Microsoft to make a platform for creating an RIA. Has limitations in the face of the .NET framework. But despite this, it has already become widespread among media resources (mainly in the United States). The biggest disadvantage of this solution is that full-fledged work is possible only on machines running Windows OS. Although there are projects to support this technology on * NIX OS (mono)
, but it often does not give all the possibilities. It requires the same as the flash plugin to the browser. In version 2.0 added support for .NET languages. And by the possibilities it provides all the same - vector graphics, animation, widgets, audio-video clips, etc.

Official site: http://www.silverlight.net


Openlazlo


This is an open source platform for developing RIA applications. UI programming is done in their own LZX language, in fact it is XML with JavaScript, designed to be closer to web programmers who are already used to HTML, JS. The first versions of OpenLaszlo were interpreted in a regular flash application, but from version 4, interpretation in DHTML is supported. With the latest versions there is support for mobile devices. The main problem is the same as that of handwritten javascript, since the entire logic of the application is written on it. There are also problems with cross-browser.
UPD by Smerig : OpenLaszlo makes it easy to write in ActionScript inside js code


Official website: http://www.openlaszlo.org .


Echo3


A framework that allows you to create RIAs in the Java language. You write a servlet that intercepts all user requests, and which (as in the usual JSP / Servlet technology) is unique for each user. By extending the ApplicationInstance class, you describe the UI itself.
The main disadvantages of this solution are that any user action leads to a request to the server, all information about this client is stored on the server (there is no possibility of storing anything on the client). And at the same time inherits all the flaws of Java such as gluttony to memory, the JRE requirement, etc.

Official website: http://echo.nextapp.com/site/echo3


Google web toolkit


There is a lot of talk about him now, many are beginning to actively use it. GWT is based on a compiler that translates java-code into java-script + html + xml and this is the main advantage of this toolkit - the browser does not require any plug-ins (unlike applets, javafx scripts, flash / flex or silverlight). Since all the code is written in pure java (if you wish, you can of course use the native java-script code), it has all the power of a huge set of java libraries that you can use. But here is the first minus. On the client side, you can use only some of the main libraries (java.lang java.utils etc) while others will result in a compilation error. But on the server side, no one limits you to anything.
Official site: http://code.google.com/webtoolkit/


Cappuccino


This is an open source framework for developing web applications. It was developed by the founders of 280 North, inc. It consists of the Objective-J programming language and the object-oriented library, which is the Obvective-J port of two Cocoa frameworks (Foundation kit and Application kit).
Objective-J syntax is close to Objective-C and is associated with javascript as well as Objective-C with C; memory allocation is controlled by javascript garbage collector. After compilation, pure javascript is obtained, so the browser does not require additional plug-ins (the interpretation process can occur directly in the browser). The compiler is written in pure javascript.
Although Cappuccino uses standard tools for rendering (javaxcript, css, DOM), but it is not at all like ExtJS jQuery or Prototype. Working with Cappuccino you don’t have to work with DOM or CSS, the framework itself takes this part. Cappuccino does not pretend to the server side of the application, so even though PHP is suitable, even though Ruby is what you want.
Official website: http://cappuccino.org/


ZK


This is an open source Ajax web application development framework implemented entirely in Java. It allows you to develop full-fledged user interfaces for web applications without the use of JavaScript and at the same time costs a small amount of program code.
The core of ZK is an Ajax-based event-driven mechanism, more than 70 XUL and 80 XHTML components, and a special markup language for developing a user interface. Programmers design their applications using multifunctional XUL / XHTML components, and manage them based on events triggered by user actions. This is similar to the software model used in desktop GUI applications.
ZK also includes technologies such as JSP, JSF, Portlet and other J2EE technologies. For writing, several languages ​​(for all tastes) can be used - in pure Java, markup languages ​​(XUL / XHTML) or / and scripting languages ​​(Groovy).
Official website: http://www.zkoss.org/

Here we will complete the review of the main RIA development tools. I want to say that everything written above was considered from the point of view of a java-programmer, even though I tried to treat as impartial as possible to each of the attached competitors.

Source: https://habr.com/ru/post/72775/


All Articles