c# - Architect an API layer -


broad, general question:

we have app approaching legacy status. has 3 clients: windows app, browser (web site) , mobile. data access layer convoluted @ best , has grown organically on years.

we want re-architect whole thing. windows app go away ('cause that more?) have browser based website , mobile app, both of consume (as of today, non-existant) api layer. api layer partially exposed third parties should wish own integrations.

here's question:

what api layer like? , that, mean... let's start in visual studio solution. api separate website? on iis, there 2 sites... 1 public facing website , api layer?

or, should api .dll within main website, , have endpoint url's part of single website in iis?

eventually, want update , publish 1 w/o impacting other. i'm unsure, on high level, how structure entire thing.

(if matters: each client has own install, either locally on network, or cloud hosted. db's single tenant.)

i think 1 single solution multiple projects.

if put api different site, can add swagger , swashbuckle api https://github.com/domaindrivendev/swashbuckle

this make documentation easy.

from here want put business logic (the things specific things) in third project.

from here have 2 options. webpage can consume own api, or can reference business logic project.

api on different site offers additional benefit if public facing: separation of domain load balancing , added protection resource limiting , throttling without site impact

these kinds of projects lot of fun, consider options , fit best.

i hope helps!


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -