tags:

views:

1367

answers:

3

Hi,

I'm looking for an MVVM implementation for ASP.NET. How should I approach this ? Can you propose any design that solves this problem particularly for ASP.NET Webforms ?

Thanks.

A: 

I don't know about MVVM but would MVC be okay for you? Then go for ASP.NET MVC.

Best Regards
Oliver Hanappi

Oliver Hanappi
MVVM and MVC are completely different paradigms.
this. __curious_geek
I wouldn't say "completely different"... MVVM is largely based on MVC, although there are important differences
Thomas Levesque
I know that they aren't equal and therefore I asked if ASP.NET MVC would fit your needs to ;)
Oliver Hanappi
+1  A: 

A lot of MVC'ers are doing something akin to a view model in the sense that instead of returning domain objects to the controller, they have a flattened data structure (a view model) of all the data needed for that view regardless of how many domain objects worth of data it contains. In that regard a view model is very doable with MVC, and I'm sure it could be leveraged in webforms as well. However, there is no way that I know of to do the two way databinding / commanding / event aggregation that is associated with MVVM in WPF.

Although I don't know of any webform implimentations you could try some of the approaches described here:
Jimmy Bogard - How we do MVC

Here is a very interesting article on how to do MVP in winforms:
Castle Windsor's MVP with ASP.NET

Maybe you can create a hybrid of these two approaches using webforms.

Daniel Auger
+2  A: 

Take a look at http://aspnetmvvm.codeplex.com/.

The framework author aslo talks about it a little at: http://www.codeproject.com/KB/smart/PMinAction.aspx

Bless Yahu