Is there a good framework for Java desktop applications? [closed]
Asked Answered
H

6

34

I have developed many desktop applications in Swing, even those a bit more complex, with Hibernate and Spring integration. I found out that many things repeats and should be done quickly and in convenient way, like application lifecycle, logging, alerts, authorisation, forms and their validation. I started looking for frameworks. I met Swing Application Framework which is dead since several years, as it turned out. Spring RCP really met with my expectations, especially creating forms basing on Java Bean model is what I liked, but I realised it is dead too. Netbeans RCP is not for me, I am using Eclipse and I don't want to use another IDE for desktop development. I am not really excited about Eclipse RCP, I got feeling that it is too Eclipse oriented, I would prefer something low coupled to any tool, besides it is not so straightforward to learn.

I am surprised that there is so weak support for developing desktop-based business applications in Java. It's like Java was only used in web environment. What is the preferred language for making such apps then? And if I want to stay with Java, is there a chance to find something similar to Spring RCP (so far I couldn't)?

Hangman answered 19/1, 2013 at 1:26 Comment(0)
C
12

i asked a similar question some time ago, see Swing desktop-development if you are interested.

My conclusion was/is that there simply are no frameworks that can do for your desktop-application, what any of the bazillion great WEBframeworks can do for your webapplication. It seems absurd, but in my experience due to the great web-frameworks and the lack of desktop-frameworks it has become much easier to develop a webapplication.

I have been using Spring-RCP for 2 projects. It was great, but is pretty much unusable nowadays, because you are stuck to spring 2.5 with it. Also it "feels" a bit slow to me and is really memory hungry on 64-bit machines, which is a Spring-Swing problem most likely: https://jira.springsource.org/browse/SPR-9628

I waited for Project Valkyrie, but it seems to be dead already

I think you will not find anything that completely covers your requirements. http://swingx.java.net/ could maybe offer you a few GUI-Widgets, like JXDatePicker. I also recommend JGoodies Binding and JGoodies Form, both are great. IF you use a client-server application i highly recommend using Spring-Remoting (e.g. HTTP Invoker) with Spring-Security. Really makes things simpler.

I enjoy developing desktop-apps with Swing, but unfortunatly you really have to "go the extra mile". Client-Server-communication, security or even validation are only a few examples of the many things that seem overcomplicated these days (compared to modern webframeworks). Also you might find out that it is not as easy to automatically build, sign and deploy an application with java-webstart as it should be.

Spring-RCP was the closest thing to a "complete" desktop-framework that i found so far and it has been dead for years.

Good Luck!

Colligan answered 25/1, 2013 at 17:59 Comment(0)
T
11

Please try griffon. This is based on groovy language and inspired by grails framework. It runs on JVM, language is very much friendly for java programmers.

Quote from the site

Griffon is an application framework for developing desktop applications in the JVM, with Groovy being the primary language of choice. Inspired by Grails, Griffon follows the Convention over Configuration paradigm, paired with an intuitive MVC architecture and a command line interface.

.... The architecture is very much extensible.

The Griffon framework is extensible via Plugins. There are many to choose from. For example you'll find plugins for 3rd party Swing components like Swingx, Jide and Macwidgets; persistence related plugins like DataSource, GSQL, Hibernate among others; 3D graphics and animation support is possible via JOGL, LWJGL and Processing. And many more!

Truong answered 19/1, 2013 at 2:16 Comment(0)
C
10

It mostly depends on the size of the application.

For smaller and medium sized apps it makes sense to use JavaFX 2 that does not use a differnt language, you can start of by some of the basic tutorials .

As you have mentioned for Enterprise level application Eclipse RCP and Netbeans RCP are a good pick.

Netbeans RCP is lot simpler for development, you should not dismiss it just because of the IDE preferences. There is a free book about it that is a good starting point.

There is also the option of e4 that should be significant improvement for eclipse but I can't say that I have used it yet

Related resource worth looking might be :

http://netbeans.dzone.com/why-from-eclipse-rcp-to-netbeans-platform

Netbeans RCP vs Eclipse RCP

Cyano answered 19/1, 2013 at 1:58 Comment(0)
D
5

Check out JGoodies. Not only is the Look and Feel much better they also offer a framework to design Swing apps.

The big issue when it comes to desktop applications is that it really depends on what you're trying to design. Unlike webapps where it's webpage->request->webpage, desktop application can pretty much do anything. There is no standard cycle, even for business apps. It's much much more like AJAX than say your normal Java EE or PHP webapp. And how many AJAX libraries actually offer a framework other than calling and updating specific components.

You could have menus, buttons, panels being updated, things being rendered on the fly, graphs changing, data being updated, etc.

If you're just looking for forms, then JGoodies is probably your best bet.

Dachi answered 20/1, 2013 at 9:8 Comment(2)
Do you mean their free libraries or commercial products?Hangman
Both OR either depending on your specific needs.Dachi
S
1

I don't know of any framework as such, but Netbeans provides a drag and drop wizard for Swing components. Eclipse also has similar plugin but it is based on the Netbeans plugin.

Schipperke answered 19/1, 2013 at 1:44 Comment(0)
D
1

I found out that many things repeats and should be done quickly and in convenient way, like application lifecycle, logging, alerts, authorisation, forms and their validation.

I'd recommend to extract these into your personal "Core" library that you can share and use across all your projects. Since you already implemented the things you're talking about, it should be easier to generalize them than study a completely new framework. Probably, a private Maven project?

The development focus is moving towards Web and Mobile, so we shouldn't expect any considerable efforts from framework vendors for Desktop.

Discoverer answered 25/11, 2014 at 20:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.