Copied to clipboard

Flag this post as spam?

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


  • David F. Hill 122 posts 242 karma points
    Jan 15, 2010 @ 18:07
    David F. Hill
    1

    Storing application data

    Hello Umbraco colleagues,

    What's considered "best practice" for storing small and medium amounts of general data for use within Umbraco applications such as user controls and the like.

    This would be data that is not intended to be viewed by site visitors, per se, but used, for example, as configuration data or used in calculations.

    Isn't is best to avoid creating content nodes for this purpose, as they would become part of the overall site cache?

    Thanks. Your views will help shape my approach to developing custom apps in Umbraco from now on.

    David F Hill

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 15, 2010 @ 18:26
    Lee Kelleher
    1

    Hi David,

    There isn't really a "best practice" for storing application/config data, but there are many ways to do in Umbraco - all depending on how you want to manage it:

    1. As you suggested, store them in a document-type - for example, Doc2Form can store the form data in a content node. Yes gets put in the XML cache, but it makes it readily available in XSLT.
    2. Config / XML file.  For config/settings, Web.config is the usual ASP.NET developers choice.  For small amounts of data, keep in an XML (under the /data folder - which a .config extension, to keep it safe).
    3. Separate database table.  Requires more work, but you have more control on how the data is stored/handled. Dirk wrote a blog post on Building Custom Sections.
    ... in a nutshell, it's up to you - and the level of development you want to do.  Storing data in Umbraco (as content), the UI is already there!
    Cheers,
    Lee.

  • David F. Hill 122 posts 242 karma points
    Jan 15, 2010 @ 18:46
    David F. Hill
    0

    Thanks for your response, Lee.

    That sums it up nicely. I really like the way Umbraco gives us enough choices to make the right call for the situation at hand.

    Cheers, David

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 15, 2010 @ 23:40
    Aaron Powell
    0

    I've worked on sites where I've stored meta data in the content tree and I've worked on sites where I've stored it in a custom config section of the web.config.

    Each option has different pros and cons, the ultimate decision is really how frequently you'll be needing to update the meta data.

Please Sign in or register to post replies

Write your reply to:

Draft