开发者

Examples of EAV pattern in .NET

I've been reviewing the archi开发者_如何学Pythontecture of Magento Commerce today and am intrigued by their use of EAV to create a very flexible model.

Are there any examples of this in the .net space?

I had previously looked into storing additional attributes in a dynamic dictionary and serializing these to an object store. This way I would be able to do away with "magic" strings to access the attributes.


You should look at how this is done in SharePoint. A look at the underlying table will show that columns created on the fly will be stored in predefined fields like UDF_text1, UDF_text2, UDF_Number1, etc.. Upto 256 is used for each data type. The metadata for these columns are stored in an XML field.

Once all the predefined UDF fields are used up, the user is still able to create new fields on the fly but they end up being stored in a XML field.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜