Is there anyone who have used GUTS(GUICE UTILITIES TOOLS SWING)?
We have a huge Java Swing application. Now we want to remove couplings from all the components so that we can reuse them.
I came across this tool called GUTS which is based on GUICE for Swing applications. Has anyone used it?
http://kenai.com/projects/guts/pages/Home
It will be better if I go for this tool for decoupling components code and better manageable Swing app? Or some other tools some of you might know.
One more tool is there that ease GUI building effort but not possibly reducing couplings between components.
http://code.google.com/p/javabuilders/
So what do you think w开发者_Go百科hich should be better. Please give some insights on this if any of you came across this kind of design dillema.
Thanks in advance.
Given that your Swing app is 'huge' I'm also assuming that you work on the project with several other people, so if that's the case, you have to bear in mind that they will need time to learn one of the two.
With the GUTS project, everything is (almost) pure Java, so there is no new language to learn, but you will introduce new external dependencies to the project and also require people to change their coding style to work with the new libraries. Also, dependency injection, while more common these days, is still an additional layer of complexity to add to your project.
In my very humble opinion, if you and your team know enough about Swing and general good practice in GUI creatiion, you will probably find it safer and easier just to refactor your existing code, writing custom utilities and components where needed. You can start doing that straight away without needing to invest time in learning something new, and the result will be something standard and fairly easy to maintain in the future.
JavaBuilders is a very interesting and promising solution and it does exactly what you want - the decoupling of layout from business logic. However, you have to sacrifice compile-time correctness and your developers will need to learn YAML (and also the proprietary style of YAML specifically used in JavaBuilder). Also, as the documentation says, no code completion is available yet, so things might be difficult to start with. Also, JB will only be 100% useful if you either use standard components, or all your custom components are as decoupled as the standard ones. To use custom components, some pre-configuration is required.
You might take this path if you're working by yourself or in a small team, willing to spend a week or two learning it through and through, and then rewrite each part of your application from scratch.
精彩评论