tags:

views:

91

answers:

1

I've been unleashed on version 2 of an application my company has been working on. It was our first foray into WPF and needless to say, a lot of lessons were learned. The product took a year to develop, so it's not a small application by any means. Everyone recently came on board with MVVM.

Now that we have a large code base with plenty of x:Name's and lots of logic in the code backing files, is it too late to switch to something like MVVM moving forward? Keep in mind, it's probably not in the budget to go back and change existing windows to adopt this pattern, so there will always be a mixture of both, should be adopt MVVM going forward.

Appreciate opinions on the matter.

+3  A: 

I was in a similar situation. We started our WPF app when WPF was still in beta, and needless to say, we made a lot of mistakes in the early days. When we learned about MVVM it was clear that it was much better than our “MV” approach.

We already a fairly large existing code base and it was not realistic to stop what we were doing and convert to MVVM. We decided that all future development would use the MVVM pattern and we would gradually migrate the existing code base. Basically, whenever we needed to change an existing screen we took that opportunity to refactor and convert to MVVM.

That approach worked out well and today the entire project is using MVVM.

John Myczek
Thank you. This is exactly the type of response I was hoping for. I appreciate you sharing this experience. It helps immensely.
billb