<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by NamKout on Medium]]></title>
        <description><![CDATA[Stories by NamKout on Medium]]></description>
        <link>https://medium.com/@caohoangnam114?source=rss-42d5b6f42ff5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*2aGzuFia5-slJjKNbDCQ4w.jpeg</url>
            <title>Stories by NamKout on Medium</title>
            <link>https://medium.com/@caohoangnam114?source=rss-42d5b6f42ff5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:01:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@caohoangnam114/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building sample clean architecture golang]]></title>
            <link>https://medium.com/culi-tech-viet/building-sample-clean-architecture-golang-494d719ef348?source=rss-42d5b6f42ff5------2</link>
            <guid isPermaLink="false">https://medium.com/p/494d719ef348</guid>
            <category><![CDATA[gorm]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[lozi]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[NamKout]]></dc:creator>
            <pubDate>Tue, 12 May 2020 19:29:20 GMT</pubDate>
            <atom:updated>2020-05-12T19:29:20.155Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi guys, I’m a Front-End developer. Before there was a time 2 years working CMS Magento, I like CMS Magento because system clean, and architecture database EAV (Entity — Attribute — Value) but I don’t understand why present I’m dev front-end (I don’t know) in the 2-year current. And present I chance comeback working position Back-End that I like. So, I introduction project small clean architecture building golang and I’ve read some articles following:</p><ol><li><a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html">https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html</a> (Uncle bob)</li><li><a href="https://medium.com/hackernoon/golang-clean-archithecture-efd6d7c43047">https://medium.com/hackernoon/golang-clean-archithecture-efd6d7c43047</a> (Iman Tumorang — Software Engineer)</li><li><a href="https://medium.com/@eminetto/clean-architecture-using-golang-b63587aa5e3f">https://medium.com/@eminetto/clean-architecture-using-golang-b63587aa5e3f</a> (Elton Minetto — CTO)</li></ol><figure><img alt="Struct Project" src="https://cdn-images-1.medium.com/max/1024/1*6kI9L2zehIxugbUXPr_rrA.png" /><figcaption>View Struct Project</figcaption></figure><h4>Summary</h4><p>If you have read through the article Uncle bob, he said that: <br>&gt; Each has at least one layer for business rules, and another for interfaces.</p><p>So, each of these architectures produce systems that are:</p><ol><li>Independent of Frameworks. The architecture does not depend on the existence of some library of feature laden software. This allows you to use such frameworks as tools, rather than having to cram your system into their limited constraints.</li><li>Testable. The business rules can be tested without the UI, Database, Web Server, or any other external element.</li><li>Independent of UI. The UI can change easily, without changing the rest of the system. A Web UI could be replaced with a console UI, for example, without changing the business rules.</li><li>Independent of Database. You can swap out Oracle or SQL Server, for Mongo, BigTable, CouchDB, or something else. Your business rules are not bound to the database.</li><li>Independent of any external agency. In fact your business rules simply don’t know anything at all about the outside world.</li></ol><p>More at <a href="https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html">https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*B7LkQDyDqLN3rRSrNYkETA.jpeg" /></figure><p>In architecture of Uncle Bob divide 4 layers:</p><ul><li>Entites</li><li>Use Cases</li><li>Controller</li><li>Framerwork &amp; Devices</li></ul><p>In my project divide layers:</p><ul><li>Models</li><li>Use case</li><li>Repository</li><li>Delivery</li></ul><p><strong>Models:</strong></p><ul><li>Models is same as entites. It set of data struct, interface and method, functions. Example model: Book</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/79d888cab99cb6f26f48eccb75cde323/href">https://medium.com/media/79d888cab99cb6f26f48eccb75cde323/href</a></iframe><p><strong>Usecase</strong>:</p><ul><li>This a layer will handle problem logic business. This a layer decide repository will use. And have responsibility to provide data to layer delivery use.</li><li>Layer Usecase a depends layer Repository</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/93fba30f284e860ba8d3414a6e249af0/href">https://medium.com/media/93fba30f284e860ba8d3414a6e249af0/href</a></iframe><p><strong>Repository</strong>:</p><ul><li>This a layer will handle to database method: fetch, put, delete, get, etc.</li><li>Layer responsibility will choose DB use in application. Could be Mysql, Postgresql, MongoDB, MariaDB, etc</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f64164adb1046adfce6f42c6acd2053/href">https://medium.com/media/3f64164adb1046adfce6f42c6acd2053/href</a></iframe><p><strong>Deliver</strong>:</p><ul><li>This a layer will decide how the data present. Could be REST API, HTML, or gRPC whatever the decide type.</li><li>This a lay accept the input from user and send layer Usecase handle logic</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71246c3ab19bb7e79a7f4075f9f3af1c/href">https://medium.com/media/71246c3ab19bb7e79a7f4075f9f3af1c/href</a></iframe><p>Current my project building on based 4 layers: Model, Usecase, Repository, and Delivery which I present above. And my project interview, I think it not good. I will rebuild the architecture project in article next.</p><blockquote>You should understand architecture someone and accept it in a project of you. That will give you look good and remember to start with it simple</blockquote><p><strong>Link Project: </strong><a href="https://github.com/caohoangnam/go-clean-architecture">https://github.com/caohoangnam/go-clean-architecture</a><br>Tech stack using:<br>- Gorm<br>- Gin Framework<br>- Postgresql<br>- Viper<br>- Clean Architecture</p><p><em>If you have a question , or need more explanation, or something, that I can not explain well here, you can ask me from my </em><a href="https://www.linkedin.com/in/chnam93/"><em>linked</em></a><em> or </em><a href="/service/mailto:caohoangnam114@gmail.com"><em>email</em></a><em> me. Thank you so much.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=494d719ef348" width="1" height="1" alt=""><hr><p><a href="https://medium.com/culi-tech-viet/building-sample-clean-architecture-golang-494d719ef348">Building sample clean architecture golang</a> was originally published in <a href="https://medium.com/culi-tech-viet">Culi Tech Viet</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>