In a message dated 8/12/2004 3:02:14 PM Eastern Daylight Time, [EMAIL PROTECTED] writes:
  > Has anyone tried to get the asp style ADP parser originally written in
  > like 1999 or 2000 by some guys at AM Computers working with Aolserver
  > 4?  The source file was nsAspStyleAdps.c.  It allowed conditional code
  > throughout the file separated by the <% %> sequence, in the manner of
  > ASP.


This has always been one of my biggest complaints with aolserver.   When
you have to output html conditionally in adp pages, you have to
backslash everything to keep tcl from choking on it.

It's just this sort of problem that makes me wonder if the people
building aolserver ever actually USE aolserver to build web
applications.  It seems like not that big of a deal . . . until you
realize that we do this ALL THE TIME.
 
 
Howdy,
 
I wrote the ADP parser and I made the decision to not support the sequence above.  I'm aware folks use such techniques in .Net and JSP.  In fact, the original, never released ADP parser did support this as it "compiled" the entire page into a single Tcl script, with all the text areas replaced with "ns_puts text..." -- this is similar to how a JSP parser works. And, versions of AOLserver used to support the parser plugin as described stuff so folks could implement their own as in ACS.
 
We didn't stay with this model for three reasons:
 
- As a single script, any error on the page would result in the entire script failing and no output being generated.  We assumed folks would prefer some result with small errors passed over instead of creating ugly error messages.  Today it seems folks would prefer the other behavior similar to JSP.
 
- For efficiency, we assumed the tight ADP evaluation engine would be faster at just copying the text chunks directly to the output buffer instead of calling ns_puts repeatedly.  It would also do a better job and sharing memory between threads as a page-compiled-to-script model would require each thread to have it's own script text and byte codes.  Neither of these optimizations have been fully explored and verified although they "feel good".
 
- The parser plugin model was a bit clunky in it's interface.  It was used internally to support a simple, presumably fast parser, and a "fancy" parser which handled the registered tag stuff.  In AOLserver 4.0, there is only one parser which supports all the fancy features and appears to be fast enough.
 
Having said all that, it wouldn't be too hard to modify the existing parser to output essentially "single script" style code which could support the conditional model above.  It would then potentially be slower and/or require more memory as described above but folks who are ok with that could choose that option.  I'll take a look at the code and see if it would be hard to drop in.
 
-Jim
 

-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.

Reply via email to