On 3/30/07, Oleg Kobchenko <[EMAIL PROTECTED]> wrote:



So what are the arguments that text-chunks cannot do,
or that can be done more easily by tree transformation?


* Static validation - with J and HTML mixed, neither can be validated
for syntactic correctness prior to running either.

* Big webshops require that HTML designers and webapp programmers work
independantly with no interference... HTML designers do not want to
see <:   ... :> all over the place and their design tools dont either
:)

* meta-level versus object-level. Let's take a navigation bar:

<DIV>
HOME :: <span meld:id=product>product_name</span>
</DIV>

now, this span element with attribute value product can be used for
every product... you simply rewrite the contents of the span tag as a
function of which product you are dealing with...

when using object-level dynamic html generation, you are forced to do
something.. oops! well, I guess the object-level is not so bad in this
case :)

<DIV>
HOME :: <span meld:id=product>$product_name$</span>
</DIV>

Ok, a better example is a web form. You have to show the same form for
input and then fill in the form for confirmation. With tree-rewrites,
you can use the same HTML form for both getting user input and
displaying it, you just rewrite the tree based on whether you are
getting the input or displaying it for confirmation:

<FORM>

<!-- fill in with user submitted text on confirmation page -->
<input type=text>    </input>

<!-- must change label to "confirm data" on next page of cgi program -->
<input type=submit label="submit data">
</FORM>

but with object-level-inline type systems, you would have to use
if-thens or two separate HTML pages for input and confirmation.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to