When I say I don't like $var in tags I mean more like I don't like script like code in tags. That is why I was confused for a second that Ant didn't have $var, I meant I am not used to seeing real script like code in Ant e.g. <c:when test="${item.type == 'book'}"> , note "==" in the tag. Ant has no "==" (that I have had to use). You do need to be able to differentiate between "take this string literally" or "evaluate it" so I do see why ant does that. I meant Ant was able to make "make" files so much better without having to have this: <ant:compile condition="$target == install">.
I think seeing "==" in JSTL tags really just turned me off because it makes me think JSTL is a wolf (scriptlet code) in sheeps clothing. I just don't think that <c:when test="${item.type == 'book'}"> is easier to read (for a UI person) than <logic:equal name="whatever" property="type" value="book"> Then a JSTL guy will probably say you don't have to use "==" you can use "eq" or something but then I say that leaves it open so that "==" will be used by some and it will be harder for UI people who are used to html. In theory it seems like there should be no logic in the View since 1. who sees what and when could be considered business logic and 2. you would want to try and make that who sees what where logic exist in a place where both your Web app and Swing app (for instance) can get to it. -----Original Message----- From: Stephen Brown [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 1:20 PM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? The nice thing about those $var style tags is that they are very easy to read, if you use nice names for things, most people can understand the relationships and get something out of them. Also these translate well to my email templates which are in Velocity macros. But I guess the real issue is that XML tends to be pretty long winded, nice for data transport, not so nice when you're trying to read the file on screen. I'm sorry about being jaded against scriptlets, I've had a bad experience with inheriting software with rough ones. The good thing about scriptlets is that they compile, however. >>>>> Has anyone written something that wil reflect classes used in JSTL tags to at least ensure that the relationships in the tags are possible? <<<<< I would totally be in to getting more out of compilers that way - this would make refactoring so much better too. > -----Original Message----- > From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] > Sent: August 8, 2003 11:43 AM > To: 'Struts Users Mailing List' > Subject: RE: JSTL ot struts taglibs? > > > > You're right, ant does have $var in it I use my IDE to build > and forgot. > > I just think that is a step backwards doing tags that way. > > So many things are a step backwards like config files for > instance. J2EE is > supposed to be for the Enterprise which means there is at > least a DB and > maybe the LDAP at your disposal yet people go back to storing stuff in > files. > > I am just trying to point out when things seem backwards. > Certain things > (like tags) should be getting more XML like and not more UNIX > script like. > > Let's put our config in a datastore and let's either have > programmers doing > the UI and accept things like scriptlets or have UI > specialist and make it > easier on them but not having $var in the tags. That's all I > am saying. > > I definitely was wrong about Ant, sorry. > > > > -----Original Message----- > From: Stephen Brown [mailto:[EMAIL PROTECTED] > Sent: Friday, August 08, 2003 11:41 AM > To: 'Struts Users Mailing List' > Subject: RE: JSTL ot struts taglibs? > > Maybe you could post this to the ECS users group. Scriptlets > are fine, but > tend to lend themselves to having lots of lines of code in a page that > doesn't actually generate html, which is tough to read if you > are trying to > lay things out. > > > > > Why do you think Ant is so popular??? It got rid of all the > > $var UNIX script > > like crap and made it more like tags should be!!!!!!!!!!! > > > What are you talking about? ${var} is pretty standard in Ant. > > > > > -----Original Message----- > > From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] > > Sent: August 8, 2003 11:21 AM > > To: 'Struts Users Mailing List' > > Subject: RE: JSTL ot struts taglibs? > > > > > > > > Scriptlets are more powerful (you can do ANYTHING Java can > > do), faster, is a > > standard (it is the Java language you know) and if you are > > going to spend > > time learning a new language (${var} == "pooPoo") then you > > would be better > > off learning Java (assuming you don't already know it) cause > > then you could > > do scriptlets and middle tier coding and more whereas if you > > use your time > > learning JSTL all you will know is JSTL. > > > > Believe me, JSTL will be easy to replace if someone comes > out with an > > alternative. I am a programmer but I understand the > > importance of having > > the tags be similar to HTML tags and not like tags containing > > scriptlets. > > > > If it makes you happy $var is a legal Java variable name so > > you could just > > write scriptlets with $var and no one would realize you > > weren't writing JSTL > > > > > > :) > > > > Why do you think Ant is so popular??? It got rid of all the > > $var UNIX script > > like crap and made it more like tags should be!!!!!!!!!!! > > > > Bottom line is, yes, Struts tags aren't the best but JSTL is > > not much better > > and will probably be replaced with something not so ugly in > > the future. > > > > > > Just my .02 sense. > > > > I like it how some people don't get disturbed by questions > > about connecting > > to a database with JDBC to the Struts user list but get mad > > if you post a > > differing opinion about the crappy way some tags were written that > > interfaces with Struts code. What an ACE! > > > > > > > > > > -----Original Message----- > > From: David Graham [mailto:[EMAIL PROTECTED] > > Sent: Friday, August 08, 2003 10:28 AM > > To: Struts Users Mailing List > > Subject: Re: JSTL ot struts taglibs? > > > > --- David Thielen <[EMAIL PROTECTED]> wrote: > > > Hi; > > > > > > For the logic and I18N taglibs - what do you recommend - using the > > > struts taglibs or the JSTL taglibs? > > > > Definitely JSTL. They're more powerful, easier to use, potentially > > faster, and a Java standard. > > > > David > > > > > > > > thanks - dave > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]