|
From: Benoit X. <bx...@ob...> - 2008-05-01 12:12:52
|
Hi I thought I’d ask the community… there are quite a few validation frameworks out there, notably, amongst the more modern ones: - Spring Validation - Spring Rich Client Validation - Hibernate Validation Given a scenario of a 3-tier application where serialized objects are sent back-and-forth between a Swing application and an RMI server, and then stored in DB via Hibernate. Which framework do you think would be most appropriate to use to ensure a good GUI feedback prior to submitting an object but also enforcing solid validation on the server-side? (the server also interacts with JMS so server-side validation is really important). At the moment, we’re using a mixture of Spring Rich Client Validation (hand coded using the Rules) and some internal mechanism on the server side. I’d like to be able to have ONE place where I put the validation rules… it seems that the Hibernate Validation may be the most obvious choice there… and I believe that there is some code to integrate it in Spring RC? Where could I find some information on how to use it and does integrate in the same way as the Spring Rich Client Rule for error messages/display icons etc? What is your experience with any of these frameworks? A quick review on this subject would be a GREAT blog posting… Thanks a lot Best regards, Benoit ------------------------------ IMPORTANT NOTICE This communication contains information that is considered confidential and may also be privileged . It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and delete the original. No virus found in this outgoing message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.7/1409 - Release Date: 01/05/2008 08:39 |
|
From: Solerman K. <sol...@wo...> - 2008-05-02 19:02:28
|
Benoit Xhenseval escreveu: > > What is your experience with any of these frameworks? > > A quick review on this subject would be a GREAT blog posting… > You mean like these? :] http://in.relation.to/Bloggers/BeanValidationSneakPeekPartI http://in.relation.to/Bloggers/BeanValidationSneakPeekPartIICustomConstraints http://in.relation.to/Bloggers/BeanValidationSneakPeekPartIIIGroupsAndPartialValidation The last one might give what you after. Solerman |
|
From: Geoffrey De S. <ge0...@gm...> - 2008-05-04 09:47:12
|
We're using Hibernate validator in combination with RCP. There are 2 classes in spring-richclient which help with that: - the RulesFactory thingy, so only need to duplicate the rules on the view side for the @AssertTrue's, but not for @NotNull, @Length etc. - the hibernate validator exception handler, in case the back-end does extra validation (or a business method creates invalid objects), so those get reported nicely. Both are in the jdk5 package I believe. With kind regards, Geoffrey De Smet Benoit Xhenseval wrote: > Hi > > > > I thought I’d ask the community… there are quite a few validation > frameworks out there, notably, amongst the more modern ones: > > - Spring Validation > > - Spring Rich Client Validation > > - Hibernate Validation > > > > Given a scenario of a 3-tier application where serialized objects are > sent back-and-forth between a Swing application and an RMI server, and > then stored in DB via Hibernate. > > Which framework do you think would be most appropriate to use to ensure > a good GUI feedback prior to submitting an object but also enforcing > solid validation on the server-side? (the server also interacts with JMS > so server-side validation is really important). > > > > At the moment, we’re using a mixture of Spring Rich Client Validation > (hand coded using the Rules) and some internal mechanism on the server side. > > > > I’d like to be able to have ONE place where I put the validation rules… > it seems that the Hibernate Validation may be the most obvious choice > there… and I believe that there is some code to integrate it in Spring > RC? Where could I find some information on how to use it and does > integrate in the same way as the Spring Rich Client Rule for error > messages/display icons etc? > > > > What is your experience with any of these frameworks? > > A quick review on this subject would be a GREAT blog posting… > > > > Thanks a lot > > Best regards, > > > > Benoit > > ------------------------------ > > IMPORTANT NOTICE > > This communication contains information that is considered confidential > and may also be privileged . It is for the exclusive use of the intended > recipient(s). If you are not the intended recipient(s) please note that > any form of distribution, copying or use of this communication or the > information in it is strictly prohibited and may be unlawful. If you > have received this communication in error please return it to the sender > and delete the original. > > > > > No virus found in this outgoing message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 269.23.7/1409 - Release Date: > 01/05/2008 08:39 > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > > ------------------------------------------------------------------------ > > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev |
|
From: Benoit X. <bx...@ob...> - 2008-05-05 15:35:37
|
Hi Geoffrey, Thanks a lot for your reply. I also got a reply from the forum, so I start to get a better idea... (http://forum.springframework.org/showthread.php?p=178812) I have noticed the CompositeRichValidator which mentions the Hibernate validation mechanism. Would you mind showing a quick example of how to bind the lot? Say a very simple @NotNull. Which XML setting is required? How to write the CompositeRichValidator? Where do you put this new CompositeRichValidator? do you extend DefaultRulesSource? or does it need to be added manually everywhere a FormModel is created for that class? The javadoc seems to imply this: Code: HibernateRulesValidator hibernateRulesValidator = new HibernateRulesValidator(getFormModel(), SomeClass.class); hibernateRulesValidator.addIgnoredHibernateProperty("ignoredProperty"); RulesValidator rulesValidator = new RulesValidator(getFormModel(), myRulesSource); getFormModel().setValidator(new CompositeRichValidator(rulesValidator, hibernateRulesValidator)); Is there a way to register all the classes that should be subject to Hibernate validation in one place (similar to extending DefaultRuleSource)... None of our code calls the createFormModel with a ruleSource, so it seems that the defaultSource is used, which we have extended to cover all our classes via 'addRules', eg: public class SafeMarginValidationRulesSource extends DefaultRulesSource { public SafeMarginValidationRulesSource() { super(); addRules(createReconciliationRunListCriteriaRules()); } ... private Rules createReconciliationRunListCriteriaRules() { return new Rules(ReconciliationRunListView.Criteria.class) { @Override protected void initRules() { add("date", required()); } }; } } I've seen the HibernateValidatorDialogExceptionHandler class but it would be great to see a posting with details of how to wire it (do you pickup the exception thrown by the Hibernate validator?)... many thanks Benoit ------------------------------ IMPORTANT NOTICE This communication contains information that is considered confidential and may also be privileged . It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and delete the original. -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Geoffrey De Smet Sent: 04 May 2008 10:47 To: spr...@li... Subject: Re: [Springframework-rcp-dev] Validation... Which framework? We're using Hibernate validator in combination with RCP. There are 2 classes in spring-richclient which help with that: - the RulesFactory thingy, so only need to duplicate the rules on the view side for the @AssertTrue's, but not for @NotNull, @Length etc. - the hibernate validator exception handler, in case the back-end does extra validation (or a business method creates invalid objects), so those get reported nicely. Both are in the jdk5 package I believe. With kind regards, Geoffrey De Smet Benoit Xhenseval wrote: > Hi > > > > I thought I’d ask the community… there are quite a few validation > frameworks out there, notably, amongst the more modern ones: > > - Spring Validation > > - Spring Rich Client Validation > > - Hibernate Validation > > > > Given a scenario of a 3-tier application where serialized objects are > sent back-and-forth between a Swing application and an RMI server, and > then stored in DB via Hibernate. > > Which framework do you think would be most appropriate to use to ensure > a good GUI feedback prior to submitting an object but also enforcing > solid validation on the server-side? (the server also interacts with JMS > so server-side validation is really important). > > > > At the moment, we’re using a mixture of Spring Rich Client Validation > (hand coded using the Rules) and some internal mechanism on the server side. > > > > I’d like to be able to have ONE place where I put the validation rules… > it seems that the Hibernate Validation may be the most obvious choice > there… and I believe that there is some code to integrate it in Spring > RC? Where could I find some information on how to use it and does > integrate in the same way as the Spring Rich Client Rule for error > messages/display icons etc? > > > > What is your experience with any of these frameworks? > > A quick review on this subject would be a GREAT blog posting… > > > > Thanks a lot > > Best regards, > > > > Benoit > > ------------------------------ > > IMPORTANT NOTICE > > This communication contains information that is considered confidential > and may also be privileged . It is for the exclusive use of the intended > recipient(s). If you are not the intended recipient(s) please note that > any form of distribution, copying or use of this communication or the > information in it is strictly prohibited and may be unlawful. If you > have received this communication in error please return it to the sender > and delete the original. > > > > > No virus found in this outgoing message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 269.23.7/1409 - Release Date: > 01/05/2008 08:39 > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao ne > > > ------------------------------------------------------------------------ > > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao ne _______________________________________________ Springframework-rcp-dev mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev No virus found in this incoming message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.8/1413 - Release Date: 03/05/2008 11:22 No virus found in this outgoing message. Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.8/1415 - Release Date: 05/05/2008 06:01 |
|
From: dani s. <dan...@gm...> - 2015-04-27 06:40:25
|
dengan jelly gamat gold-g dapat dengan cepat mengobati penyakit kista source : http://caramengobatikistaovarium5cm.weebly.com |