Swing, Eclipse RCP or which way to go? - java

I'm a developing primary Java webapplications at work. I would like to start creating a little java desktop app. It should be a simple CRUD app with database connection, 2 - 3 forms and a smart stats page. To be honest: I'm kinda lost in this topic. I've took some time to guide through swing but the tutorials are all old and most of the stuff seems to be very unhandy. Aren't there any swing frameworks or somethingelse?
Vogella gives a good introduction into Eclipse RCP development but this all seems too much for my use at home.
What I'm searching is a easy/light way to create a desktop app. Which options are available in this topic? Would be glad if someone could share some experiences with Swing or Eclipse RCP and if its worth to spend time into getting in of this.
Thanks

For a simple application like yours, Eclipse RCP is just overkill. Its a very high level framework. SWT is a good option. If you have any experience with Swing or SWT, I suggest you stick to it. You should also look into MiGLayout.

You might consider JavaFX. I haven't yet had time to try it myself, but I hear good things about the ease of use and capabilities.

Eclipse RCP is quite straightforward IMHO, you could always start with a Mail Template from the new Project Wizard. If youre looking for sth a little bit more lighweight you could try Spring Application Framework. e4 makes it considerably easier to develop RCP "on the fast lane". You could try this excellent Vogella tutorial

If you don't mind using Groovy try Griffon.

I am in the process of porting my Swing database application to the Netbeans RCP Platform.
The Netbeans RCP is similar to Eclipse RCP but it is fully based on Swing (Swing ships with the JRE/JDK , so it is more platform independent).
If you are a beginner to Swing, I would certainly recommend using the Netbeans RCP because it automatically solves a lot of beginner's problems and enforces good practices. It also has some powerful GUI elements (like Outline, option-button) which are not present in plain-Swing. The netbeans.org has ample video tutorials to get started.
Also, with the Netbeans RCP, you get some extra goodies which may come useful, like modular JavaHelp integration for online help in the client.
Also, Netbeans can generate easily deployable Webstart package or platform-dependent installers for deploying the desktop app (I recommend Webstart, that is the easiest way to distribute your application, only Java needs to be installed beforehand and that is usually doable even for the dumbest of users).

Related

what should I use eclipse rcp or eclipse scout?

i am planning to develop desktop application using java code, and wanted to use any ready
made framework and then i got know about eclipse RCP / eclipse scout but i am in doubt that which framework should i use whether eclipse rcp or eclipse scout ? could somebody suggest me please.
first of all I'd like to add another option: Eclipse Riena.
Eclipse Riena is comparable to Eclipse Scout as it is based on Eclipse RCP and provides some useful abstractions. You should have a look at it.
But to give you some help deciding which one to use:
If you are doing your first steps in Eclipse RCP, I would suggest that you first get your hands dirty with a little bit of plain Eclipse RCP. There is some complexity which will get back to you if just start with a higher level framework like Scout/Riena.
Depending on plans with your desktop application, this might already be good enough.
Scout/Riena do help you with more advanced topics like reuse/standardization, remoting, proven application architecture. But like most frameworks, you lose some flexibility.
What I especially like about Eclipse Riena:
Focus on easy to use GUI (will not fit for every project)
Abstraction over SWT/JFace (Ridgets) provides nice facility for controller tests, rendering the need for GUI tests to a minimum
Nice API to (dynamically ) structure and validate your application
Simplify remoting (no Java EE container dependencies on the client)
You can use parts of Riena independently. Say you can use the ridgets without adding the whole bunch of other perhaps not needed stuff.
What I like about Eclipse Scout
Strong focus on integration in Java EE environment
Wizards all over: Quite simple to create a first and second shot of your GUI
Supports swap of your GUI technology: You can move from SWT to Swing quite swiftly, though I wouldn't bet that is easy for a large application. ;)
HTH
Regards,
Holger
I can't comment/judge about your comments regarding Riena. However, I'd like to add some comments/clarifications regarding Scout
The fact that Scout comes with the Scout SDK tooling is a big help to beginners. This makes it ideal to get started with writing desktop applications. As the output of all the wizards is only Java code and some needed wiring in plugin.xml etc. it means that you're free to do Scout applications without using the Scout SDK (you can even have mixed teams working on the same code). This is possible as the Scout application model is just a bunch of Java classes.
Holger rightly mentions that you can swap the UI technology with Scout applications. This is possible as the programmers writes the model of the UI. For each supported UI technology (currently Swing, SWT, RAP (for web applications)) a specific plugin will actually draw the UI depending on the available UI model. This is a very clean separation of the UI technology and the application model. Therefore swapping works even for very large applications (Of course there are some exceptions to this rule: If your desktop application has some Microsoft Office integration part on the client side you will find it hard to support that in a web application).
Try some of the Scout tutorials and let us know what you think in the forum.
Best regards
Matthias

How can I create a single window application using NetBeans Platform

Is NetBeans platform for creating only rich client applications or we can also create single frame applications? There is a wizard for Swing Application Framework based application, but is this possible to create the same single frame application using NetBeans platform. If yes, then please guide me how can I create one. Thanks.
First of all NetBeans is a impressive, powerful but complex platform to build java gui applications.
The main problem of all development platforms is, that there are some trade offs to be made to unleash the real power of the platform.
It is hard to tell if NetBeans Platform is an overkill for your needs. But the introduction videos and tutorials are great instruments to get a feeling of the programming model and runtime environment. They helped me a lot at the beginning.
If you have concrete questions afterwards feel free to ask.
Netbeans Application quickstart guide

Netbeans JSR-296, Swing and JavaFX, what are we now meant to use?

I am starting to learn Java development (I used to develop in C++), I am using some older materials, however, I would also like to keep up to date with Java developments and recommendations.
I did some background research regarding Swing and JavaFX. I learnt that development on JavaFX script has stopped, however, version 2 of FX is in development so I am not sure what this will end up being as I thought the scripting as a major part of the standard.
When using Netbeans I discovered that further development on Swing is to stop and too is Netbeans support (JSR-296). Netbeans recommends moving to the Netbeans Platform API which I am reluctant to do because I want to learn Java as a true cross platform language and not be tied to any particulars.
This begs me to ask the question what is the preferred new approach to deveping GUIs in the Java world?
You will probably find the Wikipedia page about JSR-296 informative.
Swing is an API that lets you work with various graphical 'controls'. You can arrange them is any number of ways to create a GUI for your application.
The Swing Application Framework (JSR-296) was and effort to create an API that would create a 'standard' way of writing applications, that would use Swing to present the UI.
The NetBeans Platform is a different effort with similar goals to JSR-296... though it does encompass some other areas, like modularity. The NetBeans IDE is built on the NetBeans Platform. The NetBeans Platform uses the Swing API to present UI.
SWT is an API at a similar level of abstraction as Swing.
The Eclipse Rich Client Platform (Eclipse RCP) is another application framework. The RCP is based on SWT. The Eclipse IDE is based on the Eclipse RCP.
You should know that:
You do not need to use the NetBeans IDE to create an application based on the NetBeans Platform.
You do not need to use the Eclipse IDE to create an application based on the Eclipse RCP.
Swing (Java) or SWT (Eclipse) - both are very much alive.
JavaFX should be considered a failed distraction of Sun's (now Oracle's).

Eclipse RCP application without Eclipse GUI

I'm working on a swing application. I don't want to migrate it to SWT, but I'd like to use some benefits of Eclipse RCP application. Especially, I want to use the update technology to distribute application updates.
It would be great if you knew a tutorial on how to build an Eclipse RCP application that can start a custom GUI based on Swing.
Uhm... I don't think you'll be able to get there with the eclipse rcp...
There's a lot you'd have to adopt, including the whole OSGI structure for your app -- if you're unwilling to change your UI toolkit you've probably already got too much infrastructure in place to want to adopt that much of the RCP.
If it's just swing your married too for whatever reason, look into the netbeans rcp.
If it's just updating you want... there's more then 1 sparkle implementation for java.
Check this:
http://www.eclipse.org/articles/article.php?file=Article-Swing-SWT-Integration/index.html
However, I strongly advise against using them. You will end up with a lot of issues with platform independence. If you're just aiming at Windows, you might be fine.
I agree with lscoughlin, you're getting way too much overhead for that bit of functionality. You can always try to take the bits you need out of the Eclipse/Equinox project, thereby building a leaner solution. Be aware of licensing then. Looking at some parts of the code for inspiration can be helpful too, but it's a huge project.
Tough task... but you can try qwylt.
It is a framework based on Equinox (Eclipse OSGi implementation). Hopefully it will provide enough functionality for you.
Generally your request could be realized with the new Eclipse 4. In the new model all graphical output is done with so called Renderers which render the application model into the grapical output you see with your application. Lars Vogel has a Tutorial on those and Kai Tödter even did a brief article on different renderers in JavaFX 2.0, Swing & SWT Renderers for the Eclipse 4.x Application Platform.
He also did a basic SWING renderer which is available on https://github.com/toedter/e4-rendering I can however not tell on how stable this renderer is and to what extent it covers all application model elements provided by e4.

RIA platform like Netbeans RCP

Does anyone have any experience with a really good RIA platform. I'm going to begin developing an application, and I intend to use Netbeans RCP for the thick client. I'd also like to create a RIA version of the same app. I've looked around for a RIA framework that rivals what you can get with the Netbeans RCP, and really haven't found one. My requirements are as follows.
Modular - I would like to be able to add and remove features without recompiling
Out of the box features - I'd like to have feature out of the box that are similar to Netbeans RCP (or most any other RCP), such as a menu system built in, a windowing system (allowing docking and remembering where windows were between sessions), Authentication and Authorization support out of the box, as well as the "Options' pane support (I really like how I can add amodule, and have that module expose options through the standard "options" dialog).
Actions and commands - I'd like to be able to handle actions from other modules without needing to couple the action to the other module.
I would like to deploy the app through GlassFish, but that's not a deal breaker.
Modern - the framework should use the latest standards, and I'm planning on moving to J2EE7 as soon as I can, so the platform must be actively updated to support such a migration.
I'm willing to pay, but the license must not be "per server" or "per instance"
Java isn't a must but I'm planning on using java for the rest of the app (services layer) and the Netbeans RCP front end.
I've been a .net developer for the last 6 years, and have just recently looked into the world of java, and I'm really amazed at the rich community, I thought .net had a large open source community, but the java one is orders of magnitude bigger. I don't know of anything even close to the Netbeans RCP in the .net community, let alone a RIA version.
I've looked at a few frameworks, but most of them seem to be mostly libraries that you can use to build applications, I really don't want to spend the time and maintanance cost to build the infrastructure listed above. Things I've looked at are....
Tepestry
"SmartClient"
GWT
Wicket
These all seem to be good building block, but I want an out of the box solution. The application will be mostly CRUD operations, but I will also be streaming video through the app, as well as handling alerts and events from the server.
Thanks for any advice
Joshua
Eclipse with the GWT plugin is fairly easy to get running out of the box. Step through the GWT tutorial first and you'll be ready to go. I realize you've already looked at GWT but the Eclipse plugin simplifies a lot of grunt work.
Indeed. GWT Eclipse plugin simplifies compilation, depoloying and running them (Jetty). It also has App Engine support.

Categories

Resources