jargon

Comparison

AutowiringvsConvention over configuration

Autowiring

nothing in the code says where the implementation came from, and the answer is that a scan found exactly one.

Letting a container work out which implementation satisfies a dependency, usually by scanning for types that fit. It removes a large amount of registration boilerplate and removes the ability to answer 'where does this come from' by reading. The characteristic failure is a second implementation appearing and the resolution becoming ambiguous — or worse, unambiguous and wrong.

Full entry →

Convention over configuration

you put the file in the expected folder with the expected name and it was picked up, with nothing declaring it.

Having a framework infer wiring from names and locations, so only the deviations need to be stated. It removes an enormous amount of declaration and moves the cost to discoverability: nothing in the code points at the mechanism, so a newcomer's only route in is documentation or a search of the framework. It works best when the conventions are few, loud and consistently enforced, and worst when a project has accumulated three generations of them.

Full entry →

Related comparisons