0

We're a team of developers working on Web-based (ASP.NET, MVC, Web API, Angular) project. Up to recent time, it was purely ASP.NET, MVC. Now we want to split project into several

  1. Server-side
  2. MVC (5.2) for forms entry (may be will begone in some future)
  3. Angular for client-side business logic
  4. Web API to expose server-side logic to (1) and (2)

Currently, we deploy (1) + (2) + (3) as IIS Website, all works fine. Adding (4) creates a bit of an issue -- all pros and cons are not clear to me. We will need calls from (3) to (4) and from (2) to (4) to make transition smooth and we need to keep authentication (Windows-based) in place for (4) as requirement from IT.

  • Deploy Web API as a individual appilcation in IIS. How would different developers address (2) and (4) with different configurations on different machines (e.g.: Dev1 has (1)&(2): localhost:54345 and (4) localhost:61975, Dev2 has (1)&(2): localhost:21212 and (4) localhost:33124, QA instance: (1)&(2): qa-box/QAApp1, (4) qa-box/QAAPI1; production, etc) -- how to keep track that calls to (1)&(2) and (4) have different base URLs in different instances?
  • Create a "proxy controller" in (2) that will proxy calls to (4), something like here: How to set up Web API Routing for a Proxy Controller? . However, it is not clear, how to pass user's authentication
  • Just incorporate (4) into (2) by means of projects-dependencies inside one .sln and deploy just one application (not preferred solution, if we may need to extend (4) to a different server, etc

What would you suggest as a better approach on separating Web API and "workable" with in different deployments?

Thanks!

Community
  • 1
  • 1
rezdm
  • 165
  • 1
  • 11
  • Are you splitting because you want to deploy to different servers? Or are you splitting because you want the projects neat and clean, and one server will suffice? – Alexander Apr 05 '16 at 12:56
  • Why do you have both 2 and 3? Seems like both provide UI and talk to the same server-side business logic. – Andrei Apr 05 '16 at 13:03
  • @Alexander, to start with, just "neat and clean". – rezdm Apr 05 '16 at 13:03
  • @Andrei: historical reasons, in general, we're planning to move to (3)+(4), but it's a matter of quite some time. – rezdm Apr 05 '16 at 13:04
  • 1
    Make a reference in your web ui project to the web api project. Deploy the web ui project and marvel how it responds to the api calls. And when the other server comes, undo. – Alexander Apr 05 '16 at 13:09

0 Answers0