I need to design a CAD application in C# which should essentially have a separation between the data and its representation.
I am thinking of having a datamodel and a graphic model for representing the geometry of this data. This graphic model will be presented to a view control for di开发者_运维百科splaying through a presentation layer. I want it this way so that I will be able to support multiple views in the future.
But I am wondering how should I establish the relation between the datamodel, graphic model and the presentation layer. Should I need some kind of controllers for this purpose? Where should I keep the datamodel, the graphic model and the presentation object? Which pattern would you suggest for me to solve my problem?
Please suggest someways to have a better design.
Many thanks
Take a look at the MVC and its variations, especially the MVVM if you're considering WPF.
Search for MVC and MVVM here and take a look at these links:
http://waf.codeplex.com/ http://www.codeproject.com/KB/WPF/SoapBoxCorePinBallDemo.aspx http://compositewpf.codeplex.com/
精彩评论