I think the biggest insight I attempt to inject into people is the
component template:  It's easy to think about it the way a JSP
operates: working character-by-character.  But for Tapestry, the
template is actually a blueprint for building a structure in memory,
and that structure is a program for generating a server-side DOM, and
only at the end is that DOM emitted character-by-character.

"The string is a stark data structure and everywhere it is passed
there is much duplication of process. It is a perfect vehicle for
hiding information.
-- Alan Perlis

I interpret this as "strings are bad", they hide information, or make
it more difficult to manipulate. Treating the template as a structure
of objects lets Tapestry do things implicitly that are complex in
other environments.


On Thu, Apr 28, 2011 at 9:23 AM, Pierce T. Wetter III
<pie...@twinforces.com> wrote:
>
>  I'm job hunting right now which means I sometimes have to explain why I
> chose Tapestry for a web application platform. (
> http://www.linkedin.com/in/pwetter if your company needs a new Director of
> Web Development ).
>  I had an insight yesterday that I thought I would share. Tapestry is a
> compiler.
> That is, Tapestry considers your .tml files and your .java files as just a
> starting point. From that starting point it builds data structures, new
> classes, bytecodes and a host of other cool stuff behind the scenes. That's
> one of the reasons its so fast and efficient as an application framework
> while running. Unlike a lot of other frameworks that are essentially running
> as interpreters, Tapestry runs as compiled code.
>   The key insight here is something I've known about T5 for a while: Your
> .java files and .tml files are just the starting point; they're essentially
> declarations that are re-interpreted by T5 to produce a lot of stuff behind
> the scenes. You may think that you have Component.java, which declares a
> class called Component with one or 2 methods, but by the time Tapestry is
> finished with it numerous additional methods and instance variables have
> been added, certain things in your class have been rewired, all kinds of
> cool stuff. Just as a few lines of declaration code imply a whole bunch of
> work by the java compiler behind the scenes, so does a few lines of Tapestry
> code imply a whole bunch of work by the "Tapestry compiler".
>    I hope this insight helps people.
>  Pierce
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to