Google Groups

Re: GSoC12: C3 Commons - Social Object Module (aka Publications)


Shelly Grist Apr 5, 2012 6:31 PM
Posted in group: SilverStripe Core Development
Hi Philipp

Have you thought about using a decorator (http://doc.silverstripe.org/sapphire/en/reference/dataobjectdecorator) instead of extending a data object?

Thanks for the suggestion regarding using a decorator for the DataObject.  I have actually used a decorator for my MemberRole class.  I extended it to accommodate extra fields, and has_ relationships, etc.  But for my Article (my Publications)  and LibraryItem ,etc classes I just extended the DataObject class.  I based my MemberRole class on Aram's SSbits tutorial 'Registering Users and allowing them to edit their details' but I didn't really understand all of the underlying code behind it.

I think that is part of the main problem I've had using SilverStripe - I've found various tutorials which help me but I don't always get all of the underlying architecture choices.

IMHO it would be important to further specify the kind of metadata as this will have a big impact on both scope and recommender.

Specifying the initial metadata is key.  But there are almost endless choices - most dependent on specific implementation needs.  I'm wondering how complex I make the initial module.  Would it be better to provide for the most popular metadata choices, to be determined, in a basic module that can then be extended/adapted by the user using decorators?  Can you use a decorator on a decorator?  For example, if the SocialMember and SocialObject extend DataObjectDecorator with basic data and methods will a user be able to easily extend them? 

Also some of the metadata will also be DOs - tags, reviews, etc which will need to have a many_many relationship to both the SocialMember and the SocialObject.  I'm not sure if each of these will need to be there own separate module?  I'm using the tagfield module now.  Is it being updated for SS3, do you know? 

I also noticed that the tagfield module says to create a tag DO that extends the DataObject rather than using a decorator.  Is there a tutorial or something somewhere that I can read that can explain when its best to extend a class and when its best to use a decorator?

Thanks, Shelly



On Friday, April 6, 2012 6:57:24 AM UTC+10, xeraa wrote:
Hi Shelly,
 
I'm not planning on linking to other social sharing sites or their content.  I want to build a Social Object module that would allow SilverStripe sites to implement social sharing similar to what is available on Rotten Tomatoes or Amazon etc. 

Ah ok - you want to build a recommender system within the website itself.
Have you thought about using a decorator (http://doc.silverstripe.org/sapphire/en/reference/dataobjectdecorator) instead of extending a data object? Depending on how much variation you have in your content DOs, this might be helpful to add the same functionality multiple times rather than having to add one or more layers of abstraction.
 
For example, say a SilverStripe developer is building a site for Australian motorcycle enthusiasts who want to share their photos of their trips along with their opinions of the best trip routes or the best cafes to stop at.  Maybe these members come from all over Australia so they might want to connect with a member from another state with similar interests if they're planning a big trip. 

A Social Object module will provide a basic building block which the developer can enhance for his specific implementation.  It will already have a basic social object class (linked to the member who added it), with the setup to link metadata to it: tags, reviews/ratings, etc. The metadata must also be linked to the member who added it.  The module will include various algorithms to compute similarity coefficients which is the foundation for providing a recommendation system or any more advanced social network analysis.  The Social Object module will allow the developer to make the connections between similar objects, between objects and members and between similar members.  These similarity connections enable the value adding features like finding similar objects or members with similar interests.

IMHO it would be important to further specify the kind of metadata as this will have a big impact on both scope and recommender.
For example, I'd also include geo locations(you can probably fetch that from a user's IP, some images contain that information,...).

Cheers,
Philipp

On Friday, April 6, 2012 6:57:24 AM UTC+10, xeraa wrote:
Hi Shelly,
 
I'm not planning on linking to other social sharing sites or their content.  I want to build a Social Object module that would allow SilverStripe sites to implement social sharing similar to what is available on Rotten Tomatoes or Amazon etc. 

Ah ok - you want to build a recommender system within the website itself.
Have you thought about using a decorator (http://doc.silverstripe.org/sapphire/en/reference/dataobjectdecorator) instead of extending a data object? Depending on how much variation you have in your content DOs, this might be helpful to add the same functionality multiple times rather than having to add one or more layers of abstraction.
 
For example, say a SilverStripe developer is building a site for Australian motorcycle enthusiasts who want to share their photos of their trips along with their opinions of the best trip routes or the best cafes to stop at.  Maybe these members come from all over Australia so they might want to connect with a member from another state with similar interests if they're planning a big trip. 

A Social Object module will provide a basic building block which the developer can enhance for his specific implementation.  It will already have a basic social object class (linked to the member who added it), with the setup to link metadata to it: tags, reviews/ratings, etc. The metadata must also be linked to the member who added it.  The module will include various algorithms to compute similarity coefficients which is the foundation for providing a recommendation system or any more advanced social network analysis.  The Social Object module will allow the developer to make the connections between similar objects, between objects and members and between similar members.  These similarity connections enable the value adding features like finding similar objects or members with similar interests.

IMHO it would be important to further specify the kind of metadata as this will have a big impact on both scope and recommender.
For example, I'd also include geo locations(you can probably fetch that from a user's IP, some images contain that information,...).

Cheers,
Philipp

On Friday, April 6, 2012 6:57:24 AM UTC+10, xeraa wrote:
Hi Shelly,
 
I'm not planning on linking to other social sharing sites or their content.  I want to build a Social Object module that would allow SilverStripe sites to implement social sharing similar to what is available on Rotten Tomatoes or Amazon etc. 

Ah ok - you want to build a recommender system within the website itself.
Have you thought about using a decorator (http://doc.silverstripe.org/sapphire/en/reference/dataobjectdecorator) instead of extending a data object? Depending on how much variation you have in your content DOs, this might be helpful to add the same functionality multiple times rather than having to add one or more layers of abstraction.
 
For example, say a SilverStripe developer is building a site for Australian motorcycle enthusiasts who want to share their photos of their trips along with their opinions of the best trip routes or the best cafes to stop at.  Maybe these members come from all over Australia so they might want to connect with a member from another state with similar interests if they're planning a big trip. 

A Social Object module will provide a basic building block which the developer can enhance for his specific implementation.  It will already have a basic social object class (linked to the member who added it), with the setup to link metadata to it: tags, reviews/ratings, etc. The metadata must also be linked to the member who added it.  The module will include various algorithms to compute similarity coefficients which is the foundation for providing a recommendation system or any more advanced social network analysis.  The Social Object module will allow the developer to make the connections between similar objects, between objects and members and between similar members.  These similarity connections enable the value adding features like finding similar objects or members with similar interests.

IMHO it would be important to further specify the kind of metadata as this will have a big impact on both scope and recommender.
For example, I'd also include geo locations(you can probably fetch that from a user's IP, some images contain that information,...).

Cheers,
Philipp