1

We are planning an update for a web application implemented using ASP.NET Web Form. We'd like to inctroduce MVC pattern, so we are basically oriented to MVC 4.

We are also evaluating AngularJs, that seems a great MVC framework for web development.

I've read a bit about using AngularJs + Web Api, but I have no experience about Single Page Applications or asynchronous applications. For example, how they implement authentication?

I'd like to know if there's a well known architecture for asynchronous application developing, and how can I implement this with MVC 4 + AngularJs.

Any suggestion?

3 Answers 3

5

instead of using WebAPI, take a closer look at www.servicestack.net

AngularJS with servicestack backend -> works like a charm! i'll never switch back to webapi!

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

2 Comments

do you know if there an example / prototype for angularjs->Servicestack, TBH it's the first time I ever seen it and it looks awesome!
Service Stack + AngularJS Example: razor.servicestack.net/rockstars?View=AngularJS
1

AngularJS is a great MVW (Model-View-Whatever) framework and already provides a lot of "architecture" for developing a web app. Therefore, I am not sure why you would want to use MVC4 + AngularJS. AngularJS has asynchronous built in - $http and $resource can be used to make asnync calls.

They also recently added animation support making web animations super easy to implement. So there is a lot that AngularJS has already built in and one just needs to become familiar with it. I suggest you look at some sample applications such as this one.

2 Comments

I also need to implement authentication and role authorization in my app. Does Angular provide some utilities to deal with these?
Check out frederiknakstad.com/…. You would create a module to handle your authentication.
0

There are plenty of guides around for doing so. Since WebApi is a RESTful service you can use angularjs $http or/and $resource for consuming it.

Additionally there are libraries out there for consuming RESTful services which work as a middle man for frameworks like Angular and MVC. Check out This Visual Studio template.

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.