On Fri, May 24, 2002 at 10:34:36AM -0400, Peter Chen wrote: > On Fri, 2002-05-24 at 00:02, Rocco Caputo wrote: > > Postbacks are cumbersome for message passing in larger programs. > > I also notice that postbacks decrease the transparency of the messages > being passed. When posts are used, it's straight forward to tell what > messages are passed back to the sender. Postbacks on the other hand > mask this information.
I wouldn't agree to this. They enable the posting session to have local communication ends. They don't need to know about the receiving sessions interface (except the sender-supplied arguments). I would consider this as a good thing. The bad side is that they are not powerful enough. You can use them in good ways, but they don't automatically steer developers in this direction. > > Another idiosynchrocy about postbacks that often caught beginners is the > arguments (in fact, this was a bug in the example program fragment I > included, *sigh*). In the event handler, $_[ARG0] is [@state_args] and > $_[ARG1] is [@event_args] instead. This is very different from simple > posts. > > > Since the creation of postbacks, two changes have occurred to make > > them nearly obsolete for inter-session (and session/component) > > messaging. > > I take it that this means in most cases, using simple posts is > preferred? If I haven't missed anything, postback will keep the related session alive, even if you don't post events. Getting and storing an postback is similar to registering as listener. So if you'd have some services(essions), talking to them via postbacks could be a clean solution, no need to create aliases and all that. > > > This issue haunts my every waking moment. :) Seriously, a long time > > ago several people said POE needed a consistent messaging system. As > > I've used it more, it's become painfully clear they were right. > > A consistent messaging system will certainly make learning POE easier. > > > I have rough designs for a few ways to pass messages between > > components. None of them feels quite right, so we still don't have a > > standard. If I were to write a messaging manifesto summarizing them, > > would people be interested in discussing them towards the goal of > > creating one tidy system? > > Absolutely. IMHO, at a minimum, it will provide a platform for > discussion, and opportunities for developers to rethink their messaging > passing mechanisms. And there has already been a lot of discussion. Msg passing reaches far into the realm of the object layer. Fear! :) Torvald
