| Author |
AS3 Signals versus Events
|
Anup Francis
Ranch Hand
Joined: Jun 17, 2008
Posts: 45
|
|
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?
|
SCJP 5.0, SCWCD 1.4, SCBCD 5.0, SCDJWS 1.4 & 5.0, SCSNI, ICSD for XML, SCEA 5 , ACE: Flex 3.0 and Air, ACE : Flex 4.0
|
 |
Dan Orlando
author
Ranch Hand
Joined: Mar 04, 2010
Posts: 31
|
|
|
I prefer the use of signals over events whenever possible because there's a considerable difference in terms of conserving resources among other things. I believe a deeper integration is still slated for Robotlegs in the not-to-distant future, and we're all pretty heavy advocates of Robotlegs as an architectural framework.
|
Dan Orlando
Adobe Community Professional
Author, Flex 4 in Action (Manning Press)
|
 |
Joel Hooks
author
Greenhorn
Joined: Feb 17, 2010
Posts: 15
|
|
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 ;)
|
 |
 |
|
|
subject: AS3 Signals versus Events
|
|
|