upta / pubsub

An extremely light-weight, easy to use PCL pub/sub library
Apache License 2.0
219 stars 53 forks source link

Create a wiki #22

Open rafael-biz opened 5 years ago

rafael-biz commented 5 years ago

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 5 years ago

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

rafael-biz commented 5 years ago

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 5 years ago

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