Recently I set about writing a replacement for ExtendedAttributes in Telligent Community. For those of you that haven’t come across these before, they are a simple set of key/value pairs that can be saved against certain entities in the platform such as groups, forums, threads & blogs. Although they are very useful for saving pieces of metadata, they have some limitations.
Recently I’ve been running into the above issues more and more, and when that happens and you need to store custom data, you are faced with building custom tables, data access code, caching and writing/exposing API’s. This project aims to solve those issues and provide a common interface on top of any platform entity that implements IContent.
Although some scenarios may still call for custom tables, indexes, and logic to index and search based on the custom data, developers can benefit from this simple approach to storing custom data. Some examples of we might use ExtendedAttributes and these will make a good replacement are:
Telligent ContentMetdata is a project that is hosted on GitHub and is published to NuGet so allow developers to quickly and easily leverage custom metadata in their projects. The library contains a full In-Process API, Widget API and RESTful API, allowing access to operations such as list, show, update and delete. This makes is very quick and easy to add metadata.
As the project is open source, please feel free to fork the project and create pull requests with improvements and fixes. I have a backlog of items I’d like to add such as:
You can find the project on GitHub at https://github.com/RichMercer/ContentMetadata
Warning! Please don’t store any secure information using the approach. As there is no security around these fields right now, this should only be used for metadata that can be seen by anyone that can view the content.