aDoubleSo
aDoubleSo

Reputation: 1148

is it a good manner holding project parts separately

Is it a good manner to split a software project in different sub projects. I want to separate the different, more ore less complex, dialogs to single projects in my solution. Every dialog is build by the mvvm pattern/paradigm. Now I want to initiate the "main" project an hold the different subproject only as reference. Am I running in problems, when using unit tests e.g.?

Upvotes: 3

Views: 92

Answers (2)

Stefan
Stefan

Reputation: 17658

Usually a separation of:

  • UI
  • Business / ViewModels
  • Data layer

is quite common and a good habbit.

For UI specific. It is usually not necessary, unless you want to expose your UI components as a external library.

This will create some overhead, and sometimes leave you with a headache. (I tried it once with pre-compiled pages in MVC: bad idea).

My personal opinion: if you're not using it as external library in different project, it's not worth the extra work. (versioning, UI-threading stuff, other unforeseen issues...)

Upvotes: 1

fhnaseer
fhnaseer

Reputation: 7277

Splitting a project into different projects is good. But it depends how you separate it. If you are putting views in one project, view models in other, model in other, then this would be really bad. Keep all UI stuff in one project and model in other.

When following MVVM, I usually have two projects. One is exe containing Views and ViewModels while second project containing Model data. There are two unit-tests projects one for application (unit-testing of viewModels) and one for data. Now here Model can further split into multiple projects depends on what Model contains.

Upvotes: 1

Related Questions