Layered architecture is a common architectural pattern for organising application components into distinct technical layers – presentation, application, business, persistence, etc
The separation of concerns between components is the most powerful feature of layered architecture.
The problem with layered architecture is that because the application architecture is ๐ด๐ฆ๐จ๐ณ๐ฆ๐จ๐ข๐ต๐ฆ๐ฅ ๐ท๐ช๐ข ๐ต๐ฆ๐ค๐ฉ๐ฏ๐ช๐ค๐ข๐ญ ๐ญ๐ข๐บ๐ฆ๐ณ๐ด, there is no clear concept of the domain dimension.
To change a certain feature developers generally need to change code in multiple layers as the functionality is spread among different layers.
A better alternative to layered architecture is ๐ต๐ฒ๐ ๐ฎ๐ด๐ผ๐ป๐ฎ๐น ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ, also called ๐ฝ๐ผ๐ฟ๐๐ ๐ฎ๐ป๐ฑ ๐ฎ๐ฑ๐ฎ๐ฝ๐๐ฒ๐ฟ๐ ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ. With hexagonal architecture the application architecture is ๐ด๐ฆ๐จ๐ณ๐ฆ๐จ๐ข๐ต๐ฆ๐ฅ ๐ท๐ช๐ข ๐ฃ๐ถ๐ด๐ช๐ฏ๐ฆ๐ด๐ด ๐ฅ๐ฐ๐ฎ๐ข๐ช๐ฏ.

The hexagonal architecture divides a system into several loosely-coupled interchangeable components, such as the application core, the database, the UI, test and interfaces with other systems.
๐ง๐ต๐ฒ ๐บ๐ฎ๐ถ๐ป ๐ฝ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ ๐ผ๐ณ ๐ต๐ฒ๐ ๐ฎ๐ด๐ผ๐ป๐ฎ๐น ๐ผ๐ฟ ๐ฝ๐ผ๐ฟ๐๐ ๐ฎ๐ป๐ฑ ๐ฎ๐ฑ๐ฎ๐ฝ๐๐ฒ๐ฟ๐ ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฎ๐น ๐ฝ๐ฎ๐๐๐ฒ๐ฟ๐ป ๐ถ๐ ๐๐ต๐ฎ๐ ๐๐ผ๐๐ฟ ๐ฏ๐๐๐ถ๐ป๐ฒ๐๐ ๐น๐ผ๐ด๐ถ๐ฐ – ๐๐ต๐ฒ ๐ต๐ฒ๐ ๐ฎ๐ด๐ผ๐ป – ๐ถ๐ ๐ฝ๐ฟ๐ผ๐๐ฒ๐ฐ๐๐ฒ๐ฑ ๐ฎ๐ป๐ฑ ๐ฐ๐ฎ๐ป ๐ผ๐ป๐น๐ ๐ฐ๐ผ๐บ๐บ๐๐ป๐ถ๐ฐ๐ฎ๐๐ฒ ๐๐ถ๐๐ต ๐๐ต๐ฒ ๐ผ๐๐๐๐ถ๐ฑ๐ฒ ๐๐ผ๐ฟ๐น๐ฑ ๐๐ถ๐ฎ ๐ถ๐ป๐๐ฒ๐ฟ๐ณ๐ฎ๐ฐ๐ฒ๐ – ๐๐ต๐ฒ ๐ฝ๐ผ๐ฟ๐๐ – ๐๐ต๐ฎ๐ ๐ฎ๐ฟ๐ฒ ๐๐ต๐ฒ๐ป ๐ถ๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐๐ฒ๐ฑ ๐ถ๐ป ๐๐ผ๐๐ฟ ๐๐ฒ๐ฐ๐ต๐ป๐ผ๐น๐ผ๐ด๐ ๐ผ๐ณ ๐ฐ๐ต๐ผ๐ถ๐ฐ๐ฒ, ๐๐ต๐ฒ ๐ฎ๐ฑ๐ฎ๐ฝ๐๐ฒ๐ฟ๐.