Click here to Skip to main content
15,868,016 members
Articles / Programming Languages / C#

Romeo and Juliet

Rate me:
Please Sign up or sign in to vote.
4.87/5 (34 votes)
3 Dec 2011CPOL11 min read 57.8K   413   67  
Making relationships first class citizens.
<?xml version="1.0" encoding="utf-8"?>
<RootNode Name="Root">
  <Nodes>
    <NodeDef Name="ROP" Text="ROP" IsReadOnly="true" IsRequired="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.Schema, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
      <Nodes>
        <NodeDef Name="Entities" Text="Entities" IsReadOnly="true" IsRequired="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.EntitiesContainer, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
          <ParentPopupItems>
            <Popup Text="Add New Entity Collection" IsAdd="true" Tag="Add"/>
          </ParentPopupItems>
          <PopupItems>
            <Popup Text="Delete Entity Collection" IsRemove="true"/>
          </PopupItems>
          <Nodes>
            <NodeDef Name="Entity" Text="Entity" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.Entity, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
              <ParentPopupItems>
                <Popup Text="Add New Entity" IsAdd="true" Tag="Add"/>
              </ParentPopupItems>
              <PopupItems>
                <Popup Text="Delete Entity" IsRemove="true"/>
              </PopupItems>
              <Nodes>
                <NodeDef Name="EntityAttribute" Text="Entity Attribute" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.EntityAttribute, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
                  <ParentPopupItems>
                    <Popup Text="Add New Entity Attribute" IsAdd="true" Tag="Add"/>
                  </ParentPopupItems>
                  <PopupItems>
                    <Popup Text="Delete Entity Attribute" IsRemove="true"/>
                  </PopupItems>
                  <Nodes/>
                </NodeDef>
              </Nodes>
            </NodeDef>
          </Nodes>
        </NodeDef>
        <NodeDef Name="Attributes" Text="Attributes" IsReadOnly="true" IsRequired="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.AttributesContainer, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
          <ParentPopupItems>
            <Popup Text="Add New Attribute Collection" IsAdd="true" Tag="Add"/>
          </ParentPopupItems>
          <PopupItems>
            <Popup Text="Delete Attribute Collection" IsRemove="true"/>
          </PopupItems>
          <Nodes>
            <NodeDef Name="Attribute" Text="Attribute" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.Attribute, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
              <ParentPopupItems>
                <Popup Text="Add New Attribute" IsAdd="true" Tag="Add"/>
              </ParentPopupItems>
              <PopupItems>
                <Popup Text="Delete Attribute" IsRemove="true"/>
              </PopupItems>
              <Nodes/>
            </NodeDef>
          </Nodes>
        </NodeDef>
        <NodeDef Name="Relationships" Text="Relationships" IsReadOnly="true" IsRequired="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.RelationshipsContainer, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
          <ParentPopupItems>
            <Popup Text="Add New Relationship Collection" IsAdd="true" Tag="Add"/>
          </ParentPopupItems>
          <PopupItems>
            <Popup Text="Delete Relationship Collections" IsRemove="true"/>
          </PopupItems>
          <Nodes>
            <NodeDef Name="Relationship" Text="Relationship" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.Relationship, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
              <ParentPopupItems>
                <Popup Text="Add New Relationship" IsAdd="true" Tag="Add"/>
              </ParentPopupItems>
              <PopupItems>
                <Popup Text="Delete Relationship" IsRemove="true"/>
              </PopupItems>
              <Nodes>
                <NodeDef Name="DescribedWith" Text="Described With" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.Entity, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
                  <ParentPopupItems>
                    <Popup Text="Add Described With Entity" IsAdd="true" Tag="Add"/>
                  </ParentPopupItems>
                  <PopupItems>
                    <Popup Text="Delete Described With Entity" IsRemove="true"/>
                  </PopupItems>
                  <Nodes/>
                </NodeDef>
                <NodeDef Name="RelationshipTypes" Text="Relationship Type" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.RelationshipTypes, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
                  <ParentPopupItems>
                    <Popup Text="Add Relationship Type" IsAdd="true" Tag="Add"/>
                  </ParentPopupItems>
                  <PopupItems>
                    <Popup Text="Delete Relationship Type" IsRemove="true"/>
                  </PopupItems>
                  <Nodes/>
                </NodeDef>
              </Nodes>
            </NodeDef>
          </Nodes>
        </NodeDef>
        <NodeDef Name="Lists" Text="Lists" IsReadOnly="true" IsRequired="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.ListsContainer, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
          <ParentPopupItems>
            <Popup Text="Add New List Collection" IsAdd="true" Tag="Add"/>
          </ParentPopupItems>
          <PopupItems>
            <Popup Text="Delete List Collection" IsRemove="true"/>
          </PopupItems>
          <Nodes>
            <NodeDef Name="List" Text="List" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.ListOfItems, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
              <ParentPopupItems>
                <Popup Text="Add New List" IsAdd="true" Tag="Add"/>
              </ParentPopupItems>
              <PopupItems>
                <Popup Text="Delete List" IsRemove="true"/>
              </PopupItems>
              <Nodes>
                <NodeDef Name="ListItem" Text="List Item" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.ListItem, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
                  <ParentPopupItems>
                    <Popup Text="Add New List Item" IsAdd="true" Tag="Add"/>
                  </ParentPopupItems>
                  <PopupItems>
                    <Popup Text="Delete List Item" IsRemove="true"/>
                  </PopupItems>
                  <Nodes/>
                </NodeDef>
              </Nodes>
            </NodeDef>
          </Nodes>
        </NodeDef>
        <NodeDef Name="Pairs" Text="Pairs" IsReadOnly="true" IsRequired="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.PairsContainer, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
          <ParentPopupItems>
            <Popup Text="Add New Pair Collection" IsAdd="true" Tag="Add"/>
          </ParentPopupItems>
          <PopupItems>
            <Popup Text="Delete Pair Collection" IsRemove="true"/>
          </PopupItems>
          <Nodes>
            <NodeDef Name="Pair" Text="Pair" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.ListOfPairs, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
              <ParentPopupItems>
                <Popup Text="Add New Pair" IsAdd="true" Tag="Add"/>
              </ParentPopupItems>
              <PopupItems>
                <Popup Text="Delete Pair" IsRemove="true"/>
              </PopupItems>
              <Nodes>
                <NodeDef Name="PairItem" Text="Pair Item" IsReadOnly="true" TypeName="XTreeDemo.GenericController`1[[ROPLib.PairItem, ROPLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], XTreeIIDemo">
                  <ParentPopupItems>
                    <Popup Text="Add New Pair Item" IsAdd="true" Tag="Add"/>
                  </ParentPopupItems>
                  <PopupItems>
                    <Popup Text="Delete Pair Item" IsRemove="true"/>
                  </PopupItems>
                  <Nodes/>
                </NodeDef>
              </Nodes>
            </NodeDef>
          </Nodes>
        </NodeDef>
      </Nodes>
    </NodeDef>
  </Nodes>
</RootNode>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Interacx
United States United States
Blog: https://marcclifton.wordpress.com/
Home Page: http://www.marcclifton.com
Research: http://www.higherorderprogramming.com/
GitHub: https://github.com/cliftonm

All my life I have been passionate about architecture / software design, as this is the cornerstone to a maintainable and extensible application. As such, I have enjoyed exploring some crazy ideas and discovering that they are not so crazy after all. I also love writing about my ideas and seeing the community response. As a consultant, I've enjoyed working in a wide range of industries such as aerospace, boatyard management, remote sensing, emergency services / data management, and casino operations. I've done a variety of pro-bono work non-profit organizations related to nature conservancy, drug recovery and women's health.

Comments and Discussions