1

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.

  1. 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?

  2. What's the difference between webAPI controller (that inherits from ApiController) VS SPA controller (that inherits from DbDataController<..>)

1 Answer 1

0
  1. 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.

  2. 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.

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

Comments

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.