Episerver’s Dynamic Data Store

By Deane Barker

Introducing The Dynamic Data Store : Episerver is shipping a handy new feature in CMS 6 which provides for data storage of…whatever.

[…] storing data in a database using Entity Framework or NHibernate requires you to design and compile a class when developing your application. This works really well when you know the shape or structure of your data at compile time. Episerver CMS has a few features where the shape or structure of the data isn’t actually known until runtime.

The Dynamic Data Store is very key-value-ish, like Amazon’s SimpleDB or Google’s BigTable. It gives you a simple place to store variably-shaped data when building your apps, without having to roll new tables or build ORMs. There are so many times when you just want to store some random piece of data, and the Dynamic Data Store gives you a simple way to do that, and get it back out, strongly-typed, even.

The comments on this blog post are interesting – there are a lot of people expressing reservations that developers will mis-use it, which is understandable. In everything, it’s all in the execution. Anything can be mis-used, if you’re careless.

Allan has written a handy example to store ratings of a certain page. He wrote a simple “Rating” class, which has a property for the page to which it’s applied. Then he wrote a couple extension methods so you can get this information directly off Episerver’s core content object. In the end, he’s built a feature that looks as though it’s built right into Episerver and has an infrastructure behind it, when really it consists of nothing but a half-dozen methods and perhaps 20 lines of code.

This is item #150 in a sequence of 356 items.

You can use your left/right arrow keys to navigate