« Return to Thread: Re: [spring-desktop] Action module design

Re: [spring-desktop] Action module design

by Kevin Day :: Rate this Message:

Reply to Author | View in Thread

Does anything need to be done at this phase to ensure support for an undo/redo handler downstream?  Probably not, but I wanted to ask.
 
Swing uses a class called ActionMap to group actions together, and to provide hierarchical groupings of Actions.  The functionality here may or may not have applicability (the problems it attempts to solve may be addressed by Spring).  The interceptor may cover the need for hierarchical groupings (and make things more decoupled).  I'm just bringing this up in case there are any lessons that can be learned from that approach.
 
- K
 
----------------------- Original Message -----------------------
  
From: "Peter De Bruycker" peter.de.bruycker@...
To: spring-desktop@...
Cc: 
Date: Thu, 17 Jul 2008 06:41:18 +0200
Subject: [spring-desktop] Action module design
  
Here are some thoughts on the action module:


The rcp commands are too complicated. Take a look at the org.springframework.richclient.command package and you'll see what I mean (I think this is one of the areas Keith was referring too when he said we need to simplify).

Action vs Command
---------------------------
The command framework was modeled after the Eclipse command system, hence the class names. I don't really remember why we didn't model it using javax.swing.Action, but I guess it has to do with the CommandGroup. I looked at the code, and I don't see any real reasons not to use Action. I also don't see any problems injecting the resources.

The Action interface defines the "ACTION_COMMAND_KEY" property that we can map to the bean name.

This means we can also handle arbitrary Action implementations loaded in the application context (using @Component, definition in the app context, ...), intercept them using a custom Bea nPostProcessor, and inject resources/dependencies into them, ...


CommandInterceptor
-----------------------------
Allows interception of command execution, ... a keeper.
This would become ActionInterceptor.


CommandGroup
----------------------
Also a keeper. (would become ActionGroup + ActionGroupMember)
It allows logical grouping of (related) commands/actions. Combined with a CommandGroupModelBuilder, it can be used to create a menubar with populated menus, a toolbar, popupmenu, button bar, ...


Task
------
jsr 296 defines the Task concept, to spawn a background thread to execute long actions. Combined with Spin (http://spin.sf.net) you can have transparant background threading
You can also build a "TaskManager" or task watcher, that gives you a list of running/finished tasks, allowing you to cancel tasks, ...


I don't know who will take the lead of the action module (I thin k Lieven may be interested), but it's important to have a (working) prototype asap.


regards,

Peter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Spring-Desktop" group.
To post to this group, send email to spring-desktop@...
To unsubscribe from this group, send email to spring-desktop-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/spring-desktop?hl=en
-~----------~----~----~----~------~----~------~--~---


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Springframework-rcp-dev mailing list
Springframework-rcp-dev@...
https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev

 « Return to Thread: Re: [spring-desktop] Action module design

LightInTheBox - Buy quality products at wholesale price!