2

I made a desktop-application with WPF which used WPF's mighty DataBinding to update the UI synchroniously with the model. It manages files of folders, whereas the changes made to these files have to be shown in the UI.

Now I want to realise this as an ASP.Net-MVC Website with huge Backend: The problem I am basically meeting here is that in MVC, the User can only manipulate the Model (by using the View which routes to the corresponding controller etc...), and the model can not manipulate the View.

For example I want to show progress-bars which need to be synchroniously updated with the corresponding model. Is ASP.Net MVC the wrong direction, or is even a Web-Application (a Website with huge Backend) the wrong direction?

Greets, me.

user3698624
  • 225
  • 1
  • 10
  • Welcome to "really learning" about separation of concerns. This problem is easily solved if you use the ViewModel pattern you know from MVVM. The controller will have two methods, get and post; on the post action method you will assign the type of VMMyModel as the parameter. MVC itnitializes this automatically based on Post Query parms. You can then put 1 method in that VM named Post. If the ModelState is valid just call VM.Post and everything is there for you in the model. – JWP Jul 14 '15 at 13:49

2 Answers2

0

You can do progress bar(using ajax calls /Events and delegates),even heavy back end systems can be integrated in ASP.net MVC.

Muralikrishna
  • 159
  • 1
  • 11
0

You question was answered there before. I don't want to copy/paste code so, please check out next link - ASP.NET MVC 4 Async Controller Callback. What you need to do - to replace js client with WPF client.

But I personally prefer to use SignalR for this purpose. Check out next article how to do it:

Community
  • 1
  • 1
RredCat
  • 5,259
  • 5
  • 60
  • 100