Home  /  Questions  /  Question

555   99.9
Jun 14, 2010

Did anyone ever switch a UI from something to something else?


When reading about MVC, MVP, MVVM,... there are mostly two big reasons for using them:
  1. Testabilty
  2. Portability
Funny thing is: Most companies I was working in projects of, didn't know how to unit test. Telling them, that it's easy to unit test an MV based app didn't even result in a strange look. Well.. except for those companies in which I heard variations of the following: "Unit. Testing. Yeah yeah,... aha... right. Great thing... However, we don't do that."

Second point: Portability. Did ANYONE of you EVER have to switch an applications UI from let's say winform to wpf? Or from wpf to ASP.NET? Or from Silverlight to Console... ?

The thing is, looking at the Patterns in Action sample, I noticed that there is one HELL of an effort to get a list of customers displayed on screen which could (...) be reduced to a couple of lines when abandoning the MV patterns. If properly written, it wouldn't be *that* complicated to port the result... at least there wouldn't be such an overhead as with MV. And nobody can tell me that there is no such overhead... or even that there isn't anything of it except for the Presentation Layer to be ported.

I would love to see some real world examples of companies who successfully worked with any MV pattern, used their advantages and really had less effort than if they used a more classical approach.

Aside from that, I love your sample and the implementation of the patterns, since they are a great compilation of invaluable knowledge. Thanks guys!!

P.S.: When is 4.0 to be released?


588   99.9
Jun 15, 2010
I swapped an ASP.NET application UI with an ASP.NET MVC UI.  It was pretty easy to implement, you just have to know intracacies with that particular UI.


I don't write WinForms or WPF applications.  I have never had a need.


King Wilder
Funny thing is: The idea behind MVx is that it is easy to swap out any component if the overall design IS already following MVx. You say it was easy to swapp an ASP.NET UI to ASP.NET MVC UI. This is exactly what I expected to hear: If you have a more or less well designed application, you don't necessarily NEED an MVx design for easily replacing the view layer with another technology. This thesis reduces the advantage of a MVx approach (that is often underestimated in terms of necessary intial effort) to the second of the mostly acknowledged topics: Testability. --- Christian Jacob  Jun 21, 2010
True. The other thing about the MVC pattern is that it promotes a convention, which in my humble opinion, is great! Learning to use Design Patterns correctly will, as Christian states, reduce the need for any particular presentation layer. Which is also a good thing. And by following some conventions, even some that you define yourself, will help make your application stronger, IMHO. --- King Wilder  Aug 13, 2010