开发者

Storing personalisation details for anonymous visitors in Sitecore 6.4

We're using a small app (Flash) to allow visitors to identify their content preferences. The end result of the app is a list of Items, which we present to the user as "Content you might be interested in" (think of it as similar to Amazon's "Page That You Built"). The visitor's page will need to be accessible as a permalink using a GUID, and can be 开发者_如何学JAVAforwarded to another vistor to see the same content. We have no login or membership, so all visitors are anonymous.

Where and how should I store the item list for each visitor?

Currently we are looking at creating an item in the content tree for each visitor page, which will simply hold references to the selected contet items the user is interested in. We are worried this will lead to a large amount of content items which might impact on performance of the solution as a whole.

Other possibilities would be to use the file system (possibly a single XML file) or an SQL lookup.

What is regarded as best practice for this, and have I missed any possible options (is there somewhere in the OMS to store this?).


We've done something similar for a client (except we had to persist search queries, not user preferences, but the same principles apply). We also had the requirement that "the visitor's page will need to be accessible as a permalink, and can be forwarded to another vistor to see the same content" (though not specifically using a GUID.)

What we ended up doing, was just persisting the user's preferences in the querystring. In your case, for example:

http://website/pageThatYouBuilt.aspx?item1={guid}&item2={guid} //etc

of course, this is eventually going to produce ginormous URL's, so you could place the guids in a simple DTO object

public class State {
  public Guid Item1 {get;set;}
  public Guid Item2 {get;set;}
}

or even

public class State {
  public List<Guid> Items {get;set;}
}

Then we serialized this 'state object' to a string. and stuck that into the url (querystring). We used Protobuffer to achieve some really efficient serialization (shorter urls)

like this:

http://website/pageThatYouBuilt.aspx?state=GhIJgUc9EVb%2bk0cRnRABsX%2bob8UyAA%3d%3d 

When a user visits your page, just take the state from the querystring, deserialize it, and populate the page with the content items you need. This also has the benefit that visitors can share their link with other users, and they'll all see the same stuff.

for more information on protofbuffer, see: http://code.google.com/p/protobuf-net/wiki/GettingStarted

not a sitecore specific question, by the way :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜