I’ve been searching on the net for possible answer to my question, but no luck at all.
I just wonder if I could use WCF as my Controller in ASP.NET MVC.
So if I call
(WCF)
http://localhost:1621/WCF/LogOut.svc?id=10001
It will work like
(MVC)
http://localhost:1621/WCF/LogOut?id=10001
Or I’m just having wrong thought about it?
Can you give some source for deeper knowledge in MVC and WCF.. Thanks!
The MVC states that the controller picks up requests and it is responsible for preparing the model and passing it to a view which is ultimately rendered.
Although from the perspective of web requests, WCF could possibly look like MVC, there is no easy way to make WCF render the HTML to the browser. This means that if WCF can implement “controllers” which produce “models” but is not designed to create “views”.
However, if your web application can pick up XML/JSON data produced by WCF calls (i.e. you have your views implemented purely at the client side) then yes, WCF does a good job as a provider of the “controller/model” part of the MVC.