Menu

#7 Support Grouping of Related Messages into Packages

open
None
5
2006-09-14
2005-11-28
No

One should be able to group related messages into
seperate Java packages.

For example: If you have a user management system which
groups users into different roles, you might have the
following messages to modify your user base:

UserCreate
UserModify
UserDelete
RoleCreate
RoleModify
RoleDelete

If your project grows and the number of messages
increases, you end with a very large package which is
very hard to manage visually. Therefore it would be
nice if the message definitions could be marked with
some kind of "scope" which is appended to a "base
package" definition.

So the UserCreate, UserModify and UserDelete messages
would have their scope set to "user", while RoleCreate,
RoleModify and RoleDelete would be in the "role" scope.
If the base package was set to
"net.sf.messageforge.test", the generated classes would be

net.sf.messageforge.test.user.UserCreate
net.sf.messageforge.test.user.UserModify
net.sf.messageforge.test.user.UserDelete
net.sf.messageforge.test.role.RoleCreate
net.sf.messageforge.test.role.RoleModify
net.sf.messageforge.test.role.RoleDelete

respectively. If the scope was not set, the empty scope
is assumed as fallback, so that the messages get
generated to the base package preserving backwards
compatibility.

Of course, hierarical scopes like "aaa.bbb" should be
possible, too.

Discussion

  • jawaid hakim

    jawaid hakim - 2006-09-14

    Logged In: YES
    user_id=660743

    Good suggestion.

     
  • jawaid hakim

    jawaid hakim - 2006-09-14
    • assigned_to: nobody --> hjawaid
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.