Right now, this is how we do things on our site at work: there's an .aspx page that does absolutely nothing in the codebehind, but contains the markup for the page in the Design View. Then we have an .asmx web service that receives requests with JSON content-type. These are called by the JavaScript in the page. This web service returns .NET objects serialized to JSON in response to these JavaScript Ajax HTTP POSTs.
I'd like to switch to MVC but am not sure to how switch this architecture.
Basically what we're doing is two things:
1) Replying to GET /MyPage.aspx with HTML markup that represents the page
2) Replying to POST /MyPage.aspx/WebMethodName requests with .NET objects serialized to JSON.
It seems like MVC would be a good way to eliminate the need for a Page
object (again, the codebehind isn't used--only the HTML markup in the .aspx file is) and an .asmx web service. No?
What do I need to start changing to accomplish this switch? Is it straight-forward? Painful?
Someone at work already has an MVC page running in the same directory as my Web Forms .aspx and .asmx web service, but I don't see anything in the directory about Routes, so I'm confused. He's got a Views, ViewModels, and Controllers subdirectories.