jquery - Difference between Controller and API Controller in ASP.net? -


i have create application using asp.net mvc , web api , jquery api call.

now question :

1) controller have use if api controller or simple controller?

2) how can make project structure best way?

if use api in different project, have use ajax call that, how can use razor , models of mvc features?

and

if use controller api controller in mvc application, how can use model , views in application?

since no 1 else has chimed in.

first, link posted.

http://odetocode.com/blogs/scott/archive/2013/07/01/on-the-coexistence-of-asp-net-mvc-and-webapi.aspx

there alot of "overlapping" terms between two.

heck, still find hard know which sometimes.

mvc meant "web-tier". tier serves pages end-user-browser. (i'm going "most of time" here, not every single use-case).

when start mvc/webapi project in visual studio, (one of templates) mix mvc , webapi in same project.

this not how has setup, , professional level apps work on not way.

webapi builds ~services. means "no gui" ways of interacting data (again, common use, not exhaustive list)

my application mvc, calls webapi on separate tier. aka, separated 'mixture' of mvc/webapi in vs template.

why this? because right now, have browser clients. but, in future, if need write smart phone app, need create presentation layer smart phone, , call existing services i've written webapi.

that's 1 way @ it.

while terms overlap, different purposes.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -