> For the complete documentation index, see [llms.txt](https://appseed.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://appseed.gitbook.io/docs/content/what-is/n-tier-architecture.md).

# N-Tier Architecture

Short introduction to Multi-Tier Architecture

Multi-tier architecture (often referred to as n-tier architecture) or multilayered architecture is a client–server architecture in which presentation, application processing, and data management functions are physically separated. Using an N-tier architecture, web developers can create modular applications.

### Common layers

In a multilayered architecture the most common used layers are:

* Presentation layer - the visual part of a web application
* Application layer - the server-side of a web application
* Database layer - the persistence layer where information is saved and updated

### Presentation layer

This layer handles the user interaction. This part of the application is usually built-in HTML and Javascript in various technologies and frameworks:

* [React](https://reactjs.org/) - the popular Javascript framework built by Facebook
* [Vue.js](https://vuejs.org/) - The Progressive JavaScript Framework
* [jQuery](https://jquery.com/)

### Application layer

Represents the server-side of the application and can be developed in many programming languages:

* [Php](https://www.php.net/) (the most popular server-side language ) using [Laravel](https://laravel.com/), [CodeIgniter](https://www.codeigniter.com/)
* [Python](https://www.python.org/) server-side apps can be developed using [Django](https://www.djangoproject.com/), [Flask](http://flask.pocoo.org/)
* [Ruby](https://www.ruby-lang.org/en/)

### Database layer

The majority of web apps requires a type of storage to save the relevant data:

* [MySql](https://www.mysql.com/) - the popular open-source database engine
* [SQLite](https://www.sqlite.org/index.html) - the lite version of MySql
* [MongoDB](https://www.mongodb.com/) - a document-based engine

### Common Architectures

In web development the most used architectures are:

### Single Tier architecture

The web application is served only once by the server, and runs entirely on the client-side

![Single Tier architecture](https://raw.githubusercontent.com/app-generator/static/master/docs/single-tier-architecture-sm.jpg)

### Two Tier architecture

Sometimes named Full-Stack architecture

![Two Tier architecture](https://raw.githubusercontent.com/app-generator/static/master/docs/two-tier-architecture-sm.jpg)

#### Links & Resources

* [Multitier Architecture](https://en.wikipedia.org/wiki/Multitier_architecture) - Wikipedia page
* [N Tier Architecture](https://www.guru99.com/n-tier-architecture-system-concepts-tips.html) - a comprehensive article (with samples)
* Techopedia [One-Tier Architecture](https://www.techopedia.com/definition/17374/one-tier-architecture) - blog article
* Techopedia [Two-Tier Architecture](https://www.techopedia.com/definition/467/two-tier-architecture) - blog article
* [Single-Tier vs. Multi-Tier Architecture](https://docs.bitnami.com/google-templates/singletier-vs-multitier/) - a comparison of concepts
