Oh, and cutting and pasting tags is better? With scriptlets, you need to know one thing: Java. With taglibs you must expand and juggle knowledge by an order of magnitude. Anybody who knows Java can understand a scriptlet; the converse cannot be said of taglibs.
Mark -----Original Message----- From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 2:25 PM Taglibs aren't just useful to people working with HTML, they are a great way to reuse logic in JSP's. Cutting and pasting scriplets IMO is not. -Dave > -----Original Message----- > From: Mark Galbreath [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 07, 2003 1:07 PM > > Well, let's be honest, dude. The great idea behind taglibs > in the first > place was to allow non-developers such as HTMLers and graphic > artists to be > able to manipulate content without understanding a > programming language and > keep real programmers (yes, I have a definition, if you are > interested) from > having to maintain the presentation layer. Now, from that > perspective, look > and my example and look at yours. Which is going to be clearer to a > non-programmer? > > Otherwise, look how complex using a taglib is to integrate into an > application, to say nothing of what it takes to develop a custom > taglib (I've done it). I may sound like a heretic, but in my mind, > SIMPLE scriptlets are better than a tag to do the same thing - from > development, > integration, and maintenance perspectives. > > Mark (they don't call me Chief Eating Crow for nothing) Galbreath > > -----Original Message----- > From: Rob Kischuk [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 07, 2003 11:13 AM > > > That's all well and good but what happens when the author no longer > supports > > it, technology moves on, and somebody behind you has got to > maintain > > it? Doing it with scriptlets is as easy as > > > > <% int count = 0 %> > > <logic:iterate . . .> > > <% if( count % 2 == 0 ) { %> > > <tr bgcolor="coral"> > > <td></td> > > <% } else { %> > > <tr bgcolor="fuscia"> > > <td></td> > > <% } %> > > </tr> > > <% count++ %> > > </logic:iterate> > > > > What could be simpler and clearer? This methodology is > much easier to > > maintain than some esoteric third-party tags. > > <c:forEach var="currItem" items="${myCollection}" varStatus="info"> > <c:if test="${info.count % 2 == 0}"> > <tr bgcolor="coral"> > </c:if> > <c:if test="${info.count % 2 == 1}"> > <tr bgcolor="fuschia"> > </c:if> > <td>blah blah</td> > </tr> > </c:forEach> > > Simple. Clear. Standard. The logic is plain, JSTL isn't > going to have the > maintenance issues you mention, and there's no nasty > scriptlet delimiters > muddling the mix. > > -Rob --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]