Numergy / signalslot

Simple signal slot implementation in Python
http://signalslot.rtfd.org
MIT License
47 stars 14 forks source link

There is one more.. #1

Closed prologic closed 9 years ago

prologic commented 10 years ago

circuits[1]

TBH I find signalslot confusing at the API level :/

cheers James

  1. http://pypi.python.org/pypi/circuits
jpic commented 10 years ago

Thanks for your awesome feedback !!

TBH I fail to see how you can be confused by the Signal class which is only 25 SLOCs if you're able to use something like Circuits which has 289 times more code than signalslot (7242 SLOCs) :/ I'm sure you didn't mean to troll and that you'll be able to complete the constructive criticism you wanted to make by explaining what exactly you find "confusing" in signalslot's API, and for that, I'd like to thank you in advance for your awesome contribution.

TBH: I didn't invent anything in terms of API, the method names are just the same as in the original Signal/Slot implementation in Qt, it's also pretty much the same as in all the Signal/Slot libs I've been given the opportunity to work with (ie. Zeta Components, Django).

Anyway, I didn't know about Circuits. It's looks like a really interesting framework with bells and whistles and has many great features like PySubPub. And if you're going to build a complex messaging system you'd be better off using PySubPub or Circuits than signalslot. As stated in the README:

``signalslot`` has the vocation of being a light and simple implementation of
Signal/Slot provided as a classic quality Python package.

I find the difference between signalslot's purpose and PyPubSub/Circuits quite obvious so I think that signalslot has it's place in Python's package index. It is just a simple and stupid implementation of the Signal/Slot design pattern allowing you to decouple your components without pulling a fully-featured messaging framework like PyPubSub or Circuits.

BTW, Circuits reminds me a bit of Twisted, did you try Twisted ? It's pretty awesome too ! If I ever need more features than just a classic Signal/Slot implementation, I'll definitively consider Circuits, Twisted and PyPubSub.

prologic commented 10 years ago

Heh. No my intention was not to troll. Just found no other way to contact you :)

With the pattern here (Pub/Sub) I'm used to the kinds of terminology such as:

I never came across Signal/Slot before... So it was a bit confusing at first :) But that's not your fault!

(I'll reply more later, I haven't fully read your reponse yet).

prologic commented 10 years ago

RE "Twisted/Circuits". Yes I know of Twisted, no I haven't and don't use it. The only time I've had to understand it (in some some depth and detail) is in circuits's twistedintegration experimental package that hopefully may make it into 3.0 and allow circuits users/developers to fully utilize Twisted protocols and run Twisted apps on top of circuits.