I am building a desktop application on JavaFX 2, and want to speed up my development --
Is RCP the way to go? How steep is the learning curve?
There is the eFX project which tries to adapt the NetBeans Platform for JavaFX.
From what I know about the NetBeans Platform source code, I doubt though that they managed to get rid of the Swing dependencies. (This might be important once you want to deploy your application to a platform which doesn't support Swing. See: Compact Profiles and Project Jigsaw).
Also it uses the NetBeans Platform module system rather than OSGi (many Apache Commons libraries as well as other libraries come with OSGi meta data but not with NetBeans Platform meta data). There is a way to run OSGi bundle in a NetBeans Platform though, but, of course, this would mean that you have to know 2 module systems.
I also don't know if the NetBeans Platform Maven plugins work with eFX or if you have to use Ant.
As an alternative also note that (mainly for the concerns mentioned above) I've recently released an initial Early Access version of Drombler FX, a modular RCP for JavaFX based on OSGi and Maven (POM-first):
http://puces-blog.blogspot.ch/2012/12/drombler-fx-building-modular-javafx.html
http://wiki.drombler.org/GettingStarted
Related
I am maintaining a Java application developed using Java SWT. This application uses the Eclipse Help System.
I have an Eclipse Help plugin developed and I would like to reuse it.
The current solution packs the help as a "Standalone help" as is described in Help Eclipse documentation. In this way an independent Eclipse Platform Runtime has the Help plugin and my application make API calls from its Help.
(The help works properly). The drawback of this solution is that a complete Eclipse platform is included (and distributed).
I would like to avoid the use of the "independent Eclipse Platform Runtime" and I wonder if it would be possible. I.e. I would like to avoid the distribution of the complete Eclipse platform which is in fact bigger than the application I am maintaining.
A possible solution would be to use Javahelp instead, but Javahelp uses Java Swing and my Application is uses Java SWT.
I’ve created an RCP project that calls the Help plugin.
Would it be possible that my Java application calls to the RCP project and
the RCP project calls to the help without needing any additional action like push a button?
Another problem that I have observed is in order to call help plugin from RCP project, the RCP project needs to show its window. Is possible to avoid this?
We develop a huge set of OSGi bundles based on Equinox and start it within Eclipse with a "OSGi Framework" launch configuration. The start of the framework with all necessary bundles and data takes 1-2 minutes which is the reason why we used DCEVM and JRebel to hot-deploy changed classes.
Now with Java 8 these methods do not work properly any more (DCEVM is available for Java 7 only, and JRebel has too many limitations - freezing debug sessions, no support for added instance fields etc). Since our application is quite modular, I imagine an Eclipse function (via plugin?) that monitors the workspace for class changes and restarts the affected bundles after the incremental build is finished.
Are you aware of some tooling that might help for this task?
Bndtools provides such an environment. It is also superior to the eclipse plugin perspective in a lot of other ways. For example it has great support for declarative services.
DCEVM supports java8 now. Lets look at https://github.com/dcevm/dcevm
If you need hotswap support Eclipse RCP/OSGI you can use https://github.com/HotswapProjects/HotswapAgent It has module for Eclipse OSGI.
Well im into building OSGi application for a while, but i can't really find some tutorials which show the way to build Desktop Application ( in any languages ) with OSGi/Karaf.
I want to use karaf because it can then wrap Felix/Equinox. Most of Tutorials i found are about Enteprise Application(WEB). So is there any tutorials, which talk about building desktop application based on OSGi/Karaf?
Here is an example of a GUI application project that uses Apache karaf:
https://bitbucket.org/lorainelab/igb-fx
Using karaf to run a gui-based desktop application decreases development time. A developer makes a change to a bundle, builds the bundle, and then uses karaf shell commands to reload just that one bundle into the running application. There is no need to restart the entire application to view the effects of the new code. This is why were are using it.
We are using OSGi because we want greater modularity in the code base and because we want to support dynamically loaded "Apps" developed by 3rd party developers who write against our genome browser API.
Sorry the main intend right now for Karaf is to be used as a Server, though it still should be possible to start some guis on top. As your already familiar with building such bundles I'm sure you most probably could use just the minor version of Karaf and place your bundles in it. I have to admit I never done this before, so I'm not really sure about it.
First of all OSGI is a component framework, it also leverages a feature missing in Java since its inception - runtime versioning. If you really need it (OSGI), it doesn't depend wether you develop a WEB or desktop application. In general I would recommend you to take a look at this documentation:
http://fusesource.com/docs/esb/4.2/deploy_osgi/Build-ModifyMaven.html
In that link you'll find how to convert an existing Maven project to bundle, check further chapters - there's info how-to deploy jars in e.g. Karaf (Karaf is an OSGI container)
Hope, this helps
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).
Basically, I want to mix in Java and Web (JavaScript, CSS, HTML, PHP, .NET, etc..) into one. So what is the best IDE for that?
Since I'm a huge fan of Eclipse, I'd like to move from Dreamweaver to Eclipse for my Web Development. I love using Eclipse for Java development but I want to be able to maintain the functionality of Dreamweaver in Eclipse... so I want to incorporate the Web Tools Platform into my environment.
What is the difference between Eclipse IDE for Java Developers and Eclipse IDE for Java EE Developers? Could I do Java and Web with Eclipse and if I can, is it done with either of the above 2 packages?
Thanks!
What is the difference between Eclipse IDE for Java Developers and Eclipse IDE for Java EE Developers?
Actually, there is a comparison of all packages on Eclipse website. In short, Eclipse IDE for Java EE Developers is targeted at server side development and extends Eclipse IDE for Java Developers by including the following additional packages:
Web Tools - server-side development support
Java EE Tools
RSE (Remote System Explorer) - remote (mainframe down to embedded) systems support
EclipseLink - JPA support
PDE - for plugin development
Datatools - database support
(...) so I want to incorporate the Web Tools Platform into my environment.
It is part of of Eclipse IDE for Java EE Developers. If you decide to go for Eclipse IDE for Java Developers, you'll have to add it.
Basically, I want to mix in Java and Web (PHP, JavaScript, CSS, HTML, etc..) into one. Could I do that with Eclipse and if I can, is it done with either of the above 2 packages?
I would get Eclipse IDE for Java EE Developers (for simplicity sake) and install PDT on top of it.
Eclipse PHP Development Tools has all-in-one downloads available here :) http://www.eclipse.org/pdt/downloads/
Make sure to download and install the PHP debugger from that page as well to get the integrated debug working in Eclipse.
I was a die-hard Eclipse fan for years. I used Eclipse since 1.0 and on through to Eclipse 3.4. I was obliged to switch to IntelliJ at work as part of standardization. I have found that IntelliJ has much better support for web development.
I suspect that JetBrains PHPStorm http://www.jetbrains.com/phpstorm/ is probably a very good web development environment based on my experience with IntelliJ for JSF. The JetBrains guys know how to make a good User Experience.
You can use Yoxos - http://eclipsesource.com/en/yoxos/yoxos-ondemand/ to customize your need.