0

I have been asked by a software development consultant whether our application is 2-tiers or 3-tiers architecture. I googled the two terms and found out conflicting answers.

So here's how our application is currently structured:

  • Angularjs on the client side
  • Node.js code on the server side
  • Mongodb hosted on Atlas

The node.js code connects to the database via mongoose.connect, all CRUD operations (using mongoose) are written in a single crud class and we call these methods from any other class/file.

However this CRUD class file is within the same project with all other Classes.

I've read that the above may be considered a 3-tiers, but I've read elsewhere that the 3rd tier is usually the "Data tier" or the "Data code" , so basically this latter tier would be a separate process/app typically running on another server and it is the one which connects to the DB, and has all the CRUD methods that we need, and we call these curd methods via server-to-server web apis (from the 'logic tier'code to the 'data tier'code)

I am bit confused by the conflicting opinions, so what do you think? is our current structure 2 or 3 tiers?

  • Since this is really just terminology, is this just curiosity or is there some reason you want to know? – jfriend00 Aug 28 '19 at 17:03
  • Possible duplicate of [Explain the different tiers of 2 tier & 3 tier architecture?](https://stackoverflow.com/questions/2199176/explain-the-different-tiers-of-2-tier-3-tier-architecture) – Alex Blex Aug 28 '19 at 17:19
  • it's for learning. –  Aug 28 '19 at 17:39

1 Answers1

0

Logically is your application 2 tier. Technically i would classify it also as a 2 tier structure.
Simplified:

  • You have a database. (first tier)
  • The presenation and the business logic are realized in Angular. (second tier).

This is an assumption, because you have not explained, what is realized in Angular. But Node.js seams to be only a database wrapper.
In the case you would perform in Node.js you business logic, it would be a 3 tier architekture.

MagelanM
  • 58
  • 7