On Fri, 4 Jun 1999, Justin Wells wrote:

> Hi Alex, many of your comments about WebMacro were not accurate:
>....
> This is misleading. WebMacro uses the reflection API to analyze your
> class exactly once for each class, and then caches that data for the
> life of your servlet environment.
>
> This is the same approach Sun takes with JavaBeans, and is remarkably
> efficient.

True; testing in our lightweight application server its embeded template
engine - the speed of calling methods using reflection is within the same
range as using hashtable  lookups for "$foo" names to fill the template.

Retrieving a Method object given its name, class and arguments is the most
expensive part. That's why it is cached.

> ...
>    <table>
>    #foreach $thing in $list {
>       <tr><td>$thing.Name</td><td>$thing.Description</td></tr>
>    }
>    </table>
>...
In this example is a $thing that should be interpreted as a variable.
What about something following example without $things or {braces}:

   <ShowList DS=list>
      <tr><td>#list.name#</td><td>#list.Description#</td>
   </ShowList>

(DS option within ShowList tag stands for "Data Source" - is used to find
 the data source, wich is a sort of iterator)


------------
regards,
Cezar Totth

[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to