RE: Help me defend Struts taglibs!!!
As the local neighborhood taglibs pusher in my company, I came under some scrutiny about the lack of an Else in tags and realised the difficulty about nesting XML tags legally, just as described by Craig in his message below. What I pretty quickly came up with is a switch syntax: struts:switch condition=%= expression % case value=%= true % ... /case case value=%= false % /case /struts:switch It's not stright-forward if/else, but it is (IMHO): 1. Legal XML 2. Relatively clear as an if/else clause 3. Provides a solution for a more general case of switch/case What do you think? Cheers, --Amos Shapira WebCollage -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 6:18 AM To: '[EMAIL PROTECTED]' Subject: RE: Help me defend Struts taglibs!!! On Thu, 26 Apr 2001, Scott Cressler wrote: One thing this argument might come down to is why custom tags, especially for if...else stuff (which, BTW, IMHO is not handled real well by the struts tags...would be nicer to have more flexibility in the conditions you can check and to have the ability to do else, rather than logic:equal.../logic:equallogic:notEqual.../logic:notEqual...but that's another discussion :-). In other words, if it is so easy to just slap some Java in their to do some conditional stuff, why use a clumsy tag. It turns out to be surprisingly difficult to come up with syntax for an else construct that is legal XML syntax and isn't really ugly. There's currently work going on in the JSP Standard Tag Library effort (JSR-052) to create tags that will eventually be known to all containters in the same way that tags like jsp:useBean are -- which will also deal with a lot of the performance related concerns. It looks like there will be reasonable ways to do switch and if-else type processing with them. In the mean time, we can reconsider adding an else capability in Struts 1.1, if someone can come up with a good syntax. Craig
RE: Help me defend Struts taglibs!!!
I submitted an if/else and switch/case set of tags a couple of weeks ago under the Struts developer list. http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg01372.html It uses three tags If, Then Else (based on existing Struts CompareTagBase logic) logic:if op=GreaterThan name=testbean property=doubleProperty value=400 logic:then Property Greater Than Value /logic:then logic:else Property Not Greater Than Value /logic:else /logic:if Does this come under the really ugly category or will you consider it for Struts? Niall -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: 31 May 2001 04:18 To: '[EMAIL PROTECTED]' Subject: RE: Help me defend Struts taglibs!!! On Thu, 26 Apr 2001, Scott Cressler wrote: One thing this argument might come down to is why custom tags, especially for if...else stuff (which, BTW, IMHO is not handled real well by the struts tags...would be nicer to have more flexibility in the conditions you can check and to have the ability to do else, rather than logic:equal.../logic:equallogic:notEqual.../logic:notEqual...but that's another discussion :-). In other words, if it is so easy to just slap some Java in their to do some conditional stuff, why use a clumsy tag. It turns out to be surprisingly difficult to come up with syntax for an else construct that is legal XML syntax and isn't really ugly. There's currently work going on in the JSP Standard Tag Library effort (JSR-052) to create tags that will eventually be known to all containters in the same way that tags like jsp:useBean are -- which will also deal with a lot of the performance related concerns. It looks like there will be reasonable ways to do switch and if-else type processing with them. In the mean time, we can reconsider adding an else capability in Struts 1.1, if someone can come up with a good syntax. Craig
RE: Help me defend Struts taglibs!!! (XML/XSL GUI tool)
Check out Excelon's Stylus. I looked at their beta more than a year ago an it was very promising. I think it only works for HTML output though. Calvin --- Duffey, Kevin [EMAIL PROTECTED] wrote: scriplets are faster from what I understand as taglibs require some object creation, and they use the PrintWriter for output. Scriplets are much uglier though..and are much like adding html to servlets. Its much harder to manage. Personally, I prefer using XSL and JSP for dynamic XML output. That way, scriplets in JSP are for conditional dynamic XML output, and XSL handles the layout of the site. I just wish I could find a tool that could allow gui building of pages using XSL and XML. -Original Message- From: Chris Butler [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 2:33 AM To: [EMAIL PROTECTED]; '[EMAIL PROTECTED]' Subject: Re: Help me defend Struts taglibs!!! * unified API * consistent behavior, performance * growing industry support * single-point of functionality management scriptlets tend to be ad-hoc, slap-together and not consistent across all JSPs. performance-wise, i'm unsure. i'm don't have enough experience in JSPland to know the subtle details, but i'm definitely sure that taglibs can be tuned whereas scriptlets would have to be handled one-by-one. just my $0.02 though. i really believe that most java code should vanish from JSPs. it's a separation of church and state sort of belief... why should UI guys have to know any java? also, of interest, is the jakarta taglibs project which has a very interesting XSL taglib which seems to have all kinds of potential when thinking about XML... i think craig contributed to it, so there must be some struts interest in its functionality. c At 09:46 AM 4/26/2001 +0100, Firmin David wrote: Hi all, Members of my team are gradually turning against using the Struts taglibs and resorting to scriptlets. IMHO: scriptlets bad, tags good. I've had more experience in using them than the others, but I'm finding it difficult to fight my corner in the face of ever increasing skepticism. Could anyone out there with really valid arguments as to why the use of the Struts taglibs (especially the logic tags as they're getting the most grief from my team at the moment) or taglibs in general is good, or why the use of scriptlets is bad help me out (in the interest of fairness, vice versa arguments also happily received!)?? Thanks in advance Regards David * *** The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com * ** __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Help me defend Struts taglibs!!!
* unified API * consistent behavior, performance * growing industry support * single-point of functionality management scriptlets tend to be ad-hoc, slap-together and not consistent across all JSPs. performance-wise, i'm unsure. i'm don't have enough experience in JSPland to know the subtle details, but i'm definitely sure that taglibs can be tuned whereas scriptlets would have to be handled one-by-one. just my $0.02 though. i really believe that most java code should vanish from JSPs. it's a separation of church and state sort of belief... why should UI guys have to know any java? also, of interest, is the jakarta taglibs project which has a very interesting XSL taglib which seems to have all kinds of potential when thinking about XML... i think craig contributed to it, so there must be some struts interest in its functionality. c At 09:46 AM 4/26/2001 +0100, Firmin David wrote: Hi all, Members of my team are gradually turning against using the Struts taglibs and resorting to scriptlets. IMHO: scriptlets bad, tags good. I've had more experience in using them than the others, but I'm finding it difficult to fight my corner in the face of ever increasing skepticism. Could anyone out there with really valid arguments as to why the use of the Struts taglibs (especially the logic tags as they're getting the most grief from my team at the moment) or taglibs in general is good, or why the use of scriptlets is bad help me out (in the interest of fairness, vice versa arguments also happily received!)?? Thanks in advance Regards David The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
RE: Help me defend Struts taglibs!!!
Tell them that the taglibs are completely internationalized, whereas if they use scriptlets, they have to check for the ResourceBundle Locale everytime they use a scriptlet. So if your application is internationalized maintaining it would be a nightmare. Also the taglibs confirm to the latest HTML specs (or is it XHTML?), supports CSS, does a lot of error checking (like you can't use a Submit button if you don't use a Form tag in your HTML). I bet scriptlets wouldn't check for that. Errors are displayed automatically incase of an error .. etc... Check the documentation on Struts and i am sure that you will comeup with a few juicy points on your own. Hope this helps. cheers, Amar.. -Original Message- From: D. Veniseleas [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 5:18 AM To: '[EMAIL PROTECTED]' Subject: AW: Help me defend Struts taglibs!!! Poor David ;-) You can argument with the Model View Control Model and easier maintenance no more idea, scriptlets are really bad Dimitris -Ursprüngliche Nachricht- Von: Firmin David [SMTP:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 26. April 2001 10:47 An: '[EMAIL PROTECTED]' Betreff: Help me defend Struts taglibs!!! Hi all, Members of my team are gradually turning against using the Struts taglibs and resorting to scriptlets. IMHO: scriptlets bad, tags good. I've had more experience in using them than the others, but I'm finding it difficult to fight my corner in the face of ever increasing skepticism. Could anyone out there with really valid arguments as to why the use of the Struts taglibs (especially the logic tags as they're getting the most grief from my team at the moment) or taglibs in general is good, or why the use of scriptlets is bad help me out (in the interest of fairness, vice versa arguments also happily received!)?? Thanks in advance Regards David The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Re: Help me defend Struts taglibs!!!
What are their arguments for using scriplets? Calvin --- Firmin David [EMAIL PROTECTED] wrote: Hi all, Members of my team are gradually turning against using the Struts taglibs and resorting to scriptlets. IMHO: scriptlets bad, tags good. I've had more experience in using them than the others, but I'm finding it difficult to fight my corner in the face of ever increasing skepticism. Could anyone out there with really valid arguments as to why the use of the Struts taglibs (especially the logic tags as they're getting the most grief from my team at the moment) or taglibs in general is good, or why the use of scriptlets is bad help me out (in the interest of fairness, vice versa arguments also happily received!)?? Thanks in advance Regards David The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com *** __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Help me defend Struts taglibs!!!
1. The taglibs allow the separation of logic and presentation. You can change the implementation of a taglib without changing the JSP. 2. You need to know little, if anything, about programming or Java to use a taglib. I'm a programmer and know Java. I write the taglib and hand it off to our web team to build a web page. The web team is made up of graphic designers and html developers. They rarely have to come back to me and ask me questions about taglibs. JMO Clarance [EMAIL PROTECTED] on 04/26/2001 08:49:16 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: (bcc: Clarance Howatt/Net) Subject: Re: Help me defend Struts taglibs!!! Reuse. Taglibs are callable routines for JSP pages. Scriptlets tend to devolve into cut and paste spaghetti. See also http://www.servlets.com/soapbox/problems-jsp.html Firmin David wrote: Hi all, Members of my team are gradually turning against using the Struts taglibs and resorting to scriptlets. IMHO: scriptlets bad, tags good. I've had more experience in using them than the others, but I'm finding it difficult to fight my corner in the face of ever increasing skepticism. Could anyone out there with really valid arguments as to why the use of the Struts taglibs (especially the logic tags as they're getting the most grief from my team at the moment) or taglibs in general is good, or why the use of scriptlets is bad help me out (in the interest of fairness, vice versa arguments also happily received!)?? Thanks in advance Regards David The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com *** -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
RE: Help me defend Struts taglibs!!!
One thing this argument might come down to is why custom tags, especially for if...else stuff (which, BTW, IMHO is not handled real well by the struts tags...would be nicer to have more flexibility in the conditions you can check and to have the ability to do else, rather than logic:equal.../logic:equallogic:notEqual.../logic:notEqual...but that's another discussion :-). In other words, if it is so easy to just slap some Java in their to do some conditional stuff, why use a clumsy tag. I think that simply comes down to what someone already referred to as a separation of church and state belief, but I think of it more practically. If you currently or would like to eventually have HTML people do your presentation, reserving the Java people to do the programming, then you need to provide the HTML people tools that are consistent with the type of things they are used to and also with the tools they use. It is easier to get Java syntax wrong, for someone who isn't a Java programmer, than it is to get a tag wrong. Now, if you always plan to use Java programmers to do your presentation (bad idea, IMHO), this is not as strong of an argument, but then the other arguments that have been used are better (i18n, etc.). Good luck, Scott -Original Message- From: Firmin David [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 1:47 AM To: '[EMAIL PROTECTED]' Subject: Help me defend Struts taglibs!!! Hi all, Members of my team are gradually turning against using the Struts taglibs and resorting to scriptlets. IMHO: scriptlets bad, tags good. I've had more experience in using them than the others, but I'm finding it difficult to fight my corner in the face of ever increasing skepticism. Could anyone out there with really valid arguments as to why the use of the Struts taglibs (especially the logic tags as they're getting the most grief from my team at the moment) or taglibs in general is good, or why the use of scriptlets is bad help me out (in the interest of fairness, vice versa arguments also happily received!)?? Thanks in advance Regards David ** ** The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ** *
RE: Help me defend Struts taglibs!!!
scriplets are faster from what I understand as taglibs require some object creation, and they use the PrintWriter for output. Scriplets are much uglier though..and are much like adding html to servlets. Its much harder to manage. Personally, I prefer using XSL and JSP for dynamic XML output. That way, scriplets in JSP are for conditional dynamic XML output, and XSL handles the layout of the site. I just wish I could find a tool that could allow gui building of pages using XSL and XML. -Original Message- From: Chris Butler [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 2:33 AM To: [EMAIL PROTECTED]; '[EMAIL PROTECTED]' Subject: Re: Help me defend Struts taglibs!!! * unified API * consistent behavior, performance * growing industry support * single-point of functionality management scriptlets tend to be ad-hoc, slap-together and not consistent across all JSPs. performance-wise, i'm unsure. i'm don't have enough experience in JSPland to know the subtle details, but i'm definitely sure that taglibs can be tuned whereas scriptlets would have to be handled one-by-one. just my $0.02 though. i really believe that most java code should vanish from JSPs. it's a separation of church and state sort of belief... why should UI guys have to know any java? also, of interest, is the jakarta taglibs project which has a very interesting XSL taglib which seems to have all kinds of potential when thinking about XML... i think craig contributed to it, so there must be some struts interest in its functionality. c At 09:46 AM 4/26/2001 +0100, Firmin David wrote: Hi all, Members of my team are gradually turning against using the Struts taglibs and resorting to scriptlets. IMHO: scriptlets bad, tags good. I've had more experience in using them than the others, but I'm finding it difficult to fight my corner in the face of ever increasing skepticism. Could anyone out there with really valid arguments as to why the use of the Struts taglibs (especially the logic tags as they're getting the most grief from my team at the moment) or taglibs in general is good, or why the use of scriptlets is bad help me out (in the interest of fairness, vice versa arguments also happily received!)?? Thanks in advance Regards David * *** The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com * **