AMF.. huh?
This is my comment to Bruce Eckel's post Does Anyone Really Care About Desktop Java?. I really enjoyed the honesty in the comments and recommend that people read them.
Swing is difficult because it tries to solve difficult problems. Flex is much more specialized and supports a small subset of Swing's features. If you think Flex competes with Swing you probably also think that “web operating systems” done in Javascript and HTML competes with Windows and OS X. Yes, you can replace a Swing application with a Flex application if the application fits within the feature specification of Flash, but Swing is more similar to QT than Flex.
I don't understand why Bruce Eckel complains that the “Java UI was an afterthought”. Flex is a GUI framework built on top of the Flash animation engine. Sure, Adobe Flex developers have been able to scrutinize competing products for many years and have created something that is simpler to use, but why is this surprising ? Should Adobe create a new framework that is harder to use than existing frameworks ? Flex has a Java compiler, a Java IDE and a Java based message server. Everything is Java except the Flash player and the code that runs on the Flash player. Adobe uses Java, but Bruce Eckel recommends Python, AMF and Actionscript wrapped in XML. The nerd factor is a bit too large. I'm tired of people who solve extremely narrow problems and then proclaim that their mindset is the solution to all problems. It's like listening to 16 years old children who complain that the airplane seat is not perfectly molded to their body. Programming is all about compromises. A perfect language would be a failure because 28 people would program in it. Like, try moving dirt using only Formula 1 racing cars. A stupid pre-WW2 truck would outperform you. The reason I bring this up is because Actionscript is basically a Java clone and the Java Closure debate is mostly based on experience from scripting languages. People are bitching over problems that are so tiny and borderline subatomic that it makes you wonder if these people ever produce any working code.
Bruce Eckel also uses Flex “because I'm not trapped using a single language for the back-end logic. “. Yes, because all Swing developers know that SOAP, XML-RPC, CORBA, REST, JSON, JDBC and plain old sockets traps people into one language. Oh no, there is no language agnostic secure RMI. We're all doomed, doomed I say. I recommend that everyone uses Flex (it's open source) and when you fail in producing a high quality product, you blame yourself rather than the framework you're using. He then even forces Ruby on Rails into his rant as Google bait. Jessica Alba. Hayden Panettiere. Scarlett Johansen. Naked naked naked.
I must admit that I sort of mistrust popular frameworks. The hype factor is just too much for me. UI work is hard and Flex makes easy things easy. There is no revolution here. The reason he compares Swing with Flex is because if you compared Flex with HTML based web applications, Flex would look retarded. You lose many of the important features of the web so that you can create something that might look like a desktop application. Comparing Swing with Flex is a smokescreen designed to obscure a long list of problems related to Flex development.
Flex developers reminds me of those DHTML developers that we had a while back who all made a different scrolling component for their website. I've even done that myself. Sure, a lot of these things are cool, but nobody really wants to use stuff like that for real work. DHTML scroll panes eventually just piss people off. Hopefully Flex developers will fix their components over time. I'm tired of moving the scroll wheel 20 times in order to view ten items in a pretty animated list. And why is everyone creating fixed width Flex applications ? Is resizing something now considered too advanced ?
I like Adobe AIR and have no hate towards Flex or Flash. I own and use the Adobe CS3 Web Professional Suite which includes Flash Professional and I've been playing with both the Flex and AIR SDK. Use whatever technology makes you happy and that fits your needs. But how can I take Bruce Eckel serious when his Python and Flex code example has 17 lines of user interface code in it ? I could create 10 000 lines of code and then support his 17 lines of code and my framework could still be completely useless. Such a small example says very little about Flex. His Flex “user interface” is what I would call a console application.
I don't want to sound arrogant or defensive since it might sound like I'm defending my own software. I'm not. There is very little interest in my development software and I've pointed this out before. But this is not a big problem for me, since my tools are just in-house tools that I've made public. They're basic because I'm not targeting entry level developers. You need years of experience to understand why my tools exists in the first place. I built them because I had no real alternatives. So Eckel has a good point when it comes to tools support.
There's not much interest in Swing right now. And the reason is very simple. Java 1.6 is pretty much bug fixing of 1.4 desktop API's. We desktop people had to sit back and watch Sun rant about web services, generics, syntax, cool threads and other irrelevant crap (from a desktop perspective) while our applications suffered from ugly fonts, slow startup, stupid API's and mind numbing *cough* Web Start *cough* bugs.
Java 3D, Quicktime for Java and the Java Media Framework are all obsolete. Java Mail and Activation is not maintained. Java Sound was one guy. Bluetooth ? Huh ? And on and on it goes. And then JavaFX is the solution to all this ? Java 1.6 is fantastic compared to 1.4 when it comes to desktop API's. But very few people care. Only people like me who have megabytes of Java code even notice that Java on the desktop is getting better. One thing I can tell you about Adobe Flex and AIR is this. Look at how many times they've broken the API. Then compare that to Java Swing. Sticking with old API's is hard work. Creating new shit is easy.
If you need training wheels on your bicycle, then use Flex. If you got a hairy chest use C++ or Objective C with native API's. And if you have no money, like me, use Java.
PS
Ah, man. Almost made it through without trying to be funny. I need to work on my professionalism. Damn the American version of The Office.
PS PS
I know smart people whom used Flex all the way and still bombed financially. Even if your product is fantastic the competition is just brutal. If Google/Yahoo/Microsoft/Facebook/Myspace creates a product that's 80 percent of your product, you're pretty much dead. Stop blaming frameworks all the time. Business is half your company. The other half is code. Many of the most heated forum debates on the Internet are about super-irrelevant issues.
Comments
Extremely interesting. I came upon this while looking for a comparison between Qt C++ and Flex.
Posted by: PHYSNG | August 1, 2008 07:40 AM
I probably sound too negative when it comes to Flex. There are several web applications made in Flex that are really impressive. The problem is that “made in Flex” might mean “seven lines of Flex were used”. It's making it hard to assess if you can do stuff like this without learning every single aspect of Actionscript 3.
AIR now makes Flex more desktop friendly, so you shouldn't discount Flex because of my ranting.
Try out
https://buzzword.acrobat.com
http://www.picnik.com/
http://www.scrapblog.com/
http://www.sliderocket.com/
and of course
http://www.photoshop.com/express/
http://www.adobe.com/products/mediaplayer/
http://flex.org/showcase/
Posted by: Jan Erik Paulsen | August 1, 2008 02:16 PM
This is also a good example of what you can do in Flex. Too many animations for my taste though.
Parleys.com Beta Talk.
Posted by: Jan Erik Paulsen | August 4, 2008 09:43 PM