'What are the differences between Layered architecture with dependencies inversion and Hexagonal architecture?

I have been reading a bit on software architecture.

I noticed that I have used layered architecture with dependencies inversion. I have controller layer classes that are dependent on the service layer interfaces, and the services layer implementations are dependent on the repository layer interfaces. None of the layers are dependent on the concrete classes.

Now, I have come across the hexagonal architecture as well, and the idea of port and adapter feel pretty similar to a layered architecture with dependencies inversion.

What are the differences between these two architectural styles?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source