web api + asp.net mvc

2014 年 4 月 28 日4090

O.P.

I'm curious about building an application that will serve as a back end for mobile apps and also as a stand alone website.

How does one normally structure an app like this. Presumably the web api is a good bet to talk with say an android app. But then how do you do the normal website ? Do you build separate controllers and use asp.net mvc (reusing the same business layer) ? Or is there some other preferred way to do it ? It would seem to me that the asp.net mvc controllers would be quite similar to logic you already wrote for the web api.

I'm also curious about authentication. This always seemed one of the trickier aspects to get right. Are people using the new asp.net identity ? There seems to be a scarcity of good information.

Thanks.

0 0