Where does Web API fit in a typical n-tier architecture?

后端 未结 2 1292
攒了一身酷
攒了一身酷 2020-12-25 15:22

Usually when i layout an n-tier architecture for a project I have the following layers:

  • Domain (domain model, repository contracts)
  • <
2条回答
  •  梦谈多话
    2020-12-25 15:57

    There are two possibilities

    • Middle-tier or middleware: this is where typically web services and WCF Services have been working. Using REST is much lighter than SOAP so this is de-facto use case. Web and WCF services are better in respect to client generation but Web API will gradually catch up.
    • Presentation layer: this will provide data to the Single-Page-Applications or any modern web site/application that uses data and renders on the client.

提交回复
热议问题