This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: Swing is NOT evil !
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
After reading the latest german "java magazine", its obvious that the trend of hyping different GUI alternatives is not over yet. It seems that a lot of people have a swing picture in mind which just doesnt comform to latest Swing improvements. In fact, most of the developers i speak with touched Swing years ago and take this experience as current argumentation base. But ok, lets focus on the other technologies out there. What do we have:
- Serverbased Swing Frameworks like Canoo ULC or Casabac
- Eclipse Rich Client Platform
- XUL based Applications
Lets start with Canoo ULC and friends. Here you have replacement classes for all major Swing components. The application will be deployed on the server and the swing objects have something like a stub/skelleton architecture. Why i dont like this approach:
- creating own components is harder because you have to know the HalfObject Pattern
- you are dependant on a company providing you with latest Components on each Swing update
- programming is different, because modal dialogs are not as easy to implement as in "plain" Swing deployments.
- You still have to distribute and deploy software (the framework Runtime), just not as much as in a traditional Rich Client (Fat Client - but people tend to avoid that name, because it sounds so 90s like) environment
- what about the hughe Swing 3rd party component library base?
Then we have the Eclipse Rich Client Platform. I ranted about SWT some time ago but being a platform, this is of course more than SWT. The buzzwords here are: Perspectives, Views and everything built in about minutes. If i were a tools vendor, i would also focus on Eclipse RCP, not because the framework is the best i ve ever seen, but because Eclipse is a mass market. But i am speaking with the view of a business focused application developer, where i certainly dont need too much perspectives and views as seen in Eclipse. Some more annyoing things:
- still dependant on IBMs platforms Widget Binding support.
- not cross platform
- API looks procedural and MFC like
And please, dont use the word performance when you compare Swing with SWT. Yes, in theory SWT is faster, but there are not much GUI programmers out there really fighting with (re)drawing screens but with hughe database calls and crazy price calculations. And remember, even in SWT not everything is native.
Then we have the XUL approach. I personally dont think that describing a complete GUI in XML is that clever idea. Ok, we have the performance penalty but this is not my point, but how descriptive can it be to have a monster XML with textual gui element descriptions (any tools available?).
After all i am happy to use Swing, because here we have:
- a very nice distribution framework (no need for serverside anything)
- complete freedom of creating my own components
- hughe component base and with JGoodies are world class framework
- clean API with good MVC base patterns
So guys, wake up, we have 2005 and the current Swing is the best Swing ever.