Create Common Connectivity Components

Connectivity components such as database connection pools, messaging broker connection pools, HTTP thread pools, and others should be decoupled from your business logic components and managed separately. If you are using an application server that provides connection pooling out of the box this will be a non-event. But if you have applications outside an application server that need pooling functionality encapsulate them as separate components. Provide configuration options so each application that leverages these components can customize it. If there is code that couples connectivity and other types of logic actively refactor them out. Most importantly, when these components are in a production environment provide a means to reset or reinitialize them.

As Michael Nygard points out in painstaking detail in his book Release It! this is going to make the difference with stability and availability. From a reuse perspective, if the components are stable and robust it saves time for the consumer when leveraging the asset. Most importantly, this will increase trust in the quality of these assets which is key to ensuring your investments into reuse don’t go wasted.

Last updated