Have some doubts regarding how to implement the Composite Design Pattern to implement a tree structure using Asp.net MVC3 architecture. My concerns are mainly due to the requirement that the tree structure has nodes which have different attributes or properties for each level .
May be I ll explain a bit more into this with an example.
Tree has a root node - T which has attributes/properties X, Y ,Z ( X can be reffered to as Name for our convenience )
Corresponding child nodes A , B have properties - X, L ,M
Corresponding next level nodes have properties - X, P , Q
Corresponding next nevel nodes have properties - X, R, T and so on.
The current design is not developed with any pattern and just each levels are different class type .
So if we want to add any levels or change it effects the whole classes because of the dependency classes it has .
Please let me know if I can apply composite design pattern so that these type of dependencies and the code maintenance can be easier. how should our POCO or Models should be defined to follow the composite pattern in such a scenario. I'm using Asp.net MVC3, C#, DB first approach with NICedit.js( for the tree structure display ) .
Appreciating the help in advance .