[Opensim-dev] AssetBase and metadata

MW michaelwri22 at yahoo.co.uk
Fri Jan 30 14:51:12 UTC 2009


I agree, I'd say call the class AssetMetaData, but just call the property (in AssetBase) MetaData.


Sean Dague <sdague at gmail.com> wrote: Mike Mazur wrote:
> Hi,
> 
> Thanks for the feedback...
> 
> On Thu, 29 Jan 2009 15:15:38 +0000
> Justin Clark-Casey  wrote:
> 
>> Mike Mazur wrote:
>>> So instead of having:
>>>
>>>   AssetBase ab = new AssetBase();
>>>   ab.Name = "some name";
>>>   ab.Description = "some description";
>>>
>>> I would write:
>>>
>>>   AssetBase ab = new AssetBase();
>>>   ab.Metadata.Name = "some name";
>>>   ab.Metadata.Description = "some description";
>>>
>> Just to clarify, you're anticipating changing the
>> OpenSim.Framework.AssetBase class (instead of having a parallel class
>> in the AssetServer code)?  If so, sounds good to me.
> 
> Yes, I'd like to modify OpenSim.Framework.AssetBase.
> 
>>> Should the Metadata class be renamed to AssetMetadata? Any other
>>> thoughts?
>>  From a readability perspective I would rather see it remain as just
>> Metadata, since something like
>>
>> AssetBase myAsset = new AssetBase();
>> myAsset.AssetMetadata.Name = "Heloooo";
>>
>> looks kind of redundant to me (though this may just be a taste issue).
> 
> Yeah, that seems redundant, although since the class lives in
> OpenSim.Framework, and not something more specific (like
> OpenSim.Framework.Assets, for example), the OpenSim.Framework.Metadata
> class would be pretty ambiguous; what is the Metadata for?
> 
> For the time being I'll go ahead with OpenSim.Framework.Metadata.

It's fine for the object to be called AssetMetaData, just don't make the
property that.

We don't have UserProfile.StringFirstname.  The type is encoded already
in the object, don't encode it also in the name.

 -Sean

-- 
Sean Dague / Neas Bade
sdague at gmail.com
http://dague.net


_______________________________________________
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/20090130/e7c2c917/attachment-0001.html>


More information about the Opensim-dev mailing list