Copied to clipboard

Flag this post as spam?

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


  • Stephen 5 posts 25 karma points
    Aug 06, 2009 @ 17:34
    Stephen
    0

    Can Umbraco do what I want, or should I look elsewhere?

    Forgive the questions which I'm sure are trivial. I know nothing about Umbraco, and am trying to figure out if this is the product I need.

    I was drawn to Umbraco because I see I can take my existing ASP.NET Web Controls and use them. Very nice! I've got some controls that do pie charting I wanna use, and they gotta have data somehow. I saw on Google that Umbraco has an API for data storage and retrieval, and want to know if this is true (and if it is, where I can learn about it). This is for a Worlf of Warcraft guidl website, so I need some way to store and retreive data about a bunch of characters (name, level, class, race, gender, etc). I need to pull said data from the DB and plot it on pie charts.

    Does Umbraco have a way to facilitate this, or am I gonna have to maintain a separate database for my charts, and write my own DB interface?

    I'm a programmer, not a web developer or artist, so go easy on the terminology.

  • Stephen 5 posts 25 karma points
    Aug 06, 2009 @ 17:35
    Stephen
    0

    Umm, wow, major typos there. Should read "This is for a World of Warcraft guild."

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 06, 2009 @ 18:54
    Morten Bock
    0

    Hi Stephen. Welcome to the forum.

    I guess this depends a bit on how much data we are talkin about. You could choose to store data as nodes in Umbraco. This will give you the use of the umbraco API, so you get objects to work with. Also you can edit your data directly in the umbraco administration area. Depending on how much you will be updating your data, and how much data you have, this would be an easy option.

    If you have a lot of data, then you may be better off writing your own datalayer. Umbraco has a datalayer for talking to its own database, but it is basically an sql parser that can translate your sql to work with MySQL or VistaDB. So this is not much help when using a custom database like yours. If you don't want to write a whole lot of sql, you may want to take a look at projects like Subsonic or NHibernate that will generate code for you to use to access your DB.

  • Stephen 5 posts 25 karma points
    Aug 06, 2009 @ 19:30
    Stephen
    0

    We are talking about max 300 players (the max number of players allowed in a guild). Like I said, each player has some info associated with it:

    • Name - string
    • Level - integer
    • Class - enumeration
    • Race - enumeration
    • Gender - enumeration
    • Profession - enumeration
    • Profession Skill - integer
    • Fishing Skill - integer
    • Cooking Skill - integer
    • First Aid Skill - integer
    • Equipment - integer (14 integers, actually, one for each equipment slot)

    The data will be updated often, and that was another question. Players level up, raise their skills, get new equipment, etc., so I need some way to have Umbraco get this info from the game's maker once a day. (I have already written a class to fetch data from Blizzard, so I just have to get Umbraco to use it.)

    What do you mean when you say "store data as nodes"? Is that some kind of data storage mechanism Umbraco has, similar to how you store page contents?

    Not much data, but it definetely needs a database. I've got a Windows Forms app right now that does what I'm trying to make Umbraco do, and I store everything in an XML file, which is read into memory at the program initialization as a list of Classes I have made. I'd like to avoid writing a new data layer if Umbraco can do it for me. Is that datalayer Umbraco has suited to storing info? Can you give me some links to that info please?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 06, 2009 @ 19:50
    Morten Bock
    0

    Hi Stephen

    Page content is exatly that, nodes. I am just too stuck into Umbraco every day, so I forget to explain my terms :-)

    So 300 members would be doable with using content pages. Just create a Document Type with the properties from your list, and then you can create your members/pages through the API:

    http://our.umbraco.org/wiki/reference/api-cheatsheet/creating-a-document

    Just to make sure: You only need to store data about the members right? They are not supposed to log in to the site?

    When you want to update the pages, you can also do that through the API:

    http://our.umbraco.org/wiki/reference/api-cheatsheet/modifying-document-properties

    If you look at the file in /config/umbracoSettings.config there is a scheduler section where you can set up Umbraco to call a URL at certain intervals. So if you set up a usercontrol on a page that does the datafetching from blizzard, then this would trigger it. I only works on intervals however, so I don't think you can set it to "Every day at 8am". But you could set umbraco to call it every hour, and then let you usercontrol decide if it is time to run.

    When fetching data for you charts, use the umbraco.presentation.nodefactory. This works on the in-memory XML of all the content pages of umbraco. So that will give you lightning fast response.

    http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-the-nodefactory

    I think that would be the way to go to utilize the strenths of umbraco. + you get editable data from the admin section and full version history for all the pages.

    Let me know if some of the things need further explanation.

  • Stephen 5 posts 25 karma points
    Aug 06, 2009 @ 20:53
    Stephen
    0

    That helps a lot. So, in TLDR form, I need to create Data Types for each character's attributes, and a document Type called Character. Each character is a node (document). I'll set up the scheduler to, once a day, parse the XML feeds from Blizzard, and update/add/remove nodes as appropriate (people join the guild, leave the guild, and get new weapons/armor). Then my pie charting controls will have to get all the character nodes so it can plot the distributions of classes, races, level distribution, etc. Is that nodefactory you talked about is one huge XML file in memory that contains ALL the Umbraco data? I'll just pass that XML to my chart control, which will then parse out the needed data and make the charts, right?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 06, 2009 @ 21:29
    Morten Bock
    0

    I think you got it exactly. Yes, all the content (from the content section) is stored as XML in memory, and you can access it through the nodefactory classes.

    A small term correction. When you create your document type called "Character" you just add properties to that document type using the existing datatypes. You should not need to create your own as far as I can tell from your requirements.

  • Stephen 5 posts 25 karma points
    Aug 06, 2009 @ 23:21
    Stephen
    0

    Thank you.

    I was talking about creating my own data types for things that I think of as enumerations. For example, there are only five races possible for our guild: Orc, Troll, Undead, Tauren, and Blood Elf. I don't want someone to be able to edit their character and enter a race that doesn't exist in the game. I just want them to pick from a list of 5 options. That's why I was thinking I needed a custom Data Type for Race. Can I do that with what is provided by default?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 07, 2009 @ 00:00
    Morten Bock
    0

    There is a DropDown datatype that you can enter prevalues into. Just go to Developer section, right click "Datatypes" and select "Create". Call it "Race" an choose the dropdown rendercontrol. Then save the datatype, and you can start adding prevalues.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies