Image for post
Image for post

There are 3 types of people that hopefully will stumble upon the article:

  1. Couch warrior. You keep saying smth like “Yet another waste of time”, “Scrum is all about meetings”, “Agile is dead” or nod when hear/read it. No action, just a negative attitude every now and then.
  2. I see what I want to see. “Scrum is loosely defined, in my team we do Scrum, but we don’t have Sprints and estimate in hours” — this would be completely fine for you to say. Inspired by this StackOverflow discussion.
  3. Whatever, I don’t care. Ex couch warriors that finally gave up.

Let me explain this seemingly straightforward yet widely misunderstood topic in this article. …


Image for post
Image for post

Some time ago I was tasked to write a standalone application in Java without the usage of Spring and Hibernate, lightweight frameworks only :) This application had to have a REST API for executing “money transfers” and store data in some in-memory database. …


Image for post
Image for post
Jump

Choose one:

  1. I don’t know what this term means at all or I’ve heard something about it but was lazy enough to read more, to understand it and try it in practice. Maybe at this point even TDD = Take a Deep Dive sounds right? :)
  2. TDD definition is clear — in theory, but when it comes to practice I don’t know whether all my code could be written in TDD style and what type of tests to write (unit, integration, system, etc.). So far I am fine with approaches of writing tests first or tests after.
  3. Oh, TDD — I use it already, from time to time. But, when it comes to refactoring or considering what test to write next I am stuck most of the time. Feeling a lack of creativity here and since it all is so time-consuming I tend to give up. Plus, I’ve heard that TDD is dead by the way. …


Image for post
Image for post
Adrian Ludwig Richter: Bridal Procession in a Spring Landscape

If you don’t feel confident about the meaning of dependency injection or IoC, better start with this article. I won’t tell you about absolutely all dependency injection types, but those that are possible while using Spring framework.

Spring documentation strictly defines only two types of injection: constructor and setter injection.

However, there are more ways to inject a dependency like a field injection, lookup method injection. To understand their difference, see detailed examples, learn the advantages or disadvantages of each approach — continue reading. Warning — long read! :)

Disclaimer

For each dependency injection type examples will include pure XML config (if possible) in the first place to present the idea and only after that XML + Annotations config to demonstrate the simpler and more common way of dependencies configuration. For the sake of brevity, I won’t show Java configuration examples. …


When I’ve heard this term for the first time and went googling it all ended up in even more questions: what is Inversion of control or IoC, IoC containers, coupled code and its decoupling, all these Spring, Guice … frameworks. They can confuse almost everyone from the very beginning. That’s why I would like to explain the principle of dependency injection (DI) and those concepts listed above in the simplest way possible. Before we start here is an amazing and very high-level explanation of the motivation behind DI usage:

Dependency injection for five-year-olds

When you go and get things out of the refrigerator for yourself, you can cause problems. You might leave the door open, you might get something Mommy or Daddy doesn’t want you to have. You might even be looking for something we don’t even have or which has expired. …

About

Ilia Ilin

Senior Java Developer. My favorite quote is “If you can’t explain it simply, you don’t understand it well enough.” Albert Einstein

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store