0

I'm in the process of designing a website (ASP.NET MVC 5) initially that will feature a native mobile application down the road. I'd like to include ASP.NET Web API inside this project for the purpose of exposing services to this mobile application. Is it wise to mix these two items in the same project? Or would it be better if I create two separate projects altogether. The mobile app will be built with the Ionic framework + angular. Are there pros and cons to designing it this way?

2
  • Possible duplicate of Should I create separate models for ASP.NET MVC and ASP.NET Web API? Commented Mar 20, 2016 at 3:00
  • Seems like a bit of back and forth between including them or not. I am asking if building a mobile application that uses the same data from the mvc project inside one application is a good thing. Commented Mar 20, 2016 at 3:07

1 Answer 1

0

Depends on what scalability you want to get. If it is a small project and limit number of users, you may do it in a single project. Otherwise, you might want to separate them so you could deploy them to different servers.

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

1 Comment

One can deploy the same web site to multiple servers, too--but you're right, that comes with difficulties around session usage, caching, and (potentially) things like anti-forgery tokens. So deploying to different servers is an interim solution only: once traffic grows enough to need more servers for either one of the sides, you're going to be in the same pickle. This means that if you expect them to grow, build everything distributed from the start!

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.