I am currently writing a web application in ASP.NET MVC, so far it is mostly a simple CRUD web app. The database is hosted on the cloud and I am using Entity Framework to interact with it.
I know that further in the development cycle we will have to make a mobile application (iOS with swift) which will interact with the same database, so I want to have a good framework that will be able to handle both without too much duplication of code or DAL, while still being secure.
Those are the options I have so far:
- Write my MVC web application and further down the line, make http requests to my controllers action from my app. Possible problems: Security and authentications of those calls?
- Write my MVC web application and a MVC Web API. Both my controllers of my web app and the iOS app will interact with this API. Possible problems: Will this setup work with the asp.net MVC web app?
- Write additional web methods in my MVC controllers specifically for the REST api call of my iOS app. Possible problems: Is it possible at all?