<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hamid Tadayoni</title>
    <description>The latest articles on DEV Community by Hamid Tadayoni (@htadayoni).</description>
    <link>https://dev.to/htadayoni</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F544525%2F8534b57c-d953-4f32-988e-335061cd7988.png</url>
      <title>DEV Community: Hamid Tadayoni</title>
      <link>https://dev.to/htadayoni</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/htadayoni"/>
    <language>en</language>
    <item>
      <title>The difference between Tiers and Layers in Software Architecture</title>
      <dc:creator>Hamid Tadayoni</dc:creator>
      <pubDate>Sun, 21 Mar 2021 15:44:15 +0000</pubDate>
      <link>https://dev.to/htadayoni/difference-tiers-and-layers-in-software-architecture-4l3a</link>
      <guid>https://dev.to/htadayoni/difference-tiers-and-layers-in-software-architecture-4l3a</guid>
      <description>&lt;p&gt;In this article, we want to talk about &lt;strong&gt;layers&lt;/strong&gt; and &lt;strong&gt;tiers&lt;/strong&gt; in software architecture and talk about the difference between them, and after that, in the next articles, we can talk about layers and tiers in detail. &lt;br&gt;
This article is the first of a series about Web Applications Architect.&lt;/p&gt;

&lt;h2&gt;
  
  
  what are Layers in Software Architecture?
&lt;/h2&gt;

&lt;p&gt;Nowadays we use multi-layer architecture in a wide range of web applications and we make microservices or other architectures for multi-layer applications.&lt;br&gt;
If we want to talk about layers, we can say, each layer in an application, is a software separate part of our app that each layer has a separate duty.&lt;br&gt;
For example, we can create 3 layer app with a separate controller REST API, service, and data access layer.&lt;br&gt;
You can create a new layer for each logic in your app and create distinct departments to manage that part.&lt;/p&gt;

&lt;h2&gt;
  
  
  so what are Tiers in Software Architecture?
&lt;/h2&gt;

&lt;p&gt;Tiers are separate parts like layers but these parts are in deferent physical machines. What's mean?&lt;br&gt;
For example, if you run all 3 parts in the top example (in layer part) in one machine, you have a one-tier application.&lt;br&gt;
Come with me with some examples for understanding better.&lt;br&gt;
Imagine we have a to-do list application. This app has a mobile app, website, restful API, and a database.&lt;/p&gt;

&lt;p&gt;This image is our architect for this application:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NCQrVSvh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z1vllmatwhn987ydg8fm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NCQrVSvh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z1vllmatwhn987ydg8fm.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this application, we have an app with 5 layers and 3 tiers.&lt;br&gt;
Why?&lt;br&gt;
In the image, I specified each tier with purple color.&lt;br&gt;
The first tire is the client's phone. Because that is hardware and we run our application in that. so we have a tier for running our application. &lt;br&gt;
The second tier is our hardware to execute back-end codes (but we have 3 different sections that we talk about in layers).&lt;br&gt;
And the third tier is database hardware to save our data in the database.&lt;/p&gt;

&lt;p&gt;know I think you understand why we have 5 layers. because we have one layer on the client-side (our mobile app), one layer for our database, and in the second tier we have 3 layers! we separate our back-end logic into 3 parts.&lt;br&gt;
first, we have Rest API for communicating with the mobile app, second is a back-end server for handle our logic on data and create data models, and finally, we have a Data Access layer to access our Database layer.&lt;/p&gt;

&lt;p&gt;I hope my explanation was clear.&lt;br&gt;
If you have any questions, please contact me in the comments section.&lt;br&gt;
In the next sections, I will talk about layer and tier architecture in deep.&lt;/p&gt;

</description>
      <category>software</category>
      <category>architecture</category>
      <category>development</category>
      <category>application</category>
    </item>
  </channel>
</rss>
