|
From: Matt R. <li...@ra...> - 2004-04-06 04:23:47
|
Thanks Daniel. I'll try to look at this w/in the next week. My goal is to convert an existing Struts app to use Spring's MVC framework with minimal changes. So far, I've got Struts Menu, the DisplayTag and Tiles working. All were pretty trivial. Next up - Action to Controller and Validation. I'm using XDoclet pretty heavily in my existing app - so I'm somewhat motivated to continue generating validation.xml from POJOs. I'll probably have to hack XDoclet to make this work - since it only works for ValidatorForms right now. Of course, after looking at the attributes stuff, they might actually be easier to use than XDoclet. The one advantage of XDoclet, however, is that the XML files are still generated, so stuff can be changed after compilation. As far as I understand the attributes stuff - it'll stay hardcoded in your class (no XML generation). Of course, I rarely change any of this stuff after compilation - but it is a nice option. Matt On Apr 5, 2004, at 9:58 PM, Daniel Miller wrote: > Matt, > > The commons-validator adaptor for Spring is now in the sandbox on > sf.net. I > would be happy to hear your comments/criticisms. The tag library is > totally > separate, so you should be able to use this with any framework you > please, > although it depends on a Spring BeanFactory to find the validator > resources. > If there is a need, I suppose an alternative resource resolution > strategy > could be implemented to remove this dependency. > > The actual validation classes are fairly generic as well, so you > shouldn't > even need to configure Spring to use them (although you will need the > spring > jar with the Validator interface in it). > > Thanks, > Daniel Miller > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Matt Raible > Sent: Thursday, March 11, 2004 11:36 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Commons-Validator for Spring > > > I've used the Struts Validator for a couple years now and I think it's > great - especially since I can generate my validation.xml using > XDoclet. In the coming months, I plan to learn more about Tapestry and > WebWork. I'd love to have a validation system that I could use on > Struts, Spring, Tapestry and WebWork. > > I guess I'm saying - I'd like to see a tag library that can be used > with other MVC frameworks. I plan on using Spring with all these MVC > options - so including it in the core also suits my needs. > > Matt > > On Mar 11, 2004, at 9:21 PM, Daniel Miller wrote: > >> Thanks for your feedback Sam. >> >> I agree. I will talk to the Struts developers about what I'm doing >> before I >> include their code into the Spring project. >> >> I was also leaning toward a tag library. Does anyone have input on >> whether >> another tag should be added to the Spring taglib or should it be a >> totally >> separate taglib (just for javascript validation)? >> >> Thanks. >> Daniel >> >> -----Original Message----- >> From: spr...@li... >> [mailto:spr...@li...]On >> Behalf >> Of Sam Newman >> Sent: Monday, March 08, 2004 5:42 AM >> To: spr...@li... >> Subject: Re: [Springframework-developer] Commons-Validator for Spring >> >> >> Daniel Miller wrote: >>> To all, >>> >>> I am looking into implementing the JavaScript portion of the >>> Commons-Validator for Spring. I have a few questions on which I would >>> appreciate some feedback: >>> >>> 1. Rather than re-invent the wheel I was planning on using as much >> existing >>> code as possible to implement JavaScript validation for Spring. It >>> turns >> out >>> that the Struts source contains a lot of the code that "constructs" >>> the >>> JavaScript functions for the client. What are the policies for using >>> code >>> from other open-source projects in Spring? Can I just rip a bunch of >>> code >>> out of the Struts source and adapt it for Spring? Do I need to ask >>> permission first? >> >> No matter what the license says, I think it would be advisable to ask >> - >> some goodwill from the struts developers might well help the process. >> In >> fact the struts developers are known to be a big fan of their code >> being >> rebuilt as separate modules - the Jakarta commons projects started >> from >> code in struts 1.0 being moved into separate projects. Struts is >> licensed using the Apache license, as such their code can be used >> without problem as long as correct attribution is given - this amounts >> to stating in the code itself and the documentation where it came >> from. >> >>> 3. Would it be advisable to put the javascript generating code in the >>> tag >>> library or in the ValidatorFactory (which holds the resources needed >>> to >>> build the code; things like message resources would need to be passed >>> in)? >> >> A tag library would be my preferred choice (I hate Java scriptlets in >> JSP pages - a maintenance nightmare) although I suspect that the tag >> would be a relatively thin wrapper over the ValidatorFactory itself. >> >> -- >> sam >> http://www.magpiebrain.com/ >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IBM Linux Tutorials >> Free Linux tutorial presented by Daniel Robbins, President and CEO of >> GenToo technologies. Learn everything from fundamentals to system >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IBM Linux Tutorials >> Free Linux tutorial presented by Daniel Robbins, President and CEO of >> GenToo technologies. Learn everything from fundamentals to system >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |