4.2 Business Delegate
The Business Delegate pattern inserts an intermediary between the presentation tier and the business-service tier, hiding all the details of "how to find the service, how to make the remote call, how to handle low-level exceptions." The presentation tier deals only with the delegate, no longer coupled to concrete business-service APIs.
This is a classic J2EE-era pattern born to tame the complexity of EJB, JNDI, and remote calls. The lab below switches the backend implementation (EJB / JMS) — notice the client call line never changes, because the delegate absorbs the difference.
What it decouples
Without a business delegate, every presentation component directly imports and calls business-service interfaces, handling lookup and remote exceptions itself. The result:
- The presentation and business tiers are tightly coupled; change a business interface and the frontend changes everywhere.
- Lookup, retry, and exception-translation logic is duplicated and scattered across call sites.
The delegate gathers these into one place. The comparator below shows vividly how the number of presentation → business coupling links drops once a delegate is introduced.
Partnering with the Service Locator
The business delegate doesn't do "service lookup" itself; it usually delegates to a Service Locator (Section 4.7). Their roles are clean:
- Business Delegate: faces the presentation tier, offers simplified business methods, handles remote-call complexity.
- Service Locator: looks up and caches service instances by name.
class BusinessDelegate {
private BusinessService service = locator.lookup("OrderService");
public Result process(Request r) {
return service.process(r); // the presentation tier knows nothing of lookup/remoting
}
}Do we still need it today?
In today's world of pervasive dependency injection (DI), many business-delegate responsibilities are taken over by DI containers, API client SDKs, and gateway layers. But its core idea is still alive: give the presentation tier a stable, simplified business entry, keeping infrastructure complexity out the door. A microservice "client SDK / Feign interface" is essentially a modern Business Delegate.