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 *https://hackyourfuture.net/*

CC BY-NC-SA 4.0 Icons

Built with โค๏ธ by the HackYourFuture community ยท Thank you, contributors

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