Java EE 8 Design Patterns and Best Practices
上QQ阅读APP看书,第一时间看更新

Explaining the concept of the integration tier

As discussed in previous chapters, Java EE is divided into three well-known tiers—the presentation tier, the business tier, and the integration tier. These tiers work together to promote solutions with a high level of decoupling.

In a business environment, software development is very difficult as we need to think about the whole ecosystem of the enterprise. An ecosystem includes its data source, software, data politics, security, and devices. Consequently, the developer needs to think about how to read and write data in these data sources, how the software communicates between with each other, how the data policies are implemented on the systems, how the security works on the business environment, and so on. In this case, it would be beneficial to create a tier to resolve all integration and communication problems, because their solutions will be decoupled from business logic. This is the thought process that gave birth to the integration tier.

The integration tier is the tier responsible for decoupling the business logic from the integration logic throughout the whole application. This tier has the logic of communication with an external resource or system, and this stays separate from the business logic. This tier will make it possible to read and write data from external sources, making communication between applications and components of the business ecosystem feasible. Furthermore, this tier will hide all communication complexity from the business tier. The business tier will then receive the data without knowing the complexity of the communication between the components and how they are structured.

Nowadays, it is extremely rare to develop an application with integration but without some kind of integration with an external resource. This is because the application always needs to read data from a source, and this source is generally outside of the application in databases or filesystems. If the application has an external data source as its dependency, then this application needs to be integrated to access the data from the external data source. The simpler application will then have an integration tier.

Over time, the complexity of integration between resources or systems grew, because more and more business logic needs to be integrated to promote a good response to businesses. With this, there emerged a necessity to create a common solution to integration problems that occur over and over, and with this, the integration patterns were created.