1

Hi I have worked for a couple companies now. Both used MVC to create their software. One company used WCF Services for all of their Ajax Calls while my most recent company is making all of their Ajax calls to their Controllers. I prefer the WCF method as it seems to keep the code cleaner and more readable, however, according to MVC all view calls should go through a controller. I was just wondering if anyone had any good information, references, or articles as to which is better practice, or if it's better to make service calls to a controller or WCF service? Thanks

1 Answer 1

2

It looks both approaches will work fine. But, WCF is more appropriate solution if you want to have something like Service Layer inside of your solution. But for Ajax calls from the Web part to Controller work okay.

Sign up to request clarification or add additional context in comments.

2 Comments

Are there any performance gains in using one over other? If you have an MVC app is there any point to ever creating a WCF if you never need a 3rd party to access it? Doesn't using the controller muddle the controller itself?
I don't think that there is some notable differences in performance. But WCF has other advantages, you can read here msdn.microsoft.com/en-us/library/ee658090.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.