Inversion of Controls and Dependency Injection

It is a framework that call to the custom, or task-specific, code.

Spring is a very famous IoC framework thats call your custom code.

Similar Technology: JDNI

Implementation Techniques:

  1. Factory Pattern
  2. Service Locator Pattern
  3. Constructor Injection
  4. Parameter Injection
  5. Setter Injection
  6. Interface Injection
  7. Template Method Design Pattern
  8. Strategy Design Pattern

 

 

Thread safety

It is piece of code is safety executed to manipulate shared data by multiple thread at the same time.

Implementation Approaches

Thread-local storage: Variables are localized

Immutable object: State of object cannot be changed after construction

Mutual Exclusion: no concurrent process, e.g. Locking

Atomic Operation: e.g. version