upta/pubsub

Create a wiki

rafael-biz opened this issue · 3 comments

Could you please create a wiki?

I had to look in source code to discover the Hub class and find out its methods.

upta commented

Technically speaking, using the Hub class itself isn't required (it wasn't originally even the intended usage pattern, was only added as an option later for using the library in DI scenarios)

Probably worth updating the README.md to mention it, if nothing else

It is because of the dependency injection.

The extensions are very cool, it is a very clever solution. I'm really impressed with its design. But its mechanism hides a singleton. For many scenarios it is fine having a singleton. For some others, it is bad.

So, I believe it worth mention it for those who are wondering how it works and how does pubsub fits in others projects. I personaly prefer avoid to use third party libraries unless strictly necessary.

Thanks for your help. It was enlightening.

upta commented

Oh, I totally agree, just saying the reason it wasn't documented was because it was added later and the docs never got updated :)