So I’m about to create my first SPA project using .NET MVC4. But I just need a little clarification before I start. It seems from a few tutorials, SPA is built based on WebAPI architecture.
-
Is it safe to say SPA = WebAPI + knockout.js + history.js +
upshot.js which all together function as a web application that can
run somewhat offline? so later down the road if we want to build a
native phone app, we can always just call it from the SPA
DataServiceController? -
What’s the difference between webAPI controller
(that inherits from ApiController) VS SPA controller (that
inherits from DbDataController<..>)
SPA works with WebAPI, history.js, upshot.js. Knockout is not necessarily required (i.e. you can choose your own client-side framework. From what I understand, you need to use Entity Framework as well.
DbDataController is a generic type that requires specifying the DataContext you want to expose. This is not required with ApiController. It seems that there SPA requires using EF, which seems restrictive in my opinion.