Re: Ajax support for Struts 2.2.1
Hello Dave, at this point i'am not on your side. Even in the trivial cases a taglib has a benefit. A normal AJAX request with a simple indicator and an effect after completing, needs a lot of boiler plate code, which is hard to maintenance and to debug. A taglib make your JSP cleaner and you benefit from best practices from other users. Johannes Dave Newton-6 wrote: On Fri, Aug 20, 2010 at 1:39 AM, Matthew Barrett wrote: Has anyone tried using the full Dojo within Struts, rather than just the historic built in tag libraries. Sure. It's just like using anything else without tag support; you use it as you would with any back end system. And personally, for all but the *completely* trivial cases, there's almost no advantage to using a tag-based library since you have to write the JavaScript either way. Dave - --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://old.nabble.com/Ajax-support-for-Struts-2.2.1-tp29489640p29520412.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Ajax support for Struts 2.2.1
On Tue, Aug 24, 2010 at 5:55 AM, Johannes Geppert wrote: Even in the trivial cases a taglib has a benefit. *Only* in the trivial cases. A normal AJAX request with a simple indicator and an effect after completing, needs a lot of boiler plate code, which is hard to maintenance and to debug. There's not much boiler-plate code for that, and as with anything else, you refactor your JavaScript. It's a function call, not embedded in the body in keeping with good practices, etc. And since no two apps are the same, what you need is almost certainly what I need. And I'm not locked in to a specific version of a specific framework. And I could just as easily put *exactly* what I need into my *own* tag library. I can count on one finger the number of times an existing tag library solution worked for me. I see almost zero benefit, except for the most trivial use cases (as long as the tag library uses the JavaScript framework I'm already using and does precisely what I need). I'm not saying don't use them, I'm saying they're not that useful for me and save me very little effort (if any), and occasionally make things *more* work. Dave
Re: Ajax support for Struts 2.2.1
As the creator of an AJAX taglib (As the developer of an AJAX taglb (http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html) I have to say... I agree with Dave :) There was a time (like, around the time I created the library perhaps?!?) where I would have argued otherwise. And maybe it's true that in shops with absolutely zero Javascript experience the tags still make some sense... but in general, they don't really buy you anything IMO, and in many cases will just get in your way. That's mine or anyone else' taglib. Frank -- Frank W. Zammetti Author of Practical Palm Pre webOS Projects and Practical Ext JS Projects with Gears and Practical Dojo Projects and Practical DWR 2 Projects and Practical JavaScript, DOM Scripting and Ajax Projects and Practical Ajax Projects with Java Technology (For info: apress.com/book/search?searchterm=zammettiact=search) All you could possibly want is here: zammetti.com On Tue, August 24, 2010 7:58 am, Dave Newton wrote: On Tue, Aug 24, 2010 at 5:55 AM, Johannes Geppert wrote: Even in the trivial cases a taglib has a benefit. *Only* in the trivial cases. A normal AJAX request with a simple indicator and an effect after completing, needs a lot of boiler plate code, which is hard to maintenance and to debug. There's not much boiler-plate code for that, and as with anything else, you refactor your JavaScript. It's a function call, not embedded in the body in keeping with good practices, etc. And since no two apps are the same, what you need is almost certainly what I need. And I'm not locked in to a specific version of a specific framework. And I could just as easily put *exactly* what I need into my *own* tag library. I can count on one finger the number of times an existing tag library solution worked for me. I see almost zero benefit, except for the most trivial use cases (as long as the tag library uses the JavaScript framework I'm already using and does precisely what I need). I'm not saying don't use them, I'm saying they're not that useful for me and save me very little effort (if any), and occasionally make things *more* work. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Ajax support for Struts 2.2.1
*Only* in the trivial cases. Not only, but in the most cases. I have a medium size webapp and there I am happy I can do the whole ajax stuff and the simple widget stuff, like tabs and datepickers with an taglib. this is much more comfortable and to maintenance as plain JavaScript. And JavaScript is for the most Struts2 Users not the language of choose. ;-) There's not much boiler-plate code for that, and as with anything else, you refactor your JavaScript. It's a function call, not embedded in the body in keeping with good practices, etc. Thats the point you refactor it, and after some change you must refactor it again and again. This is a lot of stupid work. With an taglib you are faster in your development process And since no two apps are the same, what you need is almost certainly what I need. The are not the same, but the basic task are mostly the same. And I'm not locked in to a specific version of a specific framework. Of course you are locked in the moment you use it, or you have a lot of refactoring after upgrade to an other framework. And I could just as easily put *exactly* what I need into my *own* tag library. And you reinvent the wheel in every project? You can wrote your own taglib, but not every Struts2 User can do this. Johannes - --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://old.nabble.com/Ajax-support-for-Struts-2.2.1-tp29489640p29522721.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Ajax support for Struts 2.2.1
On Tue, Aug 24, 2010 at 10:38 AM, Johannes Geppert jo...@web.de wrote: *Only* in the trivial cases. Not only, but in the most cases. YMMV; for me, my requirements are so different from project to project, including requiring different underlying libraries. I have *some* commonality, which I handle via JavaScript. And JavaScript is for the most Struts2 Users not the language of choose. ;-) That's their loss, though--*any* customization requires knowing JavaScript anyway. IMO it's more dangerous to lull users into a false sense of complancency. Thats the point you refactor it, and after some change you must refactor it again and again. This is a lot of stupid work. With an taglib you are faster in your development process Until you're not, which for all but the most trivial usecases, is very frequently. And you reinvent the wheel in every project? You can wrote your own taglib, but not every Struts2 User can do this. Who can't write a JSP-based tag library? If they can't, they probably shouldn't be coding in the first place. Dave
Re: Ajax support for Struts 2.2.1
A massive thanks to everyone's response. I think we may try implementing the latest Dojo as we now have some experience with this although I will have a look at the jQuery plug-in as I have heard some good things about that. Kindest regards Matt. - Original Message - From: Dave Newton davelnew...@gmail.com To: Struts Users Mailing List user@struts.apache.org; Matthew Barrett injenuity...@googlemail.com Sent: Saturday, August 21, 2010 12:18 AM Subject: Re: Ajax support for Struts 2.2.1 On Fri, Aug 20, 2010 at 1:39 AM, Matthew Barrett wrote: Has anyone tried using the full Dojo within Struts, rather than just the historic built in tag libraries. Sure. It's just like using anything else without tag support; you use it as you would with any back end system. And personally, for all but the *completely* trivial cases, there's almost no advantage to using a tag-based library since you have to write the JavaScript either way. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Ajax support for Struts 2.2.1
Take a look on jQuery plugin http://code.google.com/p/struts2-jquery/ Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Ajax support for Struts 2.2.1
We're using full dojo 1.5 but without any tag library and we are very happy with it. We stopped using the plugin long time ago... it was always far away from latest dojo release On Fri, Aug 20, 2010 at 10:19 AM, Lukasz Lenart lukasz.len...@googlemail.com wrote: Take a look on jQuery plugin http://code.google.com/p/struts2-jquery/ Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Ajax support for Struts 2.2.1
On Fri, Aug 20, 2010 at 1:39 AM, Matthew Barrett wrote: Has anyone tried using the full Dojo within Struts, rather than just the historic built in tag libraries. Sure. It's just like using anything else without tag support; you use it as you would with any back end system. And personally, for all but the *completely* trivial cases, there's almost no advantage to using a tag-based library since you have to write the JavaScript either way. Dave