My name is Sébastien Arbogast, I’m 27 and I’m a freelance Software Architect and Developer based in Brussels, Belgium. My main specialties are agile methodologies, rich internet application, highly productive Java development and iPhone development. Sebastien is a DZone MVB and is not an employee of DZone and has posted 26 posts at DZone. You can read more from them at their website. View Full User Profile

Being creative again: Flex or Java?

01.26.2008
| 7538 views |
  • submit to reddit

Amongst the things that really amazed me this afternoon in Gent was Lovely Charts, an online charting application that’s currently under semi-private beta. My first impression was something like “if it’s just a Flex alternative to Gliffy, I don’t see the point”. By the way, Gliffy is developed with what was the most advanced RIA technology before Flex 2 came in, namely OpenLaszlo.

Then Jérôme Cordiez proceeded with a small demo which showed something very interesting and reminded of Javapolis 2007. There was a lot of animosity there between JavaFX and Flex advocates, the most prominent JavaFX advocate being certainly James Gosling himself. And it was funny because the only answer Sun seemed to have against Flex was like “everything you can do with Flex, you can do it with Java, and even more”. But of course the problem is not what is possible, but what is easy to achieve. And Flex is far far ahead of Java on that topic. And even though Sun perfectly understood that and probably launched the JavaFX initiative to solve that very issue, I think they’re still too late.

But why is it so important to be able to achieve advanced rich features as easily as possible? Well, that’s precisely what Jérôme demonstrated today: because you lose less time on putting things together, you have much more time to be creative. And as a matter of fact, Lovely Charts is not just a Flex Gliffy counterpart, as it proposes a whole new way to create charts with a very interesting “create and connect” tool. This allows you to basically create your chart very fluently without having to change your tool continuously. That’s the kind of feature you wonder why it was not included sooner in other charting tools, including Visio, Omnigraffle and others.

Hopefully I’ll get my beta login soon so that I can test it further.

Published at DZone with permission of Sebastien Arbogast, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Steven Devijver replied on Sat, 2008/01/26 - 6:18pm

Lovely Charts is amazing. Watch the screencast here.

Rick Ross replied on Sat, 2008/01/26 - 6:53pm

I saw a Flex 3 presentation the other night that truly knocked my socks off, and it was clear to me that Adobe has given very careful thought to transforming Flex into a client-side power platform. If you think about it, the APIs in the Flash Player (the most downloaded software in history) offer breadth and depth that rival most general purpose computing platforms.

Now that Flex provides deep access to all those APIs with a standards-based programming language and a full-featured Eclipse-based development environment, they may well have the magic combination to propel Flex to new heights. 

Roger Voss replied on Sat, 2008/01/26 - 10:47pm

Hi Rick,

One of my dev teams has now delivered one Flex 2 app to customers. Am still completely stoked on Flex as am moving on to do more.

In that Flex 3 presentation they probably showed you a lot of cool stuff no doubt. I continue to be impressed with the integration story for Adobe Designer tools with Flex (Thermo is coming - it's rather interesting). And AIR is certainly exciting as a different way to start tooling platform independent apps for the desktop - as well as hybrid RIA (run in a browser or run on AIR with enhanced capabilities).

However, one of the very best things Adobe has done in regard to the Flex platform is the open source BlazeDS messaging middle-ware component.

Now some may be critical of BlazeDS, citing how it will have scalability issues. However, that will be just a mere transient matter. As soon as the source code makes it to the public (they're having to go through a process just like Sun prior to making it available under open source terms), we in the developer community will quickly roll a solution that supports Comet Events under Tomcat 6. Then BlazeDS can be coupled to the Tomcat NIO HTTP listener and be able to scale as well as any NIO based server software.

Then there is the JMS adapter for BlazeDS so that it can be tied into enterprise JMS-based messaging. Folks that have read my JavaLobby JMS articles will know that I'm a major fan boy of JMS messaging.  :-)

I've been looking for a better solution for doing the GUI side of 3-tier distributed applications for a number of years. In Adobe Flex I've finally found very close to the perfect solution that could be conceived using current computer science technology and know-how. 

 --RogerV

"Let me get right to it by lobbing some grenades: I recognize two arch evils in the software universe – synchronous RPC and remoted interfaces of distributed objects."

Mark Unknown replied on Sun, 2008/01/27 - 9:34pm

I looked at the demos and did some digging and found I can easily use my Spring Services. It seems very interesting.

I wonder if Adobe AIR functions like Flex? Meaning can I use my existing Java code.

One thing i have not seen yet is a complex application. I don't mean complex GUI. A lot of the code I do is in domain objects. I did notice that some of the demos had objects that were not strings and thus all you saw was something like com.domain.Person instead. I'd like to know how they solve this and how i can reuse all the domain code I have written - not just services .

 

 

Roger Voss replied on Mon, 2008/01/28 - 1:35am

mknutty:

AIR will run Flex so your existing Flex code that interacts with your Java services will work there too. Yet AIR will be able to run ports of conventional HTML/JavaScript AJAX web apps as well, as it incorporates the WebKit HTML rendering engine (same one used in the Safari browser - and has been chosen by Google for use in Android).

As to domain objects - BlazeDS will support bi-directional marshaling of Java objects to Flex ActionScript objects. BlazeDS supports a messaging approach (hence can do server-side push of events/messages to the client) as well as asynchronous remote method invocation. Both styles support object marshaling.

Because Flex HttpService layers on the underlying browser's XmlHttpRequest, it will actually be possible for conventional HTML/JavaScript AJAX web apps to interact with BlazeDS too. (In that case would probably want to use JSON to marshal objects.)

--RogerV

"Let me get right to it by lobbing some grenades: I recognize two arch evils in the software universe – synchronous RPC and remoted interfaces of distributed objects."

Mark Unknown replied on Mon, 2008/01/28 - 8:35pm

RogerV,

 Thanks.  That answers some of the questions.  

I guess what i really was trying to ask (and I know I didn't) if it will function like a WebStarted app (or any java client app) where I can run my stuff client or server. I am guessing that it won't because it basically on communicates with Java on the server.   

I am asking because I have a desktop app that needs to be easily  "branded", but needs the functionality and variety that Java brings.

Rainer Eschen replied on Thu, 2008/01/31 - 7:26pm

If you think about using an AIR-based application as you would do with a Java WebStart application, the answer is yes:

Here's an example how Slide Rocket (next generation PowerPoint) is doing it:

http://www.sliderocket.com/airinstall

BTW: There are first BlazeDS code examples out there that allow to have Spring Beans in the backend. And GraniteDS seems to be an alternative, too.

Springsteam Blog - Next Generation Java Development

Roger Voss replied on Thu, 2008/01/31 - 11:52pm in response to: Rainer Eschen

When used alone, BlazeDS has a Spring-like capability to configure beans that will be run in order to process messages and remote method calls.

If BlazeDS is used in conjunction to Spring, then it lets you specify and delegate to a Spring factory - in which case all beans can then be configured and managed from Spring (using any of its techniques - annotations, Java-config, xml config,...).

Also, when using with Spring and Acegi security, an Acegi HTTP filter can be used to apply security using URL patterns on the front-side and then method level security on the Spring bean side. BlazeDS sits in the middle.

All the while a Spring controller can be used along side BlazeDS to process conventional HTTP POST/PUT/GET, with the same security mechanism and same bean DI configuration/instantiation being used.

This all makes for a very sweet system to roll a custom application server stack for Flex RIA web application development (and AIR apps too).

To top it off, BlazeDS has a JMS adapter so a JMS message broker can be layered into the mix. Something could publish a message into a JMS topic and the message shows up in the Flex client to be processed, etc.

This whole Flex-RIA + Spring-SOA thing just really rocks end-to-end. 

--RogerV

"Let me get right to it by lobbing some grenades: I recognize two arch evils in the software universe – synchronous RPC and remoted interfaces of distributed objects."

 

Mark Unknown replied on Fri, 2008/02/01 - 2:40pm in response to: Rainer Eschen

I didn't install it so I am not sure if it functions like I am asking.

 But based on your comments, I am thinking it doesn't.  WebStarted apps can run disconnected.  It is mostly about deployment.  There are some special classes for restricted local access.  

  What I am talking about is something that functions more like, well I can't think of a good example.  But something that could run all locally if there was one user or communicate with a shared server if there was more than one.  And I have a lot of code that is not UI but runs on the client.  Sometimes it runs on both client and the server.

   I am not trying to put done Flex. I am just trying to see the sticky points prior to stepping in them.

Roger Voss replied on Fri, 2008/02/01 - 3:55pm in response to: Mark Unknown

You could have an AIR app that has disconnected functionality. Can do persistence into local files or the built-in SQL database (where the database is created on a local file that you specify).

Certainly folks are thinking of this - in terms of the laptop/notebook user that goes into disconnected mode during airline flights, etc.

Google has devised the Gears plugin with this scenario in mind for things like GMail, etc.

The cool thing for an AIR app, though, is that it can still fully anchor itself to a home domain website where it gets deployed from and invokes services against. That is where can architect it to be a hybrid RIA web app. 

Disconnected mode operation is then icing on the cake. 

--RogerV

"Let me get right to it by lobbing some grenades: I recognize two arch evils in the software universe – synchronous RPC and remoted interfaces of distributed objects."

Mark Unknown replied on Sun, 2008/02/03 - 12:25pm

From the answers it seems that I won't be able to reuse my Java code unless I am calling server-side code. Anything else will have to redone/duplicated in Adobe's language. So whatever I use Flex for, I will have to be very careful and try to keep my crystal ball in working order. :(

Roger Voss replied on Mon, 2008/02/04 - 12:32pm

After 12 years and the Java platform not figuring out how to do the client side, some of us had to move on and get on with life (i.e., make products to meet customer needs that are pleasing/delightful to use). Is no way I'll squander the company's competitive window oppurtunities on the Java community and Sun figuring RIA out.

At this point JavaFX is in at best 4th place in the RIA platform horse race. Currently is roughly situated like so:

  • Flex/AIR
  • GWT

With Flex in a pronounced front of the pack lead.

Silverlight has a bit of presence with the .NET community of developers (the folks that stick to the Microsoft stack no matter what). Yet their Flex competitor, Silverlight 2.0, is only in beta release so far (but that is much further along than Sun's JavaFX). Is due to be production release sometime late spring. They have a hard deadline as they need to be ready for the 2008 summer olympics as the Internet official content provider.

JavaFX doesn't even really have a true beta yet of it's end-to-end platform approach. Currently one can only sample pieces here and there of the JavaFX concepts. And even on the mobile platform they'll now have to take on Google Android.

--RogerV

"Let me get right to it by lobbing some grenades: I recognize two arch evils in the software universe – synchronous RPC and remoted interfaces of distributed objects."

Mark Unknown replied on Tue, 2008/02/05 - 3:22pm in response to: Roger Voss

Silverlight is only a competitor to Flex/Air and only if some is already using .Net.

I can't see GWT being a direct competitor in the RIA as it is tied to the browser. It is a competitor with Echo2/3 and RAP.

JavaFX is definitely behind and if you gotta get work done today then Flex is the way to go and probably will be for a certain class of user interfaces.

The problem I run into is when I need or would like to use my existing Java on the client. This can't be just a problem for me. There are just so many options in the Java world, they are hard to ignore. One might be able to initially. The same thing happens to me in .Net. But I pretty much end wishing I had started it with Java.

While I don't mind paying for good products, not all the the Flex platform is open and at the same price point as JavaFX. This will eventually come into play.

I think people are quick to point out where Flex shines (and it does shine) but not where it doesn't.

As a side note, Swing, SWT, Eclipse RCP and Netbeans Platform are pretty good for client side. I think they have figured out the client side. RIA they need to work on. But as i have said in the past, I blame this on all those who think browser based are the best thing since sliced bread and thus forced focus in that direction. (FYI, I have done plenty of VB and Winforms so I have a good perspective on client development)

Rainer Eschen replied on Sat, 2008/02/09 - 3:58am

Maybe its time to give up implementing each layer with the same language. If all this applet crap would have ever been worked, we wouldn't talk about Flex today. I'm developing with ICEfaces at the moment. It drives me crazy how much time I need today to get some HTML tags into the browser. I've a long experience with HTML/JavaScript (back to 1997 when nobody talked about AJAX) and even my oldest projects looked better, had lesser tweaks and, most of all, a readable HTML source.

I don't think that it makes sense to think about application deployment on the desktop again. Sure, for small deployments Eclipse RCP or AIR are interesting tools to use. But, if you have several thousand of clients? Somebody interested in the experiences from the 1990ties again?

The Web browser is still the best platform-independent deployment platform for the client-side. So, it makes sense to think about Flex, because the Flash player is the most spreaded extension - and with its 10 years of development maybe the most rock-solid Web solution today.

Springsteam Blog - Next Generation Java Development

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.