1

I am building a new simple web application using dotnet core (.NET Core) and Angular SPA.

Does it make sense to split API and Web App into different projects?

This would complicate things (especially with authentication) whereas I could simply use 1 single MVC controller that would render my only view that spits out my SCRIPT and the rest of the controllers are all Web API controllers that my Angular SPA will access?

Any best best practices applicable to the described scenario?

1

Use a single project to host the site. As you say its less complex, plus some parts of your app might require some dynamic page generation of some kind.

However, if you can get away with a static page rather than a controller + view I would do so.

note: make sure you have your service layer etc in its own class library though. I don't mean have all code in a single project

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.