You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Johannes Carlén <jo...@yahoo.com> on 2002/10/09 12:41:34 UTC

"Avoid Heavy Use of Logic Tags" ???

Hi, I read "Designing Enterprise Applications, Second
Edition" Singh et al. Section 4.2.6.6 has the header
"Avoid Heavy Use of Logic Tags" and also writes "Using
custom tags for logic provides little benefit, and
violates separation of logic and presentation." and
states that JSP-pages written in XML-syntax are at
least as difficult to maintain as other types.

In my experience, I find that these pages becomes a
lot more readable than pages coded using scriptlets.
Regarding the violation of logic and presentation -
you will have to do it somewhere in your presentation
tier...

Opinions on this? Anyone?

/Johannes


_____________________________________________________
Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "Avoid Heavy Use of Logic Tags" ???

Posted by Eddie Bush <ek...@swbell.net>.
... and now that we have the JSTL you can have your tags optimized into 
actual code.  It's my understanding, for example, that a forEach tag 
would be translated into an actual while (or was it for ...  anyway, you 
get the point).  So, you're bypassing the tag-usage overhead some.

Hopefully Martin will see this and elaborate (and correct me if I'm 
wrong).  I believe that's fairly close though ...

Of course - not all of us are on containers that even support the JSTL 
... but some of us are :-)

Robert wrote:

>I think that statement "Using custom tags for logic provides little
>benefit..." is bit vague. I would say that custom tags the do
>PRESENTATION logic are of benefit, e.g. iterators, formatting, html
>controls, etc. all fit into that category for me. You are right, you
>have to do it somehow, where otherwise you end up with just static HTML
>right?
>
>I'm not sure why he would say that XML syntax is more difficult to
>maintain than other types. That is probably more of an 'eye of the
>beholder' issue. If you have web developers that are unfamiliar with
>Java, then the XML syntax is probably easier than a bunch of scriptlets,
>no? Personally I think it is a lot easier to read than other dynamic
>page systems (ASP, PHP, etc.), but that is just me.
>
>- Robert
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: "Avoid Heavy Use of Logic Tags" ???

Posted by Robert <rm...@bull-enterprises.com>.
I think that statement "Using custom tags for logic provides little
benefit..." is bit vague. I would say that custom tags the do
PRESENTATION logic are of benefit, e.g. iterators, formatting, html
controls, etc. all fit into that category for me. You are right, you
have to do it somehow, where otherwise you end up with just static HTML
right?

I'm not sure why he would say that XML syntax is more difficult to
maintain than other types. That is probably more of an 'eye of the
beholder' issue. If you have web developers that are unfamiliar with
Java, then the XML syntax is probably easier than a bunch of scriptlets,
no? Personally I think it is a lot easier to read than other dynamic
page systems (ASP, PHP, etc.), but that is just me.

- Robert

-----Original Message-----
From: Johannes Carlén [mailto:johannesc@yahoo.com] 
Sent: Wednesday, October 09, 2002 5:42 AM
To: struts-user@jakarta.apache.org
Subject: "Avoid Heavy Use of Logic Tags" ???

Hi, I read "Designing Enterprise Applications, Second
Edition" Singh et al. Section 4.2.6.6 has the header
"Avoid Heavy Use of Logic Tags" and also writes "Using
custom tags for logic provides little benefit, and
violates separation of logic and presentation." and
states that JSP-pages written in XML-syntax are at
least as difficult to maintain as other types.

In my experience, I find that these pages becomes a
lot more readable than pages coded using scriptlets.
Regarding the violation of logic and presentation -
you will have to do it somewhere in your presentation
tier...

Opinions on this? Anyone?

/Johannes


_____________________________________________________
Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>