Anup Francis wrote:Authors,
What is your opinion on using AS3 signals?
Do you think its a better idea to go with signals for creating new apps?
I haven't come across the use of signals in any of the places I have worked.
Only came to know recently about it.
I read up on it and it seems to be good. But seriously, do you guys see it being a used a lot with respect to
event based communication?
I think Signals is an excellent solution to an obvious disfunction of events:
You can't express events via an interface
Signals allow you to observe messages emitted from a concrete instance through its interface. This is very powerful.
So when is it appropriate to use Signals? For me, I like to keep Signals on the application layer and don't use them as much in my visual components. When I am developing visual components I prefer them to follow standard Flash/Flex approaches. I use Signals in the Application tier in conjunction with Robotlegs (which has a lot of Signals support via plugin libraries and utilities).
This is my preference, but I know people that use Signals everywhere, including view components.
At the end of the day they are both Observer
pattern implementations. Events are "normal" for Flash Platform development, and there is a lot to be said for that. Signals can allow for more expressive OOP, and there is a lot to be said for that as well. I use a mix with much success. Your mileage may vary ;)