Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
We have a large scale winform application with more than 100 clients. Now we have decided to move forward & redesign the app with WPF. I have looked at some examples on MVVM Pattern & thought of below structure:

Server Side: Database -> WCF Service
Client Side: DataSource dll (plain data classes)
DataAccess dll (will refer to data source dll & perform database related operations)
BusinessLogic dll(will refer to DataSource & DataAccess dll)
UI_Model dll (will refer to DataSource dll & BusinessLogic dll)
UI (will refer to UI_Model dll)

Please note I have separated view(UI) from viewmoded (UI_Model) by creating a separate dll for viewModel, is it a correct approach? Or my view & viewModel should both remain in one project? I would appreciate if anyone can suggest me whether I am on a right track or required to change the structure.

Thanks
Posted

1 solution

I'm not sure why you are using a UI_Model here? What would be there?

I normally consume POCO data classes in my view model - and either wrap them or otherwise present the information to the Views

I also separate my View and ViewModel into different projects in the solution, with the View project having a reference to the ViewModel project - that way I avoid accidentally referring to some View information from my ViewModel.

So I normally end up with:

VIEW binds to VIEWMODEL which uses DATAOBJECTS provided by BUSINESSLOGIC via DATASERVICES from SOMEDATASOURCES
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900