Copied to clipboard

Flag this post as spam?

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


  • Brendan Rice 538 posts 1102 karma points
    Aug 05, 2010 @ 16:28
    Brendan Rice
    0

    Model/Data Storage Best Practice

    I have a model that looks something like this:

     

    MyCustomMemberObject

    - Properties

    - AnotherCustomObject

    - List<YetAnotherCustomObject>

     

    I was wondering what is the best practice to storing and retrieving this additional kind of information?  

    Thanks,

    Brendan

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 06, 2010 @ 00:05
    Ismail Mayat
    1

    Brendan,

    Is the question you have this data that you want to store in a db and you want to know whether in context of umbraco whether to use xslt or .net macros? If not then you need to explain full context of what you are trying to achieve

    Regards

    Isamil

  • Brendan Rice 538 posts 1102 karma points
    Aug 06, 2010 @ 14:34
    Brendan Rice
    0

    Hi Ismail,

    thanks for taking the time to reply.
    What I have is esentially a wizard type UI made up of user controls embedded in Macros then these macros are embedded in Umbraco pages.  At each stage of the wizard I can collect information about the Member so in th eabove example one of the properties of my member would be List<YetAnotherCustomObject>.

    In Umbraco I have a member type of MyMember and I would like to tie this member type to my user. I can achieve this by using a similar approach to that outlined in the following article:

    http://legacy.aaron-powell.com/blog/july-2009/umbraco-member-profiles.aspx#

    What I was wondering was the best practice for data storage for this kind of application?  An if it is by following the above approach how do I handle Lists of custom objects and custom objects that are properties of the main object?


    Thanks again,

    Brendan

     

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 06, 2010 @ 16:10
    Ismail Mayat
    0

    Brendan,

    Ok see what you are trying to do. I did work v3 site a while back where a member had quite a bit of complex profile data I stored it all in db table.  I think you can extend the member profile class to handle list objects not done it my self but worth a google then you dont need separate db table.

    Regards

    Ismail

  • Brendan Rice 538 posts 1102 karma points
    Aug 06, 2010 @ 17:34
    Brendan Rice
    0

    I think I am just going to go with seperate tables.  The logic gets quite complicated around the member as there is calculations involved so I wrote unit tests.  From what I have read if I couple my member to the umbraco member then the umbraco member will be hitting against the DB when the unit tests try to run which is not what I want.

    Thanks again for the help.

    Brendan

Please Sign in or register to post replies

Write your reply to:

Draft