Can Spring and SWT work together for Java Desktop Applications?

janetsmith picture janetsmith · Jul 6, 2009 · Viewed 7.5k times · Source

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.

Answer

John Doe picture John Doe · Jul 6, 2009

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.