This question is connected with my older question C# Application GUI design dependent on configuration.
I have built quite big WinForms application working in industry for a few years. It communicates with many HW devices. Application can be configured to use or not use some of these devices and GUI is modified by this configuration. Now, even more devices (and application possible configurations) are going to be added, so I need to refactor whole application, maybe even write the most of it again and it will be very painful work as it was generally my the first bigger project.
Finally, I decided to start learning WPF and I'm going to rewrite this application again using WPF, partly because I feel that such complex WinForms application isn't easily extensible and maintainable, partly because I want to learn WPF anyway in the future.
I want to use it properly and separate business logic from UI. I came across some MVVM tutorials using WPF, but all of them are very simple. My application has quite complex menus, few DataGridViews
, and PixtureBox
, which I'm drawing some measured 2-D stuff onto.
As I said, application communicates a lot with several devices as well as with SQL server both-sided, and of course it has many threads. Also, there is quite a lot of miscellaneous dialogs.
At this moment in WinForms version, it's mess of logic and UI mixed together.
Can you suggest me any approach, how to start separating logic from UI in such kind of complex project?
I've read many WPF/MVVM tutorials, but all examples are simple, of course, and I'm not able to think in MVVM enough yet.
WPF in Action with Visual Studio 2008
. It's very nice book, but rather about WPF itself. For the next time, I'm going to readWindows Presentation Foundation 4.5 Cookbook
book, which offers full examples and I hope that it will be nice training how to use my WPF knowledge acquired in the first book.