Gary Shea wrote:
> Hi --
> 
> I've been working on a Swing app and trying to figure out good ways to
> structure it.  At the local level in the UI, say for a collection of
> buttons that want to be functionally grouped together, the natural structure
> seems to be MVC.  Typically V and C are UI-specific classes, and
> the model class or classes are problem-space specific and filter in
> from the application core, and are therefore not local to an MVC 'unit'.
> A controller can manage a 'sub-controller', so [M]VC units nest in a
> tree structure.
> 
> Given the tendency of my clients to revise the UI, I want the units to
> be as independent as possible.  I have been looking for clean ways to
> package the units, and Avalon has of course come to mind.  A few issues
> come to mind.  One, packaging an MVC unit as a component could be a
> rather small scale for COP.  I don't have enough experience with Avalon
> to know in advance if this is a bad idea.  Issue two is IOC and app <-->
> UI communication.  When a button is pressed, an event is generated, and
> may be consumed in a variety of places in the heirarchy as well as in
> the app core.  Moving that event through component interfaces would
> violate IOC.  I'm thinking of an 'event service' component to address
> that issue.  Sort of a local communications backbone orthogonal to both
> the UI and the application core.  I recently realizd that I've done
> exactly this in a previous project, but with the CORBA Notification
> service!
> 
> I'd appreciate any thoughts.

I did an avalon-based GUI Swing framework called Monarch 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/krysalis/krysalis-monarch/, 
and it works quite well, but it's not yet finised.

It defines coarse grained GUI components-apps to be run in the 
Container, which gives them standard services: resource finding, icon 
resolving, eventbus, activation, etc.

The components are divided into Tools, Sheets and Holders.
Holders are Containers, Sheets are the views, Tools are the Controllers.

When an object is selected, the activation service is called and the 
appropriate view and tools are called on it. It's possible to switch 
views-apps via a tabbed interface.

I'd be happy to explain you Monarch better if you are interested, and 
it's OS Apache-like license.

-- 
Nicola Ken Barozzi                   [EMAIL PROTECTED]
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to