Software Architecture – Hexagonal Architecture Pattern

software_architecture_patterns

                     In this article, we will see “Hexagonal Architectural Pattern” also known as “Ports and Adapters” pattern. As developers so far we have created applications with tiered architecture styles like MVC (Model View Controller). With these architectural styles, up to a certain extent, we were able to decouple the domain logic with other functionalities. At times the domain logic uses to leak into UI or other functionalities. As the core logic is getting leaked into other layers, the impact of the code change will have a ripple effect on other modules. To avoid this we can go with “Ports and Adapters” architecture style.

                      The “Ports and Adapters” style will have domain logic as Core and the Adapters will have the application logic specific to translate an interface from the outside request into a compatible one. The core and the adapters sit as the inner layer. The ports sit on the outer layer to interact with the external services. The below diagram depicts the above said architectural style.

hexagonal-architecture

                        The advantages of this style are the core logic abstracted from the outside world. The code is decoupled via the adapters. We can add or remove the new functionalities easily. We can perform testing of core logic and the adapters in isolation mode.

                      In the coming article, we will see what is microservices architectural style? and what are the driving factors behind it? Till then Stay Tune!!!

I am Siva Prasad Rao Janapati. Working as Technical Architect. Has hands on experience on ATG Commerce(DAS/DPS/DCS), Mozu commerce, Broadleaf Commerce, Java, JEE, Spring, Play, JPA, Hibernate, Velocity, JMS, Jboss, Weblogic,Tomcat, Jetty, Apache, Apache Solr, Spring Batch, JQuery, NodeJS, SOAP, REST, MySQL, Oracle, Mongo DB, Memcached, HazelCast, Git, SVN, CVS, Ant, Maven, Gradle, Amazon Web services, Rackspace, Quartz, JMeter, Junit, Open NLP, Facebook Graph,Twitter4J, YouTube Gdata, Bazzarvoice,Yotpo, 4-Tell, Alatest, Shopzilla, Linkshare. I have hands on experience on open sources and commercial technologies.

Tagged with: ,
Posted in Design Patterns

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

DZone

DZone MVB

Java Code Geeks
Java Code Geeks
%d bloggers like this: