On Sun, Nov 11, 2001 at 07:48:50PM -0800, Scott Chapman wrote: > What I'm trying to accomplish here is to create a modular web site > where I can make completely reusable modules. I want to make a > module, for instance, that allows a new user to sign up on the web > site and establish a new userid and password. This page, when > completed, will be able to be dropped into any web site I build where > I need this funcitonality. > > So, I'm basically trying to implement very modular/object oriented > functionality in my web design. > > I was hoping Embperl had a method of dealing with a sub-page as a > object that keeps control of the communication until it is > completed.
No - you will always have to do the glue logic. Unless I'm completely missing the point :) That understood, in a very real sense Execute is what you want anyway. Each sub Execute is just like a module - it has inputs, outputs and its own logic. The good thing is that most of the common stuff *can* be abstracted out with EmbperlObject. For example, there isn't much reason for the looping structure to be included in every "module". It's essentially the same for all places so why not have it as a single (overridable with EmbperlObject) epl file that just takes an argument or calls a function to get the current execution list. > Problem is that it always falls right out of the called page back to the > calling page before I want it to. This is an error in my design of the > called page. > > The method you showed me below will work but I will actually have to > make it 3 layers deep. Top layer is the calling page. Second layer > is the looping structure. Third layer is the web form functionality to > get the input from the user and show error messages and a "thank > you page" or whatever else is desired. This way the second and > third layers go together to make a callable module. I was hoping to > avoid this complexity because it is not as modular/object oriented as > I'd like it to be but that's the price you pay for dealing with this > stateless medium, unless Gerald has put some other magic into this > tool that I'm not aware of. > > I really appreciate your reply and I'll build another layer in between > to take care of the looping. If I could implement it as all one page, > I'd do so but it doesn't look like that is possible. There doesn't > appear to be a "stop" function that prevents the calling page from > being returned to immediately. A call to "exit" will stop execution at that point in the sub-execute and force a return to the parent. With the right structure, this feature might be able to help you. -- Andrew O'Brien Product Engineer email: [EMAIL PROTECTED] Switch Online Group Pty Limited phone: +61 2 9299 1133 ABN 89 092 286 327 fax: +61 2 9299 1134 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
