Help with designing a CAD application RRS feed

  • Question

  • Hi,
    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 displaying 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

    Monday, February 1, 2010 5:31 PM

All replies

  • You'll probably want some variant of the MVC or MVP pattern.  The exact design you use will depend on many things, including what technology you decide to use for your display, etc.

    However, the basic premise here applies, with pretty much any display library.  You'll want to separate out your model, which is probably going to be the CSG operations, from the "controller", which will act upon them.  The View will just render the final output from this, and interact with the "controller" or "presenter" in some fashion.

    Reed Copsey, Jr. -
    Monday, February 1, 2010 5:49 PM