Week 5

PostgreSQL

Relationships and Constraints

Normalization

Joins

JDBC

SQL Injection2

IoC & DI

Practice

Assignment

Back end Track

Under construction

<aside> 🚧

This page is currently under construction. Please check back later.

</aside>

Implementation plan:

  1. What is tight coupling and why it's a problem
  2. What is Inversion of Control (IoC) — the framework manages object creation
  3. What is Dependency Injection (DI) — a form of IoC
  4. Spring's IoC container
  5. @Component — registering a class as a Spring bean
  6. @Service, @Repository — specialized stereotypes
  7. @Autowired — injecting dependencies (constructor injection preferred)
  8. Constructor injection vs field injection — why constructor is better
  9. How this enables testability (injecting mocks)
  10. Refactoring the in-memory API to use Spring DI properly

The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0

CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*

Found a mistake or have a suggestion? Let us know in the feedback form.