Gunnar Morling 5/4/2020

The Emitter Parameter Pattern for Flexible SPI Contracts

Read Original

This technical article discusses the 'Emitter Parameter Pattern' for designing flexible Service Provider Interfaces (SPIs) in software libraries. It argues that passing emitter objects as parameters, instead of using method return values, provides advantages like avoiding multiple data passes, reducing unnecessary object allocations, and improving API evolution by exposing only interfaces, not concrete classes. The blog uses a blog platform data extractor SPI as a detailed example.

The Emitter Parameter Pattern for Flexible SPI Contracts

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser