|
From: Seth L. <se...@eh...> - 2004-03-03 18:30:33
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, Forgive me if I'm going at this the wrong way. Please let me know if there is another process I should follow. I'd like to request that the Attribute Validator be included in the Sandbox. I'd like to continue work on it in a more public setting. Our resources here at work aren't set up for hosting a public project. Also, it's my hope that the Attribute Validator will become a supported option for validation in the spring framework (after much testing!). I believe others would find this project useful. I will continue to develop this library, as it has become core to our internal project. Please let me know what other steps I should take before we could move it into the public sandbox. Thanks very much, and thanks for Spring! Seth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFARiEZ5EIB1scRes8RAkjRAJ0QWDCs/lhLXq8yZZpjKRoNVx3nUACdGUcb 3jCeT/hBEMOXGcL9ri+H274= =VrTA -----END PGP SIGNATURE----- |
|
From: Alef A. <al...@jt...> - 2004-03-03 18:55:32
|
+1 I think validation based on attributes is a good addition to Spring. Alef > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Seth Ladd > Sent: Wednesday, March 03, 2004 7:17 PM > To: spr...@li... > Subject: [Springframework-developer] Request for Sandbox Inclusion > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > Forgive me if I'm going at this the wrong way. Please let me know if > there is another process I should follow. > > I'd like to request that the Attribute Validator be included in the > Sandbox. I'd like to continue work on it in a more public setting. Our > resources here at work aren't set up for hosting a public project. > Also, it's my hope that the Attribute Validator will become a supported > option for validation in the spring framework (after much testing!). > > I believe others would find this project useful. I will continue to > develop this library, as it has become core to our internal project. > > Please let me know what other steps I should take before we could move > it into the public sandbox. > > Thanks very much, and thanks for Spring! > Seth > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.2 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFARiEZ5EIB1scRes8RAkjRAJ0QWDCs/lhLXq8yZZpjKRoNVx3nUACdGUcb > 3jCeT/hBEMOXGcL9ri+H274= > =VrTA > -----END PGP SIGNATURE----- > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Keith D. <kd...@cs...> - 2004-03-03 20:14:26
|
Seth and I have similar but slightly different efforts ongoing between = us. So it would silly for me to commit stuff that looks like his but not = quite. Personally I'd like one solution that works in both web and rcp = environments equally well. There are a few differences in the Seth's design that may be issues for = me: 1. Seth's ValidationRule interface validate values on an object's = existing property values. My ValidationRule interface can validate existing or proposed property values. This allows you to validate a property value before it is set on a domain object, which is important for me. For example, Seth's validationRule interface looks like public boolean validate(Object object, Object field); <mine looks like> public boolean validate(Object object, Object value); The interfaces mean two different things conceptually. My "MandatoryPropertyValidationRule" just looks at the value to enforce the not-null and not-empty constraint. Other, more complex, rules might use = the object as a context to evaluate a proposed value (for example, a = proposed value must be > then some existing value on the domain object.) 2. Our ways of collecting results are a bit different. I have ValidationResultsCollector interface, and Seth uses the Errors = interface. Not a big deal, but the ValidationResultsCollector provides some = additional callbacks for tracking validation progress (starting, ending, etc.) = which I use to update a panel on a rich-client form. 3. I provide a programmatic interface for creating a BeanValidator which encapsulates one or more PropertyValidators which encapsulate one or = more PropertyValidationRules. Granted, with attributes you probably don't = need this all the time, but it's still nice to have. 4. You retrieve an instance of the appropriate BeanValidator for a = domain object by using the ValidatorRegistry, which indexes validators by = domain object type. Seth, one question I have is how do you bind a AttributeValidator instance to the correct domain object? 5. My rules encapsulate the message creation logic as well as 'typing = hint' creation logic since they own errorCode and rule messageArguments data, = but that's just a minor thing. I definitely think declarative validation based on attributes is a good addition. Seth's stuff looks great, I guess I'd just like to be able to = use it in a RCP environment equally well; and I was just about to commit my stuff to the sandbox, too... Thanks, Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of Alef Arendsen Sent: Wednesday, March 03, 2004 1:43 PM To: spr...@li... Subject: RE: [Springframework-developer] Request for Sandbox Inclusion +1 I think validation based on attributes is a good addition to Spring. Alef > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On > Behalf Of Seth Ladd > Sent: Wednesday, March 03, 2004 7:17 PM > To: spr...@li... > Subject: [Springframework-developer] Request for Sandbox Inclusion >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Hello, >=20 > Forgive me if I'm going at this the wrong way. Please let me know if > there is another process I should follow. >=20 > I'd like to request that the Attribute Validator be included in the > Sandbox. I'd like to continue work on it in a more public setting. =20 > Our resources here at work aren't set up for hosting a public project. = > Also, it's my hope that the Attribute Validator will become a=20 > supported option for validation in the spring framework (after much=20 > testing!). >=20 > I believe others would find this project useful. I will continue to > develop this library, as it has become core to our internal project. >=20 > Please let me know what other steps I should take before we could move > it into the public sandbox. >=20 > Thanks very much, and thanks for Spring! > Seth > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.2 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >=20 > iD8DBQFARiEZ5EIB1scRes8RAkjRAJ0QWDCs/lhLXq8yZZpjKRoNVx3nUACdGUcb > 3jCeT/hBEMOXGcL9ri+H274=3D > =3DVrTA > -----END PGP SIGNATURE----- >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and > deploy apps & Web services for Linux with a free DVD software kit from = > IBM. Click Now! = http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Seth L. <se...@eh...> - 2004-03-03 20:53:26
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Keith Donald wrote: | Seth and I have similar but slightly different efforts ongoing between us. | So it would silly for me to commit stuff that looks like his but not quite. | Personally I'd like one solution that works in both web and rcp environments | equally well. While I believe that there can be a definite common base functionality both can share, there are some issues that we might run into if all the code was the same. The major difference I can see is that a RCP interface is /much/ different than a web interface. With a RCP interface, you're able to interact and provide feedback in much better and faster ways than with a standard web client. Of course, with a lot of Javascript you can emulate a decent RCP interface experience. Maybe that's where this is heading. But in the meantime, I can foresee that we share a lot of common functionality, with the RCP specific code extending and enhancing it to take advantage of the user experience improvements you can provide. Also, time will tell on this. We'll let the design emerge. | before it is set on a domain object, which is important for me. For | example, Seth's validationRule interface looks like | | public boolean validate(Object object, Object field); | <mine looks like> | public boolean validate(Object object, Object value); I think I am going to change this interface a bit, though not to match yours. Currently, the object is the object w/ the field. I think the object will become the top level object being validated. This will allow validation rules to validate against any field in the object graph, instead of just a direct sibling field. | | The interfaces mean two different things conceptually. My | "MandatoryPropertyValidationRule" just looks at the value to enforce the | not-null and not-empty constraint. Other, more complex, rules might use the | object as a context to evaluate a proposed value (for example, a proposed | value must be > then some existing value on the domain object.) Not sure I understand what this is to do. Can you provide an example? | 2. Our ways of collecting results are a bit different. I have | ValidationResultsCollector interface, and Seth uses the Errors interface. | Not a big deal, but the ValidationResultsCollector provides some additional | callbacks for tracking validation progress (starting, ending, etc.) which I | use to update a panel on a rich-client form. This is where we see the web interface and the RCP interface start to diverge. This is also a good example of how the RCP can use the common functionality and extend it at choice locations, such as extending the Errors interface. Do you extend Errors or bypass it completely? | | 3. I provide a programmatic interface for creating a BeanValidator which | encapsulates one or more PropertyValidators which encapsulate one or more | PropertyValidationRules. Granted, with attributes you probably don't need | this all the time, but it's still nice to have. I guess nothing stops you from overriding onBindAndValidate method to introduce new ValidationRules, or code some by hand. So while there isn't an explicit hook to dynamically generate the rules, it's definitely easy to do so. | | 4. You retrieve an instance of the appropriate BeanValidator for a domain | object by using the ValidatorRegistry, which indexes validators by domain | object type. Seth, one question I have is how do you bind a | AttributeValidator instance to the correct domain object? Not sure I quite understand this one. The ValidationRule is generic in that it doesn't care which object it's validating. You merely associate a validation rule to a getter on an object. There is no declaring a class itself is Validatable. To get a class to be validated, you only need to declare a validation rule on at least one getter. Commons-attributes takes care of the rest. Can you elaborate your question? | | 5. My rules encapsulate the message creation logic as well as 'typing hint' | creation logic since they own errorCode and rule messageArguments data, but | that's just a minor thing. My validation rules also (optionally) provide all the message parameters, but rely on MessageSource from Spring to actually generate the message String. Sounds like we are identical here. I think we have more in common than not. I tried really hard to stick w/ current Spring classes and interfaces to make the impact of this minimal. I had to patch Spring a little tiny bit, which actually should help your code out, too. Choices never hurt, and I don't care if we delete all my code, as long as there is a good attributes based validator in there. I need it to convince the team to move from Struts. :) Seth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFARkKS5EIB1scRes8RAnsgAJ9xH3DNGWdpu8xJmGhmEU7wHK408gCfVdJG XnMoV78NSJwtbgMt1+jVMB8= =wrGa -----END PGP SIGNATURE----- |
|
From: Mark P. <mar...@co...> - 2004-03-03 20:18:04
|
+1, definitely. Mark -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Alef Arendsen Sent: Wednesday, March 03, 2004 1:43 PM To: spr...@li... Subject: RE: [Springframework-developer] Request for Sandbox Inclusion +1 I think validation based on attributes is a good addition to Spring. Alef > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On > Behalf Of Seth Ladd > Sent: Wednesday, March 03, 2004 7:17 PM > To: spr...@li... > Subject: [Springframework-developer] Request for Sandbox Inclusion > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > Forgive me if I'm going at this the wrong way. Please let me know if > there is another process I should follow. > > I'd like to request that the Attribute Validator be included in the > Sandbox. I'd like to continue work on it in a more public setting. > Our resources here at work aren't set up for hosting a public project. > Also, it's my hope that the Attribute Validator will become a > supported option for validation in the spring framework (after much > testing!). > > I believe others would find this project useful. I will continue to > develop this library, as it has become core to our internal project. > > Please let me know what other steps I should take before we could move > it into the public sandbox. > > Thanks very much, and thanks for Spring! > Seth > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.2 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFARiEZ5EIB1scRes8RAkjRAJ0QWDCs/lhLXq8yZZpjKRoNVx3nUACdGUcb > 3jCeT/hBEMOXGcL9ri+H274= > =VrTA > -----END PGP SIGNATURE----- > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and > deploy apps & Web services for Linux with a free DVD software kit from > IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |