Question

I am making a data visualization application in Unity game engine that simply shows data in a 3D environment using google maps API.

I am using the three-tier architecture to explain the application. It has the following layers

  1. Presentation Layer Shows the visualization
  2. Logic Layer Transforms the data as per logic from the API and gives it to presentation layer
  3. Resources Layer google maps

My question is, where does the API call module goes, the one which requests data from google maps. Should it be in-between the logic and resource layer as another layer?

Or am I doing something wrong here...

Architecture Diagram

Was it helpful?

Solution

In a typical three-tier architecture, the logic layer is responsible for everything that isn't presentation and data.

That includes (this is not an exhaustive list) calculations, processing data, making decisions, etc. But most applicable to the question, it is responsible for moving data between the other two layers (usually transforming it on the way).

three-tier-architecture

So any component, application, software that you want to articulate that makes the call to the API in the data/resource layer exists inside the logic layer.

If you wanted to split the API call module out of the logic layer, you'd then have a four-tier architecture (perfectly good) where your logic layer is split into a business logic tier and a data access tier.

four-tier-architecture

Image sources are https://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture and http://vbsoftwaredeveloper.blogspot.com/2013/05/4-tier-ioc-application-converted-tier.html

Licensed under: CC-BY-SA with attribution
scroll top