title: Architecture of product configurator with constraints
body: <p>I am building a CPQ (Product Configurator) for metal cutting CNC machines for a project in my university.</p>
  
  <p>I'm using C# and WPF as my technology. I am very familiar with both so I don't have problems on that end. </p>
  
  <p>My question refers to the architecture of component dependencies, constraints. </p>
  
  <p>I will show each component in a TreeView. So my base abstract base class is called "Component" with properties like name, description, id, etc... </p>
  
  <p>An example of the tree:</p>
  
  <p>Root<br>
  - Machine<br>
  -- Spindle1<br>
  --- Fixture<br>
  ---- Jaw<br>
  -- Spindle2<br>
  -- Toolcarrier<br>
  ---- Toolholder<br>
  ----- Tool</p>
  
  <p>So for example if the user drags the component "Fixture" into the tree it has some constraints. If this component is in the tree certain components can't be in the tree anymore. </p>
  
  <p>Or </p>
  
  <p>If the user drags a component into the tree the program must notify the user that additional necessary components will be added into the tree because this component depends on other components (must Have)</p>
  
  <p>So basically I need constraints on components which are aware of other components. </p>
  
  <p>Constraint types would be<br>
  + MustHave<br>
  + NotAllowed<br>
  + Recommended  </p>
  
  <p>I am thinking about a repository class which holds the id of the component and the constraint to a different component. </p>
  
  <p>I would appreciate all the help if anybody can point me in the right direction.</p>
  
  <p>Cheers, 
  Max</p>