问题
I am reviewing currently a medium size code base (around 30K LOC) which uses a huge Applet and interfaces with other systems.
It's a tool to create custom labels, so we need drag-n-drop and other related UI components.
To which technogly will you migrate given the code base is in Java.
- Applet -- No
- Java FX -- Adoption rate is too low
- GWT -- Refactoring is not easy
Any ideas/suggestions.
回答1:
Why do you need to migrate this ? Because of drag-n-drop ?
Perhaps you should look at running it as a stand-alone Java application and use Java Web Start to serve it up. I think the coding changes should be minimal to convert it from an applet.
回答2:
Use AjaxSwing to automatically convert your applet to web application. You may have to write your own drag and drop but you'd have to do it with any other framework. At least you get the rest without doing any coding.
http://ajaxswing.com
回答3:
Your question is a bit hard to understand. As far as I know JavaFX and Applets share the same technology.
I use GWT frequently and I believe it is quite easy to migrate from Applets/Swing to GWT. But you can only use a subset of the java libraries, so don't expect that you can just compile a SWING app and run it with GWT. Some things are just not doable in the browser so you might need to move some of the code to the server and leave only the UI layer in the browser.
What do you mean when you say it interfaces with other systems ? If you need to connect to other machines from the applet/browser then don't forget that GWT is just JS so it has the same origin policy that would block this. There are possible workarounds for this, but that will cost you some extra work.
回答4:
I will suggest you GWT coupled with a good UI library (for ex. Ext-GWT, aka GXT). I think that with a good UI library migration is not so difficult. Bye Claudio
来源:https://stackoverflow.com/questions/1728379/migrate-java-applet-to-what-where