Welcome!

Java IoT Authors: Elizabeth White, Yeshim Deniz, Pat Romanski, Liz McMillan, Frank Lupo

Related Topics: Machine Learning , Java IoT, Adobe Flex, Agile Computing

Machine Learning : Article

Rich Internet Applications - State of the Union

What's your technology choice for implementing RIA?

Some Pragmatic Flex/Java Considerations

Cool technologies come and go. Only some of them settle down in the toolbox of a professional programmer working on enterprise business applications. The technical excellence of any software is important, but it's not the only component in its success.

The Learning Curve: Reuse of Skills and Code

One important concern of any development manager is the availability of a large pool of people who know a particular software. There are plenty of Java programmers with the skills required to develop Web applications, and the good news is that enterprise Java developers with servlet/Java EE programming skills or Java Swing experience will find the Flex path very easy.
Java and ActionScript 3 are very similar; Eclipse is a familiar environment for many Java developers. Since Flex piggybacks on Java EE and browser technologies, a server-side Java programmer should be able to correlate his current skills with the development process in Flex. Java Swing developers will instantly spot similarities to Java event and layout models. In our experience, the typical ramp-up time for motivated Java developer is two weeks. The best part is that Flex seamlessly integrates with existing Java server code of any flavor - POJO, EJB, Hibernate/Spring, or JMS, so the server-side part can literally remain unchanged.


Application Security

Another important consideration is the security of Flex/Java applications. Flex server-side security management is quite extensive, and it lets you use either container offerings or custom security providers via declarative XML binding. There are a couple of challenges since Flex supports multiple protocols, so Java EE security that relies only on HTTP sessions has to be extended, but it's a simple and well-documented process. On the client side, it builds on Flash Player security that's known for its lack of serious security flaws. You have a built-in security manager that has all the standard protection for cross-domain and zone access. Corporations can further restrict the code they get from third parties by wrapping the code loaders in additional security managers.
Flex GUI Performance
Java Swing is a tried and true tool for developing responsive GUIs in demanding applications like stock trading and online auctions. Flex is capable of providing near-real-time data rendering to the GUI and very high refresh rates on large data sets. Flash Player 9 is the high-performance modern virtual machine with precompiled optimized code and a just-in-time (JIT) machine code compiler.

Shorter Development Cycle

It's very possible to build the client side of a real-time portfolio display integrated with news feeds and graphs in about 200 lines of Flex 2 code. A similar Swing program (even if it's created with commercial IDEs) would be several times larger.
A decent Flex developer should be able to prototype (short of server processing) most of the UI for a specific trading system by the end of the first week. If you're lucky and system integration went okay, you can add the collaboration features and multimedia - with the total client code base for the whole project coming within 1,000-1,500 lines. This is definitely not possible with Swing. Of course, some people will say modern Java IDEs generate lots of boilerplate code automatically, but this is still the code that someone has to read, understand, and fix if needs be.
Having said all this, there is a big difference between an application prototyping and delivering a final product - you still need to write code, create new components extend ActionScript classes and implement interfaces. Flex is not a magic wand.

Flex: Room for Improvement

While many programmers who dealt with previous versions of Flex are really happy now that they have a professional Eclipse-based IDE, Java programmers are spoiled by the variety of excellent and responsive IDEs. Flex Builder helps a lot  in writing Flex code, but it's not as sofisticated and elegant as it could have been. It's even not as good as its daddy Eclipse.

While you can use Flex just to connect to your existing applications written as JSP or any other HTTP-compatible technologies, you'll get performance gain if you'll use Flex remoting and messaging that is build on fast Adobe proprietary protocols called AMF3 and Real Time Messaging Protocol (RTMP).  To take advantage of these benefits you have to purchase Flex Data Services licenses, while may not be affordable for small businesses.

Connection Management

Flex provides an extensive infrastructure for managing connections between the Web browser and the server. It lets you specify all the protocol details for the RTMP, HTTP, HTTPS as well as plain socket connections. You can then specify the order in which the protocols should be tried due to availability/firewall issues. You also get alternative real-time push or pull connections on additional protocols, a direct socket API, and tons of low-level hooks that let you build any protocol you want.

Flex and Agile Development
 
In mid-‘90s PowerBuilder and Visual Basic were the tools of choice in the client/server field. Software developers didn't really worry about what was under the hood, but more importantly, they were business users' best friends. They could do stuff quickly, or using the modern jargon, they were agile programmers without even knowing it. They'd ask the business user Joe, "How do you usually do your business? What would you like to have on this screen? Describe the steps of your business process." Most likely Joe wouldn't know all the answers, but this was okay, because developers could come back to the user the next day with a working prototype. This was easy with PowerBuilder's DataWindow. When Joe-the-user saw the prototype, his glassy look all of a sudden would become friendly and understanding. Now Joe was back in control: "No, you did this part wrong, I wanted it different." No problem, developers would return with the changes the next day (not next month, but the next day!).
 Developers didn't really know how DataWindow worked, but they trusted this component. PowerBuilder used event-driven programming model, which was clean and simple. Object A triggers event XYZ on object B, and this event can carry a payload - the data that object B needs to operate. Using modern jargon it's called Inversion of Control or Dependency Injection design pattern. What's important is that the object B doesn't know about object A. On the same note, if object B needs to return the result of some internal function back, it would broadcast this result "to whom it may concern" by triggering one of its own events. This is loose coupling in action.
 The mentality of many Java programmers was different. They'd assign lower priority to the user's windows and spend most of their time designing a multi-tier system that didn't depend on any specific look-and-feel and could be universal. Meetings with Joe would be rare because they couldn't create a decent prototype fast. Fancy IDEs with GUI designers like Matisse weren't in the picture yet and, more importantly, Java programmers were thinking big: UML, design patterns, application servers, and clustering. They enjoyed the programming process for itself. They didn't like the mindset of old-fashioned PowerBuilder or Visual Basic programmers who were thinking windows and screens.
 With Flex you started to care about the business users again. You can change the prototype twice a day, and Joe can do the same with his business requirements. No pile of project documentation is needed. The napkin is back and it works. Flex architects can give the server-side Java team the final okay only after Joe is 100% happy.
 Besides, with Flex we can have the best of both worlds: the source code of the Flex framework is available, we can learn how it works inside, and override some functionality with what suits our needs better.
 Working with Flex promotes agile development, where the people we build the software for are the driving force. Agile development methodology suggests minimizing each development cycle to mitigate the risk of delivering something to the users that they don't want. Agile development encourages frequent face-to-face meetings with the end users as opposed to preparing and sending documents back and forth.

Summary

This quick overview of major RIA-enabling technologies and various approaches to making Web applications richer. It's by no means a complete list: new commercial and open source RIA frameworks and components arise every day.  Regardless of what RIA tools you are going to select, start your evaluations now to get a competitive edge.

More Stories By Yakov Fain

Yakov Fain is a Java Champion and a co-founder of the IT consultancy Farata Systems and the product company SuranceBay. He wrote a thousand blogs (http://yakovfain.com) and several books about software development. Yakov authored and co-authored such books as "Angular 2 Development with TypeScript", "Java 24-Hour Trainer", and "Enterprise Web Development". His Twitter tag is @yfain

Comments (4) View Comments

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.


Most Recent Comments
Ajax_is_a_hack 02/23/08 05:38:33 PM EST

Hey Yakov, check out this:

http://mx.sys-con.com/read/499659.htm

OpenLaszlo - yeah, it's an *alternative*, but let's be honest--other than it not being backed by a major commercial developer (which many see as a good thing)--it doesn't have Flex beat on much of anything. (Flex is open source too...) I've read some other admittedly less biased comparisons and OpenLaszlo was graded lower I think in every category.

jeff_s 02/11/08 04:22:03 PM EST

This blog is certainly not an unbiased analysis, even though it's pretending to be just that.

The article is basically "Flex rules, everything else drools".

It goes on and on about the good things about Flex, while giving only cursory coverage of Flex drawbacks. Meanwhile, it's just the opposite regarding the other technologies, going on and on about drawbacks, and giving only cursory coverage of advantages.

Case in point, Yakov says that Java Swing development is "hugely expensive". Nonsense. First, NetBeans is completely free, and NetBeans has the wonderful Matisse GUI designer, making the development of great looking Swing UIs a snap. Second, there is JavaFX, which is an XML based declarative scripting language that is used to quickly build rich Swing UIs super easy, and is very similar to MXML/Action Script, as is featured in Yakov's beloved Flex. Third, there is a plethora of third party libraries and controls in the Swing ecosystem, that further extends Swing capabilities, and makes Swing development easier.

Then, Yakov fails to mention how expensive Flex Builder is (which, to be honest, you'll need to be truly productive with Flex), to the tune of $249 (as opposed to Free for NetBeans).

Then Yakov goes on to say one of the drawbacks of Ajax is that it involves JavaScript. Wait a minute - JavaScript is based on EcmaScript, which Flex/Flash's Action is also based on. So Yakov, why does that syntax suck for one technology (Ajax), but it's great for another technology (Flex/ActionScript). C'mon.

Yakov also completely fails to mention how much of a CPU hog Flash can be, especially on older/budget machines (which, let's face it, are quite common in the business world). So if you do a RIA with Flex, which is running in the Flash VM, you're going to get a lot of end users (corporate workers) complaining.

Flex is quite good, and has it's advantages and disadvantages. Same with the other technologies mentioned in this article.

But Yakov's article is completely biased in favor of Flex. That's fine, as Yakov has long been singing Flex praises. But he's presenting this article as a fair analysis, when it's anything but.

Thus, anyone reading this article should take it with a grain of salt.

Yakov Fain 02/19/07 07:49:38 AM EST

Sebastien, not only I've mentioned OpenLaszlo in the article, but I also published my interview with the creator of OpenLaszlo:
http://java.sys-con.com/read/337118.htm

Am I cleared now or should remain ashamed?
:)

Sébastien Arbogast 02/18/07 05:43:34 PM EST

It's such a shame that you don't even mention OpenLaszlo as an alternative for Adobe Flex...

@ThingsExpo Stories
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
Amazon is pursuing new markets and disrupting industries at an incredible pace. Almost every industry seems to be in its crosshairs. Companies and industries that once thought they were safe are now worried about being “Amazoned.”. The new watch word should be “Be afraid. Be very afraid.” In his session 21st Cloud Expo, Chris Kocher, a co-founder of Grey Heron, will address questions such as: What new areas is Amazon disrupting? How are they doing this? Where are they likely to go? What are th...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...
Digital transformation is changing the face of business. The IDC predicts that enterprises will commit to a massive new scale of digital transformation, to stake out leadership positions in the "digital transformation economy." Accordingly, attendees at the upcoming Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA, Oct 31-Nov 2, will find fresh new content in a new track called Enterprise Cloud & Digital Transformation.
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati...
As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
SYS-CON Events announced today that Avere Systems, a leading provider of enterprise storage for the hybrid cloud, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Avere delivers a more modern architectural approach to storage that doesn't require the overprovisioning of storage capacity to achieve performance, overspending on expensive storage media for inactive data or the overbui...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
SYS-CON Events announced today that Avere Systems, a leading provider of hybrid cloud enablement solutions, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Avere Systems was created by file systems experts determined to reinvent storage by changing the way enterprises thought about and bought storage resources. With decades of experience behind the company’s founders, Avere got its ...
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...