----- Original Message ----- From: "Peter M. Jansson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 20, 2003 12:08 PM Subject: Re: [AOLSERVER] adp parsers and aolserver 4.0
> On Mon, 20 Jan 2003, Patrick Spence wrote: > > > I would love to have it as an option, since my foray into PHP under > > aolserver I have found that to be a very nice extension.. > > that way I don't have to craft large chunks of html, convert all the > > quotes to backslash quotes and then ns_puts it all out.. > > so I can then change that HTML with dreamweaver instead of having > > to to the create/convert/ns_puts route over and over > > Life is way too short to code HTML by hand, but being able to break > the Tcl up makes the parser harder to write, and far less robust. Except the parser writing would happen once, whereas the HTML coding is an ongoing thing... :) > There's another way to do what you're trying to do: register an adp tag > that just holds the tag contents in a global var (this will all run in > the same thread, so globals are fine), then, in a < % % > later, do an > ns_adp_eval of the global you remembered. If you need to remember > multiple chunks of stuff, use a global array instead of a global var, > and store/recall stuff by name. > > It's easy to have large conditional blocks this way, and it's very > WYSIWYG-editor-friendly. What I am doing in PHP is dynamic database backed processing as well as forms, table modifications on the fly, etc.. part of the dynamic processing declares an iterative loop that walks over a database table, and the html for each displayed row is only actually done once.. its then filled with values from the row and looped over multiple times.. this lets me create the display (commonly a row in a html table, but not always) once and then make like magic. Dreamweaver has some really nice dynamic application extensions that make work like this to be fast and easy to work with. This doesn't really lend itself to prepare the variable and display it later... Once Daniel S. was able to figure out why PHP would crash randomly, its been solid as a rock... But I would like the option to do the same under TCL as well...
