Welcome!

Machine Learning Authors: Zakia Bouachraoui, Liz McMillan, Roger Strukhoff, Pat Romanski, Carmen Gonzalez

Related Topics: Machine Learning , Java IoT, AJAXWorld RIA Conference & Expo

Machine Learning : Article

AJAX, Java, Flash, and .NET

Enterprise Rich Internet Applications (RIAs) are the next evolution of business application development

Application Logic Development
RIA solutions enable a wide range of options for application logic development. In typical HTML applications, most of the logic has to be on the server side. In typical desktop applications, most of the logic resides on the desktop. RIAs offer significant flexibility so developers put the logic either on the client side or server side. They can also adjust the location - ranging from very limited logic on the client side all the way to almost 100% logic on the client side, as shown in Figure 3.

The flexibility in partitioning application logic brings significant benefits. Some applications are best suited to having all their logic centralized on the server side while other applications require that the logic run on a local desktop. Traditionally, developers have to make tradeoffs depending on whether they choose to build the application as Web application or a desktop application, and bear with the problems associated with that particular choice. RIAs combine the best of both worlds, enabling developers to meet different application requirements without making costly tradeoffs.

In contrast to UI development, the choice of a particular RIA approach - Java, AJAX, .NET, or Flash - has a direct impact on and creates significant differences in application logic development. Choosing a scripting-based solution requires that the logic be written as scripts, which limits the amount and scope of logic that can be developed and maintained cost-effectively. An OOP-based RIA solution gives maximum flexibility to logic development and maintenance, but requires a higher-level skill set than scripting.

There's a code sample of logic development using Laszlo in Listing 1.

By contrast, OOP-based approaches use an object-oriented true programming language for the application logic development and typically enforce separation between the logic and the UI markup. For example, Nexaweb uses standard Java for the application logic called mco. Nexaweb also enforces a clear separation between the UI and logic, preventing the mixing of the UI with the logic in the same document for better application maintenance. (Figure 4) Nexaweb separates the UI from the application logic:

<xal>
<mco:declarations xmlns:mco="http://nexaweb.com/mco">
   <mco:mco id="myMco" src="com.nexaweb.test.MyTestMco"/>
</mco:declarations>

   <dialog title="Login Dialog">
     <boxLayout orientation="vertical" pack="start" align="start"/>
     <label text="Username:"/>
     <textField height="25" text="enter username here..." width="200"/>
     <label text="Password:" />
     <textField height="25" text="enter password here..." width="200"/>
     <panel height="25" width="100"/>
     <button height="25" text="Button" width="100" onCommand="mco://myMco.handleOnCommand()"/>
   </dialog>
</xal>

Nexaweb enables application logic to be written using standard Java:

/**
*
*/
package com.nexaweb.test;

import com.nexaweb.client.ClientEvent;
import com.nexaweb.client.ClientSession;
import com.nexaweb.client.mco.AbstractMco;
import com.nexaweb.client.mco.McoContainer;


/**
* @author cwei
*
*/
public class MyTestMco extends AbstractMco {

   public void handleOnCommand() {
     ClientSession clientSession = McoContainer
       .getClientSessionFromMco(this);
     ClientEvent clientEvent = clientSession.getEventHandler()
       .getClientEvent();

     //additional business logic here...

     System.out.println("Hello, you clicked the button!");
   }

}

Choosing the Right RIA Solution
Given the various RIA approaches and solutions available, selecting an RIA solution can be confusing. There's no universal "right" RIA solution. It depends on the application's requirements.

Enterprise Application Requirements
For the purposes of this discussion, it's useful to categorize the full spectrum of software applications that enterprise IT departments build, deploy, and maintain across two related dimensions: business criticality and application complexity.

  • Business criticality concerns the degree to which an application is critical to running the business or meeting business objectives. Disrupting access to a business-critical application, or even unacceptable performance, has an immediate and significantly negative impact on the business. Other applications are less critical to operations; if there's a problem, the user can wait a few minutes to perform a task without major consequences.
  • Application complexity refers to its feature richness and sophistication from a user's perspective. Some enterprise applications have thousands of screens, with usage metaphors characterized by multi-path, non-linear state transitions. (In other words, you might rarely use them exactly the same way twice.) Other applications have rather linear state transitions and fixed usage paths - using them is comparatively routine.
Classified as either "high" or "low" across both these dimensions, an application falls into one of four categories as Figure 5 illustrates.

The applications in quadrant A are business-critical and less complex. Users rely on these "helper" applications to do simple but highly important business operations (e.g., an employee portal, partner extranet, or e-commerce Web site). These applications are used less frequently and/or for shorter durations ("casual usage level") than more complex applications. The workflow is typically linear; users do the same tasks in roughly the same order each time they interact with the application. From a development perspective, the client-side development team typically comprises fewer developers than a more complex application would require.

A classic example of a high-criticality/low-complexity application is an airline's online ticketing application. Most users interact with it only occasionally, for a short duration, and in a step-by-step fashion.

Applications in quadrant B are both business-critical and complex. These applications are used for many hours each day to do complex non-linear tasks that are central to business operations. The performance, availability, and scalability of these applications are extremely important. From a development perspective, maintenance is important and may cost more than the initial development. The development team comprises many developers who require close collaboration.

Examples of high-criticality/high-complexity applications include the trading applications used by portfolio managers, call center applications and banking applications accessed by tellers.

The applications in quadrant C are complex but less business-critical. As a result, they are managed much more cost-consciously. High-complexity/low-criticality applications include some legacy applications in which companies wish to minimize further investments, as well as some corporate R&D projects.

The applications in quadrant D are less complex and less business-critical. They are typically written by a small development team of one or two people. Developers' individual experimentation would fall into this category.

Different RIA Technology for Different Applications
Seen against the backdrop of business criticality and UI complexity, different RIA technologies are appropriate for implementing or re-architecting the various classes of enterprise applications.

As Figure 6 illustrates, the applications in quadrants B and C are much better suited to OOP-based RIA development approaches like Java and .NET, because these technologies offer better maintainability and support for team development. Scripting-based approaches are more suited for applications that fall into quadrants A and D where programming tasks are simpler, development teams are smaller, and maintainability is a less mission-critical concern.

Table 3 provides details on how different RIA approaches fit with different enterprise requirements for application profiles and developer skill sets.

The diverse nature of enterprise application requirements, combined with the clear strengths and weaknesses of different RIA technologies, lead to the inevitable conclusion that "one size does not fit all."

No single RIA development approach is ideal for all enterprise environments. Some requirements are better met by scripting-based RIA approaches, while others require OOP. And in these two categories, a particular application need will be better served by AJAX versus Flash, or by Java versus .NET. In short, all four of these RIA technologies are likely to co-exist in many enterprise environments for the near future.

Interesting New Developments
All RIA solutions are fundamentally constrained by their underlying technology - AJAX, Flash, Java, or .NET. If a developer picks Flex to develop his RIA, he has to live with the pros as well as cons of Flash. Likewise, if a developer picks an AJAX toolkit to develop his RIA, she must live with the various challenges associated with DHTML and JavaScript. As we mentioned earlier, among the four technologies, each has its strengths and weaknesses. One of the major goals of enterprise IT departments is "common flexibility" - providing standardization and simplification across different business applications and initiatives, while enabling flexibility for innovation within business units. Different business units have different programmer skills and therefore need different types of applications. As a result, dictating the use of one RIA technology across a large organization is unlikely to work well.

There's been a very interesting development in the RIA marketplace recently: cross-technology RIA solutions. Both Laszlo Systems and Nexaweb recently announced that their products are supporting more than one technology so that the same application can be delivered and rendered on different technology platforms. Laszlo supports both Flash and AJAX (DHTML). Nexaweb supports Java and AJAX. With this development, developers don't have to fight the "religious war" of JavaScript versus Java, Java versus .NET, or .NET versus Flash. Such development accommodates not only different developer skill sets, but also opens the door to combining the benefits of scripting-based approaches with those of OOP-based approaches, delivering optimal results.

Figure 7 shows cross-technology RIA solution architecture.

Listing 2 is a sample application written using a cross-technology RIA solution. It is an RSS reader that would read RSS feeds from Yahoo and display all the feeds in a table. The code is Listing 2 and the UI screen display is shown in Figure 8.


More Stories By Coach Wei

Coach Wei is founder and CEO of Yottaa, a web performance optimization company. He is also founder and Chairman of Nexaweb, an enterprise application modernization software company. Coding, running, magic, robot, big data, speed...are among his favorite list of things (not necessarily in that order. His coding capability is really at PowerPoint level right now). Caffeine, doing something entrepreneurial and getting out of sleeping are three reasons that he gets up in the morning and gets really excited.

Comments (4)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


CloudEXPO Stories
The precious oil is extracted from the seeds of prickly pear cactus plant. After taking out the seeds from the fruits, they are adequately dried and then cold pressed to obtain the oil. Indeed, the prickly seed oil is quite expensive. Well, that is understandable when you consider the fact that the seeds are really tiny and each seed contain only about 5% of oil in it at most, plus the seeds are usually handpicked from the fruits. This means it will take tons of these seeds to produce just one bottle of the oil for commercial purpose. But from its medical properties to its culinary importance, skin lightening, moisturizing, and protection abilities, down to its extraordinary hair care properties, prickly seed oil has got lots of excellent rewards for anyone who pays the price.
The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected path for IoT innovators to scale globally, and the smartest path to cross-device synergy in an instrumented, connected world.
There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
ScaleMP is presenting at CloudEXPO 2019, held June 24-26 in Santa Clara, and we’d love to see you there. At the conference, we’ll demonstrate how ScaleMP is solving one of the most vexing challenges for cloud — memory cost and limit of scale — and how our innovative vSMP MemoryONE solution provides affordable larger server memory for the private and public cloud. Please visit us at Booth No. 519 to connect with our experts and learn more about vSMP MemoryONE and how it is already serving some of the world’s largest data centers. Click here to schedule a meeting with our experts and executives.
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the University of Cambridge, Darktrace's Enterprise Immune System is the first non-consumer application of machine learning to work at scale, across all network types, from physical, virtualized, and cloud, through to IoT and industrial control systems. Installed as a self-configuring cyber defense platform, Darktrace continuously learns what is ‘normal' for all devices and users, updating its understanding as the environment changes.