N-Tier Architecture

“N-tier architecture is also called multi-tier architecture because the software is engineered to have the processing, data management, and presentation functions physically and logically separated. That means that these different functions are hosted on several machines or clusters, ensuring that services are provided without resources being shared and, as such, these services are delivered at top capacity. The “N” in the name n-tier architecture refers to any number from 1.”

Also see Web Application Architecture

Application Architecture : 2 Layer

Web UI & Web API

  • Mocking is needed for both Data and Business however both UI and API use models from Core.Entities which were mapped in Data/Business.

Business

  • Will mostly have pure functions with the exeption of probably DateTime related functions.
  • Knows nothing about the Data module so no mocking is needed for unit tests in the

Application Architecture : 2 Layer

Application Architecture : nLayer

Web UI & Web API

  • No mocking is needed for Data only business, if a repository from Data is injected this is considered an END RUN

Business

  • Mocking is needed for data, should accept and respond with Core.Entities

Application Architecture : nLayer

References