[Opensim-dev] Organization and naming patterns of commands on the console

Stefan Andersson stefan at tribalmedia.se
Thu Feb 5 18:28:06 UTC 2009


Just chipping in my 2c:
 
How about the modules are supposed to register the 'command' whatever that is, but that the 'command' can include spaces?
 
So, "create user" should be a valid command, sending the remainder to that region (via the registered delegate).
 
which means another module can register "create region" but not "create user", as that would have already been registered.
 
Of course, it cannot register a non-character terminated subset either, like simply "create".
 
the command parser would simply run thru the list, doing a 'starts with characters' match, probably with a non-character terminator in the regexp.
 
(If you're really anal on performance, the whole list of matches can be concatenated into a regexp and compiled once)
 
Of course, you would have to register "help create user" as well, but it seems to me that there could be an abstract base class providing some protected generative helper functions.
 
(To either create and register verb+" "+noun and/or noun+" "+verb, and the corresponding help text in one go)
This seems like the most flexible approach to me, as it poses no limitations on what commands makes the most sense for each context.
Best regards,Stefan AnderssonTribal Media AB
> Date: Thu, 5 Feb 2009 18:30:25 +0100> From: DrScofield at xyzzyxyzzy.net> To: opensim-dev at lists.berlios.de> Subject: Re: [Opensim-dev] Organization and naming patterns of commands on the console> > Justin Clark-Casey wrote:> > Ai Austin wrote:> >> Any chance we can have the verb first, as this is much more intuitive? E.g.> >> create user> >> create region> > i prefer addressing the entity that is supposed to do something first (to get> it's attention, so to speak), then tell it what to do:> > region create> user create> user reset password> > that approach also has the advantage that it's up to the module what vocabulary> to support.> > -- > dr dirk husemann ---- virtual worlds research ---- ibm zurich research lab> SL: dr scofield ---- drscofield at xyzzyxyzzy.net ---- http://xyzzyxyzzy.net/> RL: hud at zurich.ibm.com - +41 44 724 8573 - http://www.zurich.ibm.com/~hud/> _______________________________________________> Opensim-dev mailing list> Opensim-dev at lists.berlios.de> https://lists.berlios.de/mailman/listinfo/opensim-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20090205/83c7138b/attachment-0001.html>


More information about the Opensim-dev mailing list