paint-brush
A functional approach to dependency injection in Javaby@johnmcclean
6,555 reads
6,555 reads

A functional approach to dependency injection in Java

by John McClean6mAugust 11th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Normally in <a href="https://hackernoon.com/tagged/java" target="_blank">Java</a> we use frameworks that resolve dependencies at runtime, and this can often result in hard to track down errors on deployment. A more functional alternative is to structure our programs slightly differently so that dependencies can be injected lazily in a type safe manner. The compiler and not runtime will identify and catch errors for us. Let’s start with a question:

Coin Mentioned

Mention Thumbnail
featured image - A functional approach to dependency injection in Java
John McClean HackerNoon profile picture
John McClean

John McClean

@johnmcclean

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite