<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Layered-Architecture on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/layered-architecture/</link><description>Recent content in Layered-Architecture on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/layered-architecture/index.xml" rel="self" type="application/rss+xml"/><item><title>Layered versus Hexagonal Architecture</title><link>https://samirsahoo.github.io/design-patterns-hub/hexagonal-architecture/layered-vs-hexagonal/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/hexagonal-architecture/layered-vs-hexagonal/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Layered architecture&lt;/strong&gt; stacks the code in horizontal layers — typically presentation, business and data access. Each layer calls the layer below it, so dependencies point &lt;strong&gt;down, towards the database&lt;/strong&gt;.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Hexagonal Architecture&lt;/strong&gt;, also called &lt;strong&gt;Ports and Adapters&lt;/strong&gt; (Alistair Cockburn, 2005), puts the business logic at the centre. The core defines &lt;strong&gt;ports&lt;/strong&gt; — interfaces in its own terms — and technology-specific &lt;strong&gt;adapters&lt;/strong&gt; plug into them from outside. All dependencies point &lt;strong&gt;inwards, towards the business logic&lt;/strong&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The difference is one word: &lt;em&gt;direction&lt;/em&gt;. That single change has large consequences for testing and for changing technology.&lt;/p&gt;</description></item></channel></rss>