Search code examples
javagroovylegacyportinggriffon

How to replace existing Swing UI module with Griffon based one in a legacy Java application?


The application that I would like to revamp is pretty well organized. UI is separated into a module. UI controllers implement the interface PropertyChangeListener. When other modules want to have something happened in the UI they just fire PropertyChangeEvents on UI controllers not being aware what is behind them. Current implementations of injected PropertyChangeListeners could be easily replaced with Griffon controllers implementing the same interface.

Calling Java methods from Groovy is not a big deal so the communication from UI to the rest of the application shouldn't be a big deal.

Are there any tutorials or written down experiences with porting UI modules written in Swing to Griffon framework?


Solution

  • In the upcoming Griffon 0.9.1 you can write model/view/controller artifacts with pure Java. So, maybe it will be a good start point to port your application to Griffon. Check out details here http://docs.codehaus.org/display/GRIFFON/Griffon+0.9.1#Griffon0.9.1-NonGroovyArtifacts