Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Odin Daniel Jensen 6 posts 27 karma points
    Mar 22, 2011 @ 21:32
    Odin Daniel Jensen
    1

    Adding lists or children to member

    Hi

    I have this issue that I'm currently storing member information as properties on that member.

    This works fine. However, I need to store some statistics on each run of a game inside the site.
    So I need to store multiple child items. Can I have children on a member node? Or can I assign a linkedlist to a property and have it properly serialized? A web/site search turned up little of value

    Anyone did anything similar? I'd rather avoid doing my own stat table in the DB, as I want everything in Umbraco if at all possible.

    Thanks in advance

    Odin

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 22, 2011 @ 21:41
    Jan Skovgaard
    0

    Hi Odin

    One way this could be achieved is by thinking a bit untraditional I think.

    It's not possible to create childnodes under members out of the box. Perhaps this can be customized...I'm not sure.

    But what I'm thinking is that you can store the statistics data in the content tree. Create a document type called something like "Member statistics", which will serve as the root/branch for a "Member" document type where you can name the node with the proper member name and place a property, which has the datatype of "member" picker. This creates the relation between the statistic and the member. You can create whatever you like under the "Member" document type in the content tree.

    I realise this approach can be a bit cumbersome and maybe there is a better way around it but this is one way it can achieved.

    If you know your way around C# it should be a breeze to make sure the new member is created in the content tree when the members is created in the member section using events.

    Hope this input makes sense and is usefull to you.

    /Jan

  • Odin Daniel Jensen 6 posts 27 karma points
    Mar 22, 2011 @ 21:45
    Odin Daniel Jensen
    0

    Hi Jan

    It's a good idea that I've used on other sites, I just hoped for a simpler solution.

    Not that it's hard to do. And actually it might be nicer to have statistics in a common node elsewhere in the tree.
    Yes. I'll probably do this once again.

    Thanks for your input :)

    /Odin

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 22, 2011 @ 21:49
    Jan Skovgaard
    0

    Hi Odin

    Well, maybe some of the other wizards in here have another approach for handling this. But I guess that it might involve having statistic in another database, which is probably also the most ideal solution.

    But sometimes it's about being pragmatic with what you got, right? And if it's used on minor sites I can't see the harm unless it's something that is going to expand in the near future. Then scalability is of course an issue to think about :-)

    /Jan

  • Odin Daniel Jensen 6 posts 27 karma points
    Mar 22, 2011 @ 21:55
    Odin Daniel Jensen
    0

    Yes. This is a prototype for an online game so it's ok to keep it small. When (or if) we secure funding, I'll move it to another database or possible Azure for greater scalability.

    /Odin

Please Sign in or register to post replies

Write your reply to:

Draft