On Fri, 2002-05-24 at 00:47, Rocco Caputo wrote: > I think after writing about two of those, I'd go slightly mad and > create a function that built these for me. If it turned out that I > was doing this a lot, I would probably assume it's a generic pattern > and write a new type of Session to do it.
As you may have gathered from some of my recent postings, I am putting together some docs on learning POE, so in the future my coworkers may take over the maintenance of some of my POE code. Most of the developers I work with are much more accustomed to procedural programming. Event driven programming presents a substantial paradigm shift and consequently a steep learning curve. This makes it harder for them to adopt POE. Ideally, I would provide them with guide lines (e.g., message passing mechanism) and frequently used patterns in the form of howto's and faq's (many references to POE cookbook). Converting procedures to events turns out to be one of the first and most common patterns, because procedures are what they are used to. It will be convenient to have a dedicated type of Session to handle this. In its absence, a clear and well defined pattern will suffice. I can see that your sample code is much clearer and intuitive than mine. I was never quite satisfied with having nested postbacks. I find it confusing to many people. Also, the fact that they look chronologically reversed is also counter intuitive. Thank you very mcuh. Pete
