views:

1341

answers:

3

Hi,

I am going to design Java Desktop Application. While I was design web application, I got plenty of choice, e.g. Spring, Strut etc. However, for Java Desktop (which is new to me), I don't find any.

Is that Eclipse RCP a Java Desktop Framework, which works like Spring mvc in Web apps? I wonder, can I use Spring to enjoy the benefit of IOC, together with Eclipse RCP to enjoy the benefit of both world?

Please advise. Thanks.

A: 

You realize, of course, that SWT is not portable the way that Swing is.

Yes, you can use Spring with SWT, but there's no built-in MVC framework to help you. You might find the Spring Rich Client module helpful.

Here's a simple example - one person's opinion.

duffymo
SWT is portable enough for the most important OS (windows, mac, linux). Even WPF integration is working and MS is working together with the Eclipse Foundation on that.
lostiniceland
It's still native code, not 100% Java. It's as portable as C is. The point about Spring Rich Client still stands, regardless.
duffymo
A: 

You definitely can use Spring and reap the benefits of its various features including IoC. Spring is definitely not confined to the webworld, that's one of its great selling features is it's the swiss army knife of Java frameworks.

ThaDon
Can you give me the link showing how to do that? I cann't get any info / example from google.
janetsmith
+2  A: 

In java desktop land, you have 2 major choices : Swing or SWT. I'm ignoring AWT on this one. QTJambi is not that used in Java.

Most Java desktop applications use Java Swing. Nothing is preventing you from using an IOC container in a desktop application. In general, IOC container are used mostly to store event listeners, actions in desktop applications and barely UI components.

There are many attempts to create Swing RCP frameworks but most Java desktop applications kind of roll their own.