Flex 3 vs. Silverlight and Java

Posted on:February 25 2008


Today Adobe released Flex 3 and AIR. AIR can be compared to the .NET runtime environment by Microsoft, and Flex to Mircosofts Silverlight: You can create Flash applets using Flex and run them on your desktop with some additional functionality like file saving and similar using AIR. Being originally a C++ programmer, I've also gathered some development experiences using Flash and Flex, (actually I've even worked on a now released commercial game based on Flash last year), and I think Flex is a very good software development platform especially for browser applets, if confronted with .NET and Java. In short, from the perspective of a game developer, there are only some very few points which are important. I've brought them face to face in the following table:

TechnologyPlatformsGFX RenderingAvailability
Flex/AIRWin/Mac/LinuxExcellent very good
.NET/Silverlight Win, ~MacOK poor
JavaWin/Mac/LinuxSlowdecreasing
Note: this table may not be 100% correct and represents my personal experiences. See below for explanations.

All three technologies have very good and fast compilers, nicely designed languages with strong and static typing, comprehensive and very powerful libraries and relatively fast execution speed. There are a lot of other things to compare, but basically, the ones shown in the table above are the categories which I would consider, and based on them, Flex is the winner in my opinion.
Flex compiles to .swf files which are browser embedded Flash applets, and thanks to YouTube and similar, nearly everybody has a Flash plugin installed today. But what about Silverlight and Java? I have not yet come across a website using Silverlight. And the times when Java applets were popular are clearly over for whatever reason. Silverlight wants to be cross platform too like Java and Flash, but it's still Microsoft, nearly completely ignoring every non-Microsoft OS. There is a Linux port of Silverlight, named Moonlight, but not done by Microsoft, and it is not finished yet.
And thinking about graphics rendering, I've made the experience that you can do quite nice things using .NET, but Flashs optimized 2D vector rasterizer is not easy to beat, in my opinion. Java today also has some neat 2D rendering capabilities and they are also working on hardware accelerated output (last time I checked this had to be manually enabled on the client side, so nobody actually used this feature), but in my opinion it still feels a bit slow.
Now, with AIR, Flash has the same advantage as Java and .NET: You can create desktop applications with it as well. So I think if you should ever want to write some game, Flex is now a good place to start.





Comments:


In my experience, the great advantage of Flex 3 is that it's incredibly easy to build your own applications. When we needed some good test applications for our AMF3 support in SilkPerformer, my colleagues were able to build their own Flex apps within a day without any prior knowledge. On the other side, AMF3 (the serialization format of Flex 3 for ActionScript objects) is... uhm... interesting. :-)
ak
Quote
2008-02-25 18:25:00


I actually didn't know that Flex was free, never mind open source - I just assumed that being Adobe, it was proprietary & expensive. That's really nice, I think I'll download it and have a play sometime.
steve
Quote
2008-02-25 19:06:00


My stupid opinion:
First of all, I have work with c++, java and c#, never with Flex. All lenguage are powerful, i have see incredible things with all 3 language bat IMHO on Internet there are other important point to discriminate the real power of a language :
- Easy to understand and rapid to use. For example, php are the very easy to understand and use.
- Open. The specification of language o vm are open and all can use in his platform. It's not important that the language are open source bat a ISO as PDF are very useful.
- No royalty . royalty free.
Linefinc
Quote
2008-02-25 21:20:00


In combination with Eclipse you don't even need the Flex Builder, which isn't for free...
Delight
Quote
2008-02-25 22:04:00


Adobe is giving FlexBuilder free to students and educators - not sure if that is only in the US though:

http://www.flexregistration.com/
Swiftcoder
Quote
2008-02-26 03:37:00


Why did they name it Flex... Flex is a free lexical analyzer generator.
Michael
Quote
2008-02-26 18:33:00


"thinking about graphics rendering, I've made the experience that you can do quite nice things using .NET"

Just a thought: you might be confusing the WPF/Silverlight renderer with GDI+, as encapsulated by the System.Drawing library, which is what you would usually encounter when using older .NET versions (before 3.0). GDI+ is slow and ugly, and should not be compared to the Flash renderer in this context.

Also, I would be hesitant to judge Silverlight at this stage, when even the first beta has yet to come out (not counting Silverlight 1.1, which was indeed an odd beast).
Jonas
Quote
2008-02-27 23:22:00


Don't forget about server side programming. Flex 3 apps are client side apps and they interact with server side scripts written in Java, PHP, .NET etc.
From this point if view, AIR can't be compared to .net, because AIR can't be used for server side programming.
I use flex to write user interface (instead of ajax or asp.net) and PHP, or C# to write server side code.
Anyway, good article
Vasile
Quote
2008-02-28 11:05:00


Think actionscript has a chance against C#? Forget it already. W/ little to no experience in the platform/language front, it's a matter of time Flash/Flex loses out to the .Net juggernaut. Just think of this: Who wants to learn ActionScript? Certainly not every .Net programmer out there, which way out-numbers all Flex programmers. Now if M$ gives them SilverLight 2 allowing them to code RIAs in C#, VB.net and so on w/ the benefit of the mighty .Net framework, Intellisense from Visual Studio and end-to-end support across all 3 tiers for not only RIAs but also enterprise web apps, how many of .Net developers are willing to use Flex/AIR instead? You will see an army of .Net programmers adopting SL2 and soon come out w/ a bunch of APPs and make SL2 the dominant RIA solution in the market.

Flex in my opinion won't fare much better than Borland C++ or Delphi.
derk
Quote
2008-03-17 02:31:00


Actionscript is a based on JavaScript. If you do any work on a website, you HAVE to know JavaScript. I haven't don't much work with Flex but I have done some with Flash 8. If the Flex language is similar to that, it won't take anyone that knows JavaScript very long to move to ActionScript.

In terms of the "Microsoft Jugganaut"... that thing is dying. Java has far more developers that .Net (all languages put together) and PHP has more websites than either .net or Java!

If Adobe plays this right, it could be quite viable alternative to the JavaFX and Silverlight. On the Linux front, a lot of people are starting to question if Moonlight is going to be worth working with even though Nokia will include it in their 810 pad. The bigger question is which one of these will work with Google's Android platform. As of right now, neither Apple nor Google will support SilverLight. Google seems to be open to Flash and will run Java.

Personally, I think the battle will be JavaFX vs Flash with SilverLight going the way of Microsoft Bob.
Sean
Quote
2008-03-17 14:24:00


Sean, I'm from the Win/.Net world and you are from the other front. It's obvious we will disagree a lot if we start a religious fight. So I'll keep it focused on Flex VS SilverLight.

If you look at ActionScript 3, it's more like Java than Javascript, which is smart for Adobe. Believe me Javascript is about to be gone in the new web app world b/c it sux in so many ways compared w/ Java or C#. By making it "ActionJava", Adobe invites the entire world of Java developers on board who for sure wouldn't wanna use SilverLight.

That being said, I don't think Adobe is good at building virtual machine or designing languages and compilers, which was reflected in how big a joke AS2 was and Flex not gaining much eyeball despite being out there for a while. W/ M$ chasing them, they start to open up and turn to Java world for help. Smart for them. Might as well just drop the ego and merge Flex w/ JavaFX. Why get overlapped here while both are under the threat of a common enemy you know who.

As for our .Net web developers. I don't see anyone in their right mind will switch to Flex. We have a strong Sql Server as the data tier and a powerful WCF as the middle tier. Both fit right in w/ SilverLight to form an end to end solution, so no point to use Flex for the presentation tier. Especially to think of coding in what, AS3? No thank you, we love our generics, threading, LINQ, etc so we prefer C# (in Visual Studio no less)..

The end result will pretty much be like this: Flex is adopted by WHATEVER-nix/Java platform and SilverLight rules the Windows world. Like the current J2EE VS .Net situation. Given Adobe's track record in the Linux world, hoho, better behave this time.
derk
Quote
2008-03-18 02:33:00


Interesting post! Not to throw wood on a fire of which is better but I have a slightly different view.

I am always open to learn something new. I hear good things about C# and think I will pick up a book sometime soon and learn it. I have hesitated in learning any MS centric languages again after earlier experiences that left me with a very bad opinion of them. But times change.

However, if you know JAVA, Flex would be a better choice then .NET / Silverlight. If you are concerned with a Middleware system and you are using Flex I would suggest you take a serious look at ColdFusion 8. (No Laughing now)

ColdFusion 8 code now compiles into pure JAVA Byte Code. It is really nothing more then a JAVA Tag Library. Only it is a very VERY Big and well refined JAVA Tag library with loads of features and well documented. It also happens to integrate very easily with Flex 3.

If you think about it Flex is simply an XMLish tag library that compiles into ActionScript Byte code that runs on the clients Flash VM. ColdFusion 8 is Simply an XMLish tag library that compiles into JAVA and runs on the servers J2EE server / JAVA VM.

So the two are like opposite ends of the same coin and fit together really well. If you already have skill with Java and know how to use a Tag Library you will find yourself right at home with both Flex 3 and ColdFusion 8.

@Sean – Thus I can see your point on JavaFX. If this were to happen, my guess is it will come around the time of the release of ColdFusion 9 and Flash 10. It's more likely however that Adobe will incorporate the JavaFX library into ColdFusion directly as it appears they already have plans on allowing you to write ActionScript and MXML in line with ColdFusion code. Combining them this way is only logical.

Flex and ColdFusion 8 communicate easily through Remote Objects over AMF3. AMF3 is not only blazingly fast compared to traditional Web Services but you can also get the benefit of automatic type conversion.

Adobe's Flex Builder has a build in ColdFusion CRUD wizard that will generate many of your ColdFusion Components for you. So if you are simply building a Data Entry, Retrieval and Manipulation application half of your work is done for you before you have barely started.

From my experience, assuming a development staff of average competence, most Web 2.0 projects (regardless of scope) can be completed in about half the time using a combination of Flex and ColdFusion 8 as it would take with AJAX, JAVA or MS centric languages. In doing so you also can use the application anywhere the Flash 9 Player runs. Therefore there is no need to recode for different operating systems or browsers. Thus affording you a far greater audience with little to no extra work.

As stated above I will likely learn C# simply our of my own curiosity. But time is money and Flex 3 and ColdFusion 8 currently save me a lot of time when compared to any current competing languages.

Silverlight will have it's day in the sun and is likely to become a traditional Microsoft Sponsored powerhouse. But it will be largely do to Microsoft's Deep pockets and the amount of marketing they can put out rather then true merit.

If you want to make Microsoft more money use Silverlight. If you want to make yourself more money I suggest Flex. If you would like to make your life easier at the same time combine it with ColdFusion.
Joseph
Quote
2008-04-09 12:01:00


Add comment:


Posted by:


Enter the missing letter in: "Internation?l"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons