0

Closed

Support for extended properties for blogs in Schema

description

As Darren noticed, it's worth to have a set of Name/Value pairs for blog properties.
What should I name for their elements, Darren?
This is what you recommended and I agree with it:
<extended_properties>
<property name="..." value="..." />
<property name="..." value="..." />
<property name="..." value="..." />
<property name="..." value="..." />
</extended_properties>
Before implementation there is a question:
What will heppen for Reader tool? If we add this feature then we should have a global name for common features. It means we have to force users choose same name for a feature (i.e Blog Comment Moderation Type as FeedbackModerationType) in all blogging tools and Writer/Readers.  So we need to define some pre-defined names for these Name/Value pairs.
Once you replied, I'll start implementing this feature.
Closed Jul 4, 2006 at 7:53 AM by Keyvan

comments

wrote Jun 30, 2006 at 10:56 PM

Hi Keyvan, thanks for the heads up. I'll have a think about it today and reply later tonight. I'm actually heading off for a week's holidays this week, so I won't be around. But, if you implement this then I can take a look when I get back.

Thanks again for getting involved... hopefully I can keep up with you soon :-)

wrote Jul 1, 2006 at 7:44 PM

Ok Darren,
I'll work on it in next days ;-)

wrote Jul 1, 2006 at 11:08 PM

Keyvan, why not just keep the extended_properties as a Name/Value collection. Maybe we could have some constants that represent common extended properties but for all others we can just implement a non strongly-typed NameValue collection. People will still be able to locate the values that they are looking for in there, ie:


Blog blog = ...

if( blog.ExtendedProperties.ContainsKey("bar") ) {
// do something with bar 
}


With the well-known values it might look like this:


Blog blog = ...

if( blog.ExtendedProperties.ContainsKey(WellKnownKeys.BlogCommentModeration) ) {
// do something with bar 
}

wrote Jul 3, 2006 at 8:56 AM

Darren, So shouldn't I use a SimpleType with Enumration type under it in Schema and just add a Name/Value attributes in an element as String type?

wrote Jul 3, 2006 at 11:46 AM

Yep, that sounds like a fair plan Keyvan. I'm just thinking that the WellKnownKeys class might be useful to have in code so that we can map those string values in the schema to constants in code.

wrote Jul 3, 2006 at 11:49 AM

I imagined that WellKnownKeys looks something like:

public class WellKnownKeys {
public const string BlogCommentModeration = "BlogCommentModeration" ;
}

wrote Jul 3, 2006 at 1:29 PM

Ok, Thanks for your quick reply Darren ;-)

wrote Jul 4, 2006 at 7:53 AM

Resolved with changeset 1010.