Kevin Jones
1 min readJan 8, 2018

--

“At first it may seem that setter injection is preferred since you have no argument constructors which will make it easy for you to create the object in production and test. However, there is one non-obvious benefit with constructor injection, which in my opinion makes it a winner. Constructor-injection enforces the order of initialization and prevents circular dependencies.” — good read, i was in a camp i didn’t know was a camp tbh.. i just thought setter based injection was a fallback approach… good to know though.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Kevin Jones
Kevin Jones

Written by Kevin Jones

Technologist and lead engineer @eBay web3 with 20 developing stuff for things with screens since Pocket PC's were fashionable and Geosites was a thing..

Responses (1)

Write a response