> -----Original Message-----
> From: Woodchuck [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 27, 2004 11:21 AM
> To: Struts Users Mailing List
> Subject: RE: philosophical question/poll about Struts/JSTL, scriptlets
> --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > > -----Original Message-----
> > > From: Woodchuck [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, August 27, 2004 10:22 AM
> > > To: struts
> > > Subject: philosophical question/poll about Struts/JSTL, scriptlets
> > > 
> > > 

<snip>

> 
> 
> if, the move from scriptlets to tags was based on code
> readibility/maintainability then it seems to me that (in keeping the
> original intention) the correct way would be to use the simplest
> solution(s), whether it's scriptlets, Struts tags, or JSTL.

Depends on simple.  I use the ruler of "Am I going to regret this later on?", rather 
then simpler.  

> 
> you're right, in a sense, tags can be thought of just encapsulated
> scriptlets or java code.  and i wouldn't write a scriptlet to do all
> the things that <html:radio> does for you.
> 
> but simple scriptlets like accessing static final variables takes 2
> lines using scriptlets.  one to declare the class holding the static
> variables.  and another to access it.

2 lines, no scriptlet:
<bean:define id="name" type="StaticClass"/>
<bean:write name="name"/>

Don't remember how to do it in jstl....


> 
> even from a web/html person's perspective i think this would not be a
> problem if they see it sprinkled on the jsp source.
> 
> and although i also like the purist idea, it does seem to break when i
> know that there is a simpler way to do it if i just slip a little
> scriptlet in...

It's not a matter of purity for me... it's a matter of what I'll regret.. I'll stand a 
greater chance of regretting the scriptlet... ymmv.

> 
> no, i don't know what i'm going to do yet.  it's not a black and white
> situation, and it probably won't be.  it's still grey to me 
> right now..
> 
> ...i sense i will be visited by the nightmares tonight....

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to