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.
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.
I don't know about MVVM but would MVC be okay for you? Then go for ASP.NET MVC.
Best Regards
Oliver Hanappi
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.
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