|
From: <sam...@ma...> - 2004-03-04 11:18:19
|
This might be a little too RCP specific, but I'd like to avail myself of the knowledge here. As you may be aware I've been working on a spring-driven command framework view a view to integrating it into the RCP project. Based originally on my attempts to properly implement Spring into XWork, its a fairly simple framework. You define Command objects in your applicationContext, then bundle them all up as Proxies using a single BeanNameAutoProxyCreator (outlined here: http://www.magpiebrain.com/archives/000187.html). Anyway, I have a few design issues: 1.) Using a ValidatorRegistry and supporting ValidatorInterceptor, I can apply validation rules to specific commands easily enough. The fact that I'm using a BeanNameAutoProxyCreator however opens the developer up to the danger that they might forget to apply the ValidationInterceptor even if defined. Is the best I can do to safeguard against this just to document it well? 2.) Ideally, I want to completely decouple GUI interaction from the Command into an XWork-like Result object. The Command executes, and depending on the return value the correct Result object gets executed. Again I'm thinking of using an Interceptor to grab the result and execute it. Does this make sense to you? 3.) So far, none of what I have done apart from the creation of a SwingActionFactory (which creates javax.swing.Action classes to invoke Commands) is actually dependent on the use of a rich client - it would as far as I can see work equally well for a web interface. This is unsurprising given that much of the design was inspired by XWork, which forms the basis for WebWork. Whilst the focus of this project is certainly to support the RCP project, is it worth me trying to keep the design abstract enough to support the use of web clients? Anyway, I hope to have an example Swing GUI using the Command framework that people can download and have a play with quite soon. sam |