Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. XML Model Structure

XML Model Structure

Scheduled Pinned Locked Moved Design and Architecture
csharplinqxmlperformancequestion
22 Posts 3 Posters 21 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Tristan Rhodes

    Hi Mike, Thanks for the input. I Can't explain why DataSets are not appropriate, as i'm not sure what concrete reasons i have. I just have a feeling that going down that route would produce bad results, and i've been stung by DataSets before. In the end, i decided to go with a bog standard XML DOM, and build an API Class(s) that applies transformations, queries the data, and raises application specific events when the DOM changes. I'll just see how it goes. Cheers Tris

    ------------------------------- Carrier Bags - 21st Century Tumbleweed.

    L Offline
    L Offline
    led mike
    wrote on last edited by
    #9

    Tristan Rhodes wrote:

    I just have a feeling

    Some friendly advice. Don't base your technical decisions on your feelings. ;) Seriously, in todays world the availability of information eliminates the need to make blind decisions that were common years ago and resulted in the mountains of Technical Debt[^] that exist in the industry today.

    led mike

    T 1 Reply Last reply
    0
    • L led mike

      Tristan Rhodes wrote:

      I just have a feeling

      Some friendly advice. Don't base your technical decisions on your feelings. ;) Seriously, in todays world the availability of information eliminates the need to make blind decisions that were common years ago and resulted in the mountains of Technical Debt[^] that exist in the industry today.

      led mike

      T Offline
      T Offline
      Tristan Rhodes
      wrote on last edited by
      #10

      It's past experience as well, and i have looked into it. :P I love the concept of Code Debt. Spent ages trying to get management to see what it was in my last job, but there's only so much you can teach old school VB heads. ^^ [Edit] And if you say you've never looked at a design or section of code and thought "Something is seriously wrong, but i can't put my finger on it.", i think you lie :P

      ------------------------------- Carrier Bags - 21st Century Tumbleweed.

      1 Reply Last reply
      0
      • T Tristan Rhodes

        Hi Guys, I have a large, and quite complicated model that i origionaly defined using an object hierachy, but the solution has out grown that. I require an in memory model that raises events when it is changed. These events can then be handled by any observing controls which in turn can update themselves. As the model is large, and each control is only interested in one particular part of the Model, i would like to be able to pull out a section of the XML document and observe and apply changes to this block. Idealy i would like to be able to pull an XmlDocument from another XmlDocument and use that, but keeping it synchronised with the parent document. I am limited to the XmlDocument object due to a .Net 2.0 limitation, although the XDocument (And associated LINQ model) would be perfect for what i am trying to achieve as each node raises change events that bubble up the object hierachy. Are there any other solutions anyone else can think of? Cheers Tris

        ------------------------------- Carrier Bags - 21st Century Tumbleweed.

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #11

        One word. INotifyPropertyChanged. Have a look at this little puppy - it can be your best friend.

        Deja View - the feeling that you've seen this post before.

        My blog | My articles

        T L 2 Replies Last reply
        0
        • P Pete OHanlon

          One word. INotifyPropertyChanged. Have a look at this little puppy - it can be your best friend.

          Deja View - the feeling that you've seen this post before.

          My blog | My articles

          T Offline
          T Offline
          Tristan Rhodes
          wrote on last edited by
          #12

          AHHH! I wish i knew about that 4 weeks ago :(

          ------------------------------- Carrier Bags - 21st Century Tumbleweed.

          P 1 Reply Last reply
          0
          • T Tristan Rhodes

            AHHH! I wish i knew about that 4 weeks ago :(

            ------------------------------- Carrier Bags - 21st Century Tumbleweed.

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #13

            Tristan Rhodes wrote:

            I wish i knew about that 4 weeks ago

            Sorry. I only just read this thread last night.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            T 1 Reply Last reply
            0
            • P Pete OHanlon

              Tristan Rhodes wrote:

              I wish i knew about that 4 weeks ago

              Sorry. I only just read this thread last night.

              Deja View - the feeling that you've seen this post before.

              My blog | My articles

              T Offline
              T Offline
              Tristan Rhodes
              wrote on last edited by
              #14

              No worries. I don't think that it's suited for the problem i had, but it definitely has some uses is some other stuff i was working on. :)

              ------------------------------- Carrier Bags - 21st Century Tumbleweed.

              P 1 Reply Last reply
              0
              • T Tristan Rhodes

                No worries. I don't think that it's suited for the problem i had, but it definitely has some uses is some other stuff i was working on. :)

                ------------------------------- Carrier Bags - 21st Century Tumbleweed.

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #15

                To be honest, I'm having a little trouble picking up the problem domain from this thread. I'm not sure why you need the XML and why you can't use properties.

                Deja View - the feeling that you've seen this post before.

                My blog | My articles

                T 1 Reply Last reply
                0
                • P Pete OHanlon

                  To be honest, I'm having a little trouble picking up the problem domain from this thread. I'm not sure why you need the XML and why you can't use properties.

                  Deja View - the feeling that you've seen this post before.

                  My blog | My articles

                  T Offline
                  T Offline
                  Tristan Rhodes
                  wrote on last edited by
                  #16

                  Well, i'm trying to route all events through a single root object, only wiring up a hierachy of observable lists, trees and properties to do that will be an absolute nightmare as the model is growing almost daily. Additionally, i need to be able to run XPath queries on any part of the model and define some kind of schema to validate against. Which i couldn't do with objects. It's a desktop app if that makes any difference, and the XML would be the state of the solution and everything pretty much revolves around changing that and keeping display parts synchronized with it. Not sure how to describe it beyond that. :)

                  ------------------------------- Carrier Bags - 21st Century Tumbleweed.

                  P 1 Reply Last reply
                  0
                  • T Tristan Rhodes

                    Well, i'm trying to route all events through a single root object, only wiring up a hierachy of observable lists, trees and properties to do that will be an absolute nightmare as the model is growing almost daily. Additionally, i need to be able to run XPath queries on any part of the model and define some kind of schema to validate against. Which i couldn't do with objects. It's a desktop app if that makes any difference, and the XML would be the state of the solution and everything pretty much revolves around changing that and keeping display parts synchronized with it. Not sure how to describe it beyond that. :)

                    ------------------------------- Carrier Bags - 21st Century Tumbleweed.

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #17

                    Short of hashing the different observable portions and then periodically checking to see if the hash has changed, tricky. Although if you implemented this with MVC, then it would be less tricky.

                    Deja View - the feeling that you've seen this post before.

                    My blog | My articles

                    1 Reply Last reply
                    0
                    • P Pete OHanlon

                      One word. INotifyPropertyChanged. Have a look at this little puppy - it can be your best friend.

                      Deja View - the feeling that you've seen this post before.

                      My blog | My articles

                      L Offline
                      L Offline
                      led mike
                      wrote on last edited by
                      #18

                      Pete O'Hanlon wrote:

                      INotifyPropertyChanged

                      That appears to be new in 3.5, yes? I haven't been there yet.

                      led mike

                      T P 2 Replies Last reply
                      0
                      • L led mike

                        Pete O'Hanlon wrote:

                        INotifyPropertyChanged

                        That appears to be new in 3.5, yes? I haven't been there yet.

                        led mike

                        T Offline
                        T Offline
                        Tristan Rhodes
                        wrote on last edited by
                        #19

                        It's been around since 2.0.

                        ------------------------------- Carrier Bags - 21st Century Tumbleweed.

                        1 Reply Last reply
                        0
                        • L led mike

                          Pete O'Hanlon wrote:

                          INotifyPropertyChanged

                          That appears to be new in 3.5, yes? I haven't been there yet.

                          led mike

                          P Offline
                          P Offline
                          Pete OHanlon
                          wrote on last edited by
                          #20

                          led mike wrote:

                          That appears to be new in 3.5, yes?

                          .NET 2.0. I've used it to manage Dirty states in classes - it's rather neat.

                          Deja View - the feeling that you've seen this post before.

                          My blog | My articles

                          L 1 Reply Last reply
                          0
                          • P Pete OHanlon

                            led mike wrote:

                            That appears to be new in 3.5, yes?

                            .NET 2.0. I've used it to manage Dirty states in classes - it's rather neat.

                            Deja View - the feeling that you've seen this post before.

                            My blog | My articles

                            L Offline
                            L Offline
                            led mike
                            wrote on last edited by
                            #21

                            I still can't find the 2.0 Reference to this puppy?[^] :confused: System.ComponentModel.INotifyPropertyChanged Finally! Geez, apparently I have been implementing the IAmAnIdiot interface :doh:


                            Last modified: 45mins after originally posted --

                            led mike

                            P 1 Reply Last reply
                            0
                            • L led mike

                              I still can't find the 2.0 Reference to this puppy?[^] :confused: System.ComponentModel.INotifyPropertyChanged Finally! Geez, apparently I have been implementing the IAmAnIdiot interface :doh:


                              Last modified: 45mins after originally posted --

                              led mike

                              P Offline
                              P Offline
                              Pete OHanlon
                              wrote on last edited by
                              #22

                              led mike wrote:

                              Geez, apparently I have been implementing the IAmAnIdiot interface

                              No fair. I copyrighted that one. ;)

                              Deja View - the feeling that you've seen this post before.

                              My blog | My articles

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups