[Opensim-dev] RFC: Refactoring Scene.cs so that modules directly invoke services from CommsManager
Teravus Ovares
teravus at gmail.com
Thu Dec 18 18:20:56 UTC 2008
You would think that the service wrappers would be something that
should go into scenebase, the scene base class as virtual. The idea
behind this is, 1. it would be out of Scene.cs. 2. It would be
available, if someone intends on deriving another Scene class from
SceneBase.
Then again. Maybe Scene is too complicated and encapsulates too much
specific functionality to make it reasonable to expect someone to
derive a separate class from SceneBase.
Best Regards
Teravus
On 12/18/08, Justin Clark-Casey <jjustincc at googlemail.com> wrote:
> In Scene.cs there are quite a few wrapper methods that appears to exist primarily to relay calls from modules to other
> services. For instance, Scene.AddXmlRPCHandler() just recalls AddXmlRPCHandler() on the BaseHttpServer. Some modules
> make use of this method while others use Scene.CommsManager.HttpServer.AddXmlRPCHandler()
>
> I would like to refactor code such that services available through CommsManager are called directly rather than through
> Scene wrappers. Although this goes against the Law of Demeter (http://en.wikipedia.org/wiki/Law_of_Demeter) I think
> that the advantage in reducing the large number of disparate methods on the Scene is worth it. The alternative is that
> the number of Scene wrapper methods continues to grow indefinitely as new service methods are introduced.
>
> Comments?
>
> --
> justincc
> Justin Clark-Casey
> http://justincc.wordpress.com
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
More information about the Opensim-dev
mailing list