This is how my solution looks like right now. And it get's to the point where my Controls need reference to Model. It get's real tough to keep Infrastructure, Constants, Controls and Model separated.

For download size and modularity MAIN and Modules (there is many) will stay separate. But those core libraries seem to be referenced by all modules and MAIN. I don't see a point in keeping them in separate projects. I'm sure all of you had this same issue.

So, I wonder if I should keep trying and keep them separate/loosely coupled (hard to do now without circular references) or it is OK to merge them into one Infrastructure project? My Model has lot's of metadata and this metadate needed in controls and other places. Thats where it get's tight.

enter image description here

  • Sounds a bit like you have a too high coupling between your controls (assuming that it's visual controls), are you using MVVM cause it doesn't really seem so from your drawing.
    – cyberzed
    Nov 4, 2011 at 10:02
  • Yes, it's MVVM. Each module.dll has V, VM and VM uses Model.dll
    – katit
    Nov 4, 2011 at 12:56

1 Answer 1


You must keep Controls from referencing Model, looks like you are trying to cut some corners and your classes and structures used by UI controls start to leak in ViewModels, and even further the Model.

Think of DataGridRow, you do not use collection of DataGridRows in ViewModel, you use collection of Domain objects.

Data binding and Converters, are the tools to help you keep things separate, when designing your UI controls try to think abstract, imagine that you do not know with what kind of data they will work, try to think on user experience (behavior) they should provide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.