---
title: "Discussion on \"Is that Dependency Injection or Service Locator Pattern?\" | Hashnode"
description: "Discussion on \"Is that Dependency Injection or Service Locator Pattern?\". I have to admit to something. For the last 2 years, I was using Service Locator Pattern in one of my projects while being completely convinced that I was using Dependency Injection, but it turns out that I'm not alone in making such a mistake. What a..."
url: "https://hashnode.com/posts/dependency-injection-service-locator-1/61a0d7e09829fb749bcc02dc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Is that Dependency Injection or Service Locator Pattern?](https://blog.wasinski.dev/dependency-injection-service-locator-1?utm_source=hashnode&utm_medium=feed)

I have to admit to something. For the last 2 years, I was using Service Locator Pattern in one of my projects while being completely convinced that I was using Dependency Injection, but it turns out that I'm not alone in making such a mistake. What a...

Dec 4, 2020 · 5 min read · blog.wasinski.dev  
Read the article

-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#design-principles](https://hashnode.com/tag/design-principles)
-   [#dependency-injection](https://hashnode.com/tag/dependency-injection)

## Written by

[Tomasz Wąsiński](https://hashnode.com/@wasinski)

@wasinski · Wrocław, Poland

  
[View profile](https://hashnode.com/@wasinski)

Software Architecture & Design; Python, Elixir

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
