You are right, I was thinking what I just write, and seems like I got it wrong. The observer I had in mind was the observer you can find in Magento for example (Magento 2 docs)
I'm a father of four. I started out as a self-taught programmer, completed a B.S. in Computer Science and am currently employed full-time since 1998.
I also own a small mobile software company.
I've never heard of Observer being an anti-pattern. If anything, it usually comes highly recommended in enterprise-level software as a way to reduce tight coupling between components.
I know that singleton is considered an anti-pattern, but on some smaller systems where dependency injection isn't available, it sure is useful.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Keep in mind that Singletons and Observers are considered anti-patterns!
I've heard of singletons as anti-patterns, but observer as anti-pattern is new to me. Would you mind elaborating?
Maybe he means Event Bus systems
You are right, I was thinking what I just write, and seems like I got it wrong. The observer I had in mind was the observer you can find in Magento for example (Magento 2 docs)
Event Bus is bad,
Observer pattern is not.
I dont get why Event Bus is bad.
I think it's more like "can be" anti-patterns.
I've never heard of Observer being an anti-pattern. If anything, it usually comes highly recommended in enterprise-level software as a way to reduce tight coupling between components.
I know that singleton is considered an anti-pattern, but on some smaller systems where dependency injection isn't available, it sure is useful.