<?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>Forem: linhvuquach</title>
    <description>The latest articles on Forem by linhvuquach (@linhvuquach).</description>
    <link>https://forem.com/linhvuquach</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%2F895482%2F8fdedcbc-32e9-4bd5-9fd6-7488ee16e0a2.jpg</url>
      <title>Forem: linhvuquach</title>
      <link>https://forem.com/linhvuquach</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/linhvuquach"/>
    <language>en</language>
    <item>
      <title>What are the common mistakes a person makes on the path to becoming Senior Software Engineer?</title>
      <dc:creator>linhvuquach</dc:creator>
      <pubDate>Sat, 23 Mar 2024 14:51:04 +0000</pubDate>
      <link>https://forem.com/linhvuquach/what-are-the-common-mistakes-a-person-makes-on-the-path-to-becoming-senior-software-engineer-5b4d</link>
      <guid>https://forem.com/linhvuquach/what-are-the-common-mistakes-a-person-makes-on-the-path-to-becoming-senior-software-engineer-5b4d</guid>
      <description>&lt;p&gt;I'll keep providing you with further perspective today, so you can identify and save time when you're trying to become a high-level Software Engineer.&lt;/p&gt;

&lt;p&gt;Boost your perspective by kook at my last blog here to Harnessing The 80/20 Principle For High-Paying Software Engineering Roles.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="https://linhvuquach.medium.com/efficiency-unleashed-harnessing-the-80-20-principle-for-high-paying-software-engineering-roles-8d159e60fedf" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2YHlAf7x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fill:88:88/1%2A_41gP0a-H8mYm-lOgsSRjQ.jpeg" alt="linhvuquach"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://linhvuquach.medium.com/efficiency-unleashed-harnessing-the-80-20-principle-for-high-paying-software-engineering-roles-8d159e60fedf" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Efficiency Unleashed: Harnessing The 80/20 Principle For High-Paying Software Engineering Roles | by linhvuquach | Mar, 2024 | Medium&lt;/h2&gt;
      &lt;h3&gt;linhvuquach ・ &lt;time&gt;Mar 23, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YjpYcCMa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        linhvuquach.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Becoming a senior software engineer is a significant milestone in one's carer, but it requires not only technical skills but also a strategic approach to career development.&lt;br&gt;
Here's a step-by-step guide to avoid common mistakes and navigate your career path effectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✒️Phase 1: Entry Level (0–2 years)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mistake&lt;/strong&gt;: Jumping too quickly into advanced technologies without mastering the fundamentals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to avoid&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Step 1&lt;/em&gt;: Focus on mastering core programming languages (e.g Python, C#, Java, C++) and data structures/algorithms.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 2&lt;/em&gt;: Engage in projects or internships that reinforce these fundamentals&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 3&lt;/em&gt;: Seek mentorship from experienced developers to understand best practices.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🏋️Phase 2: Mid Level (2–5 years)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mistake&lt;/strong&gt;: Getting comfortable with a single technology stack without exploring broader areas of software development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to avoid&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Step 1&lt;/em&gt;: Continuously learn new technologies, frameworks, and tools.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 2&lt;/em&gt;: Work on cross-functional projects to gain exposure to different parts of the software development lifecycle.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 3&lt;/em&gt;: Attend conferences, workshops, and online courses to broaden your skill set.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  😎Phase 3: Senior Level (5–10 years)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mistake&lt;/strong&gt;: Focusing solely on technical skills and neglecting communication, leadership, and mentorship abilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to avoid&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Step 1&lt;/em&gt;: Develop strong communication skills, both written and verbal, to effectively convey complex technical concepts.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 2&lt;/em&gt;: Take on leadership roles in projects or teams to hone your ability to lead and delegate tasks.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 3&lt;/em&gt;: Actively mentor junior developers and share your knowledge and experiences.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  😎Phase 4: Lead/Principle Engineer (10+ years)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Mistake&lt;/strong&gt;: Resting on laurels and not continuing to evolve and innovate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to avoid&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Step 1&lt;/em&gt;: Stay updated with industry trends and emerging technologies through continuous learning.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 2&lt;/em&gt;: Challenge yourself with complex problems and seek opportunities for professional development.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Step 3&lt;/em&gt;: Contribute to open-source projects, attend tech meetups, and engage in broader tech community.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎁Bonus
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Networking&lt;/strong&gt;: Build a strong professional network through your company, conferences, meetups, and online communities like GitHub and Stack Overflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feedback&lt;/strong&gt;: Solicit feedback regularly from peers, managers, and mentors to identify areas for improvement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Self-Awareness&lt;/strong&gt;: Continuously reflect on your strengths, weaknesses, and career goals to ensure you're on the right path.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⏹️Conclusion
&lt;/h2&gt;

&lt;p&gt;Avoiding common mistakes on the path to becoming a senior software engineer requires a combination of technical excellence, soft skills development, continuous learning, and strategic career planning.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When you find this post informative, don't forget to share it with your team and colleagues, thanks.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can reach me on Twitter &lt;a class="mentioned-user" href="https://dev.to/linhvuquach"&gt;@linhvuquach&lt;/a&gt;&lt;br&gt;
to get my new blog every week with a bunch of categories like software engineer, problem-solving, and how to make your product …&lt;/p&gt;

&lt;p&gt;See ya!&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>softwareengineering</category>
      <category>career</category>
      <category>careerdevelopment</category>
    </item>
    <item>
      <title>How to save datetime data that is relevant to multiple countries or time zones?</title>
      <dc:creator>linhvuquach</dc:creator>
      <pubDate>Sun, 17 Mar 2024 09:39:42 +0000</pubDate>
      <link>https://forem.com/linhvuquach/how-to-save-datetime-data-that-is-relevant-to-multiple-countries-or-time-zones-54io</link>
      <guid>https://forem.com/linhvuquach/how-to-save-datetime-data-that-is-relevant-to-multiple-countries-or-time-zones-54io</guid>
      <description>&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;When you need to save datetime data that is relevant to multiple countries or time zones, it's important to follow best practices for handling time zones and storing datetime information. Here are the steps you can take to achieve this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use a Consistent Time Zone
Choose a reference time zone for your application. It's common to use Coordinated Universal Time (UTC) as the reference time for storing datetime data because it's a standard time zone and doesn't have daylight saving time changes.
When storing datetime values, always store them in UTC
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The example below just assumes local time&lt;/span&gt;
&lt;span class="c1"&gt;// In reality, we get local time from end users&lt;/span&gt;

&lt;span class="c1"&gt;// Convert a Datetime to UTC&lt;/span&gt;
&lt;span class="n"&gt;DateTime&lt;/span&gt; &lt;span class="n"&gt;localTime&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// change for other DateTime value&lt;/span&gt;
&lt;span class="n"&gt;DateTime&lt;/span&gt; &lt;span class="n"&gt;utcTime&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;localTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToUniversalTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Convert a DatetimeOffset to UTC&lt;/span&gt;
&lt;span class="n"&gt;DateTimeOffset&lt;/span&gt; &lt;span class="n"&gt;localTime2&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DateTimeOffset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// change for other DateTimeOffset value&lt;/span&gt;
&lt;span class="n"&gt;DateTimeOffset&lt;/span&gt; &lt;span class="n"&gt;utcTime2&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;localTime2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToUniversalTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Convert to Local Time when displaying
When you need to display datetime data to users, convert the stored UTC datetime to the local time zone of the user or the relevant country before rendering it. This ensures the users see times and their local time.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 👇️ Example date and time in UTC&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;utcDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2022-11-16T11:02:17Z&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;utcDate&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// 👇️ Wed Nov 16 2022 18:02:17 GMT+0700 (Indochina Time)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ Convert to Local time&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLocaleString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 👉️ 11/16/2022, 6:02:17 PM&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Identify User Time Zones
If your application has user accounts or settings, allow users to specify their preferred time zone. Store this preference in their user profile or as a session variable. When display datetime data to the user, use their selected time zone for conversion.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Assuming you have an event object with a dateTime and timeZoneId property&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2023-11-11T15:00:00Z&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;timeZoneId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;America/New_York&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Parse the dateTime string and apply the user's preferred time zone&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;eventTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;timeZone&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timeZoneId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;eventTimeInUserTimeZone&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;eventTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLocaleString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;en-US&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;timeZone&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Display the eventTimeInUserTimeZone to the user&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Event time in user's local time: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;eventTimeInUserTimeZone&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;When working with datetime data, I hope my post todays helps you find a solution to the relevant problem. To learn more about some real-case examples, I also recommend you read the topic I've provided below with references.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When you find this post informative, don't forget to share it with your team and colleagues, thanks.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can reach me on Twitter &lt;a class="mentioned-user" href="https://dev.to/linhvuquach"&gt;@linhvuquach&lt;/a&gt;&lt;br&gt;
to get my new blog every week with a bunch of categories like software engineer, problem-solving, and how to make your product …&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Cheers! 🍺🍺&lt;/p&gt;

&lt;h2&gt;
  
  
  References:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/44965545/best-practices-with-saving-datetime-timezone-info-in-database-when-data-is-dep"&gt;https://stackoverflow.com/questions/44965545/best-practices-with-saving-datetime-timezone-info-in-database-when-data-is-dep&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>date</category>
      <category>database</category>
      <category>tip</category>
    </item>
    <item>
      <title>Clean Architecture In Enterprise Application</title>
      <dc:creator>linhvuquach</dc:creator>
      <pubDate>Thu, 08 Feb 2024 01:41:45 +0000</pubDate>
      <link>https://forem.com/linhvuquach/clean-architecture-in-enterprise-application-5ala</link>
      <guid>https://forem.com/linhvuquach/clean-architecture-in-enterprise-application-5ala</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fya2klhsr6vp12tl4mf20.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fya2klhsr6vp12tl4mf20.png" alt="The Clean Code Blog by Robert C. Martin (Uncle Bob)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futqjvfg9l7ek5qgj2vxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futqjvfg9l7ek5qgj2vxw.png" alt="The Clean Architecture Cone: Clean Architecture - Make Your Architecture Scream (codingblocks.net)A brief introduction to Clean architecture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A brief introduction to Clean architecture
&lt;/h2&gt;

&lt;p&gt;Clean architecture is a software architecture guideline proposed by Robert C. Martin(Uncle Bob) that aims to build scalable, testable, and maintainable software. It's derived from many architectural guidelines like Hexagonal Architecture, Onion Architecture, etc. over the years.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean Architecture concepts
&lt;/h2&gt;

&lt;p&gt;Clean architecture is a software architecture pattern that aims to achieve the following goals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Independent of frameworks: The core business logic of the application should not be dependent on any specific framework or technology. This makes the application more flexible and easier to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testable: The business logic should be easily testable in isolation from the rest of the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintainable: The code should be well-organized and easy to understand. This makes it easier for devs to make changes to the application without breaking things.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The basic principles of clean architecture are&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Dependency rule: Dependencies should always point inwards.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Abstraction: Use interfaces to abstract away the details of the implementation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Separation of concerns: Separate the different parts of the application into different layers. This makes the code easier to understand and maintain.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Layers in Clean Architecture
&lt;/h2&gt;

&lt;p&gt;1.&lt;strong&gt;Entities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This layer contains enterprise-wide business rules and is independent of the other layers. In OOP, this is the Object with methods and properties that comply with the Encapsulation principle - only inside the Object can change its own state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: Entity could be a User object that contains properties like Age, etc. The Age property can't be less than 1. If we need to change Age, we must write a public function set Age, which is also responsible for checking conditions related to Age.&lt;/p&gt;

&lt;p&gt;The business logic of the Entities layer won't care about or depend on the business logic in external layers such as Use Cases. Assuming the user must be 18 years old or older to create an account, the Age attribute rule in Entities remains unchanged.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Use cases&lt;/strong&gt;&lt;br&gt;
This layer contains application-specific business rules and is dependent on the Entity layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt; : The use case could be a CreateUser class that contains methods for creating a new user.&lt;/p&gt;

&lt;p&gt;The business logic of the Use Case won't care and depends on where the data comes from, what libraries are used as adapters, how the data is presented, etc. Because that is the task of the Interface Adapters layer.&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;Interface Adapters&lt;/strong&gt;&lt;br&gt;
This layer contains adapters that convert data from the Use Case layer into a format that can be displayed by the user interface&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: Interface Adapters could be a UserController class that handles HTTP requests and responses for user-related operations.&lt;/p&gt;

&lt;p&gt;Thus, the input and output data at the Interface Adapters layer only needs to be sufficient and reasonable. It won't care how specifically the data will be displayed or collected. Because that is the task of the Frameworks &amp;amp; Drivers layer.&lt;/p&gt;

&lt;p&gt;4.&lt;strong&gt;Frameworks and Drivers&lt;/strong&gt;&lt;br&gt;
This layer contains frameworks and tools that support the other layers such as devices, web, applications, databases, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: An example of this layer could be a Database class that handles database operations for the application.&lt;/p&gt;

&lt;p&gt;This table below is to help you quickly keep track of layers in Clean architecture.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Content&lt;/th&gt;
&lt;th&gt;Dependency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Entities&lt;/td&gt;
&lt;td&gt;Core business data and rules.&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use Cases&lt;/td&gt;
&lt;td&gt;Application-specific business rules.&lt;/td&gt;
&lt;td&gt;Depends on Entities, independent of Frameworks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interface Adapters&lt;/td&gt;
&lt;td&gt;Input and output mechanisms (UI, databases, frameworks).&lt;/td&gt;
&lt;td&gt;Depends on Use Cases, independent of Frameworks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Framework &amp;amp; Drivers&lt;/td&gt;
&lt;td&gt;External tools, frameworks, and technology-specific details.&lt;/td&gt;
&lt;td&gt;Depends on Interfaces and Use Cases&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Project structure
&lt;/h2&gt;

&lt;p&gt;🛠️MyAppServiceSolution/&lt;br&gt;
├── #️⃣MyApp.Shared/ - (It contains shared components, which aren't required in Clean architecture. It serves as your common service or packages in the future)&lt;br&gt;
│ └── …&lt;br&gt;
├── #️⃣MyApp.API/&lt;br&gt;
│ ├── 📂Controllers/&lt;br&gt;
│ │ ├── UserController.cs&lt;br&gt;
│ ├── 📂Extentions/ - Contains config extensions for the API layer&lt;br&gt;
│ │ ├── AppExtension.cs &lt;br&gt;
│ ├── Startup.cs&lt;br&gt;
│ └── …&lt;br&gt;
├── #️⃣MyApp.Dtos/&lt;br&gt;
│ ├── 📂Users/&lt;br&gt;
│ │ ├── UserRequestModel.cs&lt;br&gt;
│ │ ├── UserResponseModel.cs&lt;br&gt;
│ └── …&lt;br&gt;
├── #️⃣MyApp.Application/&lt;br&gt;
│ ├── 📂Services/&lt;br&gt;
│ │ ├── 📂Interfaces&lt;br&gt;
│ │ ├── IUserService.cs&lt;br&gt;
│ │ ├── UserService.cs&lt;br&gt;
│ ├── 📂Dtos/&lt;br&gt;
│ │ ├── UserDto.cs&lt;br&gt;
│ └── …&lt;br&gt;
├── #️⃣MyApp.Domain/&lt;br&gt;
│ ├── 📂Entities/&lt;br&gt;
│ │ ├── User.cs&lt;br&gt;
│ ├── 📂Repositories/&lt;br&gt;
│ │ ├── IUserRepository.cs&lt;br&gt;
│ └── …&lt;br&gt;
├── #️⃣MyApp.Infrastructure/&lt;br&gt;
│ ├── 📂Persistence/&lt;br&gt;
│ │ ├── 📂EntityConfigurations&lt;br&gt;
│ │ ├── 📂Migrations&lt;br&gt;
│ │ ├── 📂Repositories/ - Implement interface repositories from MyApp.Domain&lt;br&gt;
│ │ │ ├── UserRepository.cs&lt;br&gt;
│ │ ├── 📂Extentions/ - Contains config extensions for the Infrastructure layer&lt;br&gt;
│ │ │ ├── ModelBuilderExtensions.cs&lt;br&gt;
│ │ ├── MyAppContext.cs&lt;br&gt;
│ └── …&lt;br&gt;
└── #️⃣MyApp.Tests/&lt;br&gt;
 ├── 📂MyApp.UnitTests/&lt;br&gt;
 ├── 📂MyApp.IntegrationTests/&lt;/p&gt;

&lt;h2&gt;
  
  
  Map project structure to Clean Architecture
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Content&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MyApp.API&lt;/td&gt;
&lt;td&gt;Interface Adapters&lt;/td&gt;
&lt;td&gt;Could be considered as the entry point for your application, interacting with the application layer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MyApp.Application&lt;/td&gt;
&lt;td&gt;Use Cases (Application)&lt;/td&gt;
&lt;td&gt;It contains services that implement application-specific business rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MyApp.Contracts&lt;/td&gt;
&lt;td&gt;Interface Adapters&lt;/td&gt;
&lt;td&gt;The interface layer for Data Transfer Objects (DTOs) is shared between layers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MyApp.Domain&lt;/td&gt;
&lt;td&gt;Entities and Business Rules (Core layer)&lt;/td&gt;
&lt;td&gt;It contains business entities, repositories, and repository interfaces.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MyApp.Infrastructure&lt;/td&gt;
&lt;td&gt;Frameworks &amp;amp; Drivers&lt;/td&gt;
&lt;td&gt;It manages the database (persistence), contains external configuration extensions, and implements repository interfaces.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I'll skeleton Clean Architecture in the next chapter. See ya.&lt;/p&gt;

&lt;p&gt;You also reach my blog on medium.com by this link: &lt;a href="https://linhvuquach.medium.com/clean-architecture-in-enterprise-application-47d94015c93a" rel="noopener noreferrer"&gt;https://linhvuquach.medium.com/clean-architecture-in-enterprise-application-47d94015c93a&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://betterprogramming.pub/the-clean-architecture-beginners-guide-e4b7058c1165" rel="noopener noreferrer"&gt;https://betterprogramming.pub/the-clean-architecture-beginners-guide-e4b7058c1165&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/a-quick-introduction-to-clean-architecture-990c014448d2/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/a-quick-introduction-to-clean-architecture-990c014448d2/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.educative.io/blog/clean-architecture-tutorial" rel="noopener noreferrer"&gt;https://www.educative.io/blog/clean-architecture-tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.redhat.com/articles/2023/08/08/implementing-clean-architecture-solutions-practical-example#a_sample_clean_architecture_implementation" rel="noopener noreferrer"&gt;https://developers.redhat.com/articles/2023/08/08/implementing-clean-architecture-solutions-practical-example#a_sample_clean_architecture_implementation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://betterprogramming.pub/practicing-clean-architecture-in-c-62fe55aed83c" rel="noopener noreferrer"&gt;https://betterprogramming.pub/practicing-clean-architecture-in-c-62fe55aed83c&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>systemdesign</category>
      <category>backend</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>N-tier Architecture In Enterprise Application</title>
      <dc:creator>linhvuquach</dc:creator>
      <pubDate>Sun, 07 Jan 2024 11:45:50 +0000</pubDate>
      <link>https://forem.com/linhvuquach/n-tier-architecture-in-enterprise-application-9bm</link>
      <guid>https://forem.com/linhvuquach/n-tier-architecture-in-enterprise-application-9bm</guid>
      <description>&lt;h2&gt;
  
  
  N-tier
&lt;/h2&gt;

&lt;p&gt;An N-tier architecture divides an application into logical layers and physical tiers. These are the presentation tier, processing or logic tier, and data tier.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TB1uYnr4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eb7ksfn10fvxcv3mlf3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TB1uYnr4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eb7ksfn10fvxcv3mlf3x.png" alt="N-tier architecture - Code Project source" width="499" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Layers are a way to separate responsibilities and manage dependencies. Each layer has a specific responsibility. A higher layer can use services in a lower layer, but not the other way around.&lt;/p&gt;

&lt;p&gt;Tiers are physically separated, and they can also run on separate machines. A tier can call to another tier directly, or use asynchronous messaging (message queue). Although each layer might be hosted in its own tier, that's not required. Several layers might be hosted on the same tier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Physically separating the tiers improves scalability and resiliency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The separation of concerns into distinct layers promotes modularity, making it easier to understand, develop, and maintain each component independently.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Component within each tier can be reused in different parts of the application or even in different parts of the application or even in different applications altogether.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Less learning curves.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Drawbacks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Complexity: N-tier architecture can be complex, as it involves multiple layers and components&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance: Communication between different tiers, can introduce latency and overhead.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Project structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;🛠️MyApp.sln/
│
├── #️⃣MyApp.API/                   # Presentation Layer (API)
│   ├── 📂Controllers/              # API Controllers
│   │   └── TodoController.cs
│   ├── Startup.cs                # Application startup configuration
│   └── ...                        # Other API-related files
│
├── #️⃣MyApp.BusinessLogic/         # Business Logic Layer
│   ├── 📂Interfaces           # Interfaces for MyApp service
│   |     ├── ITodoService.cs           
│   ├── 📂Models                   # TODO (models | entities)
│   |     ├── Todo.cs                   
│   ├── TodoService.cs            # Implementation of MyApp service
│   └── ...                        # Other business logic files
│
├── #️⃣MyApp.DataAccess/            # Data Access Layer
│   ├── ApplicationDbContext.cs   # Entity Framework DbContext
│   ├── TodoRepository.cs         # Repository for MyApp data access
│   └── ...                        # Other data access files
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'll skeleton N-tier architecture for you in the future piece, guys.&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stackify.com/n-tier-architecture/"&gt;https://stackify.com/n-tier-architecture/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.baeldung.com/cs/n-tier-architecture"&gt;https://www.baeldung.com/cs/n-tier-architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ca.indeed.com/career-advice/career-development/n-tier-architecture"&gt;https://ca.indeed.com/career-advice/career-development/n-tier-architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Repositories: 

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nuyonu/N-Tier-Architecture/tree/main"&gt;https://github.com/nuyonu/N-Tier-Architecture/tree/main&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
