You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Musachy Barroso <mu...@gmail.com> on 2009/03/28 17:31:58 UTC

OVal plugin

I am going to get an OVal plugin going in the sandbox, before I
re-invent the wheel, has anyone done this already?

musachy

-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Musachy Barroso <mu...@gmail.com>.
Doc page is up:
http://cwiki.apache.org/confluence/display/S2PLUGINS/OVal+Plugin and
XML with class inheritance is implemented. I think it is ready for
early adopters to take it for a spin :)

musachy

On Mon, Mar 30, 2009 at 9:54 AM, Musachy Barroso <mu...@gmail.com> wrote:
> That could be done, but the plugins make it so easy that I am not sure
> it is worth the trouble. For example, to use OVal validation, instead
> of the built in one all you need to do is use the "ovalValidation"
> interceptor instead of "validation".
>
> btw XML validation now works
>
> musachy
>
> On Mon, Mar 30, 2009 at 7:15 AM, Paul Benedict <pb...@apache.org> wrote:
>> Don't forget Commons Validator 2 which is supposed to implement
>> JSR-303 bean validation.
>>
>> PS: I think Struts 2 should have an API for pluggable validation
>> systems. Why should one be preferred over another -- as a decision for
>> us to make? Let the developer choose their implementation. Maybe
>> XWork, maybe OVal, maybe Commons Validator, maybe Hibernate Bean
>> Validation. It would be really neat to allow.
>>
>> Paul
>>
>> On Sun, Mar 29, 2009 at 8:48 PM, Musachy Barroso <mu...@gmail.com> wrote:
>>> That's a good point Wes. In fact I sent my first patch today and it
>>> got applied already :). I almost have XML working and I will be adding
>>> more tests in the next few days. When the plugin is ready we can bring
>>> it in, and see how people like it, and how it performs in production.
>>>
>>> musachy
>>>
>>> On Sat, Mar 28, 2009 at 8:49 PM, Wes Wannemacher <we...@wantii.com> wrote:
>>>> On Saturday 28 March 2009 20:42:32 Musachy Barroso wrote:
>>>>> I wanted to get some discussion going on the possibility of using a
>>>>> third party framework for validation, and deprecating XWork's one in
>>>>> the future. If there is a good library, well documented and powerful,
>>>>> which does all we need, I don't really see the point in maintaining
>>>>> our own implementation. Thoughts?
>>>>>
>>>>> //look mom, I am tryin' to deprecate more code!
>>>>>
>>>>> musachy
>>>>>
>>>>
>>>> Advantages -
>>>> 1. Most likely less code for us to maintain
>>>> 2. Oval implements the closest thing to a validation standard for beans in
>>>> java that I know of
>>>> 3. Possibly reducing the training curve of new developers adopting struts
>>>> 4. Being abstracted to a plugin allows for future enhancement via dropping in
>>>> other validation implementations
>>>>
>>>> Disadvantage -
>>>> - We don't own Oval and will not have much say in its future. I would say that
>>>> if using OGNL should have taught us anything is that if we want to use it as a
>>>> dependency, we should volunteer on that side of things so that we can make
>>>> sure it is maintained in the future (probably not a problem with Oval, but
>>>> wouldn't hurt).
>>>>
>>>> Despite listing a disadvantage, I'm still +1 on this. I think users will
>>>> likely welcome the added features of validation through Oval.
>>>>
>>>> -Wes
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Wes Wannemacher
>>>> Author - Struts 2 In Practice
>>>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>>>> http://www.manning.com/wannemacher
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Musachy Barroso <mu...@gmail.com>.
That could be done, but the plugins make it so easy that I am not sure
it is worth the trouble. For example, to use OVal validation, instead
of the built in one all you need to do is use the "ovalValidation"
interceptor instead of "validation".

btw XML validation now works

musachy

On Mon, Mar 30, 2009 at 7:15 AM, Paul Benedict <pb...@apache.org> wrote:
> Don't forget Commons Validator 2 which is supposed to implement
> JSR-303 bean validation.
>
> PS: I think Struts 2 should have an API for pluggable validation
> systems. Why should one be preferred over another -- as a decision for
> us to make? Let the developer choose their implementation. Maybe
> XWork, maybe OVal, maybe Commons Validator, maybe Hibernate Bean
> Validation. It would be really neat to allow.
>
> Paul
>
> On Sun, Mar 29, 2009 at 8:48 PM, Musachy Barroso <mu...@gmail.com> wrote:
>> That's a good point Wes. In fact I sent my first patch today and it
>> got applied already :). I almost have XML working and I will be adding
>> more tests in the next few days. When the plugin is ready we can bring
>> it in, and see how people like it, and how it performs in production.
>>
>> musachy
>>
>> On Sat, Mar 28, 2009 at 8:49 PM, Wes Wannemacher <we...@wantii.com> wrote:
>>> On Saturday 28 March 2009 20:42:32 Musachy Barroso wrote:
>>>> I wanted to get some discussion going on the possibility of using a
>>>> third party framework for validation, and deprecating XWork's one in
>>>> the future. If there is a good library, well documented and powerful,
>>>> which does all we need, I don't really see the point in maintaining
>>>> our own implementation. Thoughts?
>>>>
>>>> //look mom, I am tryin' to deprecate more code!
>>>>
>>>> musachy
>>>>
>>>
>>> Advantages -
>>> 1. Most likely less code for us to maintain
>>> 2. Oval implements the closest thing to a validation standard for beans in
>>> java that I know of
>>> 3. Possibly reducing the training curve of new developers adopting struts
>>> 4. Being abstracted to a plugin allows for future enhancement via dropping in
>>> other validation implementations
>>>
>>> Disadvantage -
>>> - We don't own Oval and will not have much say in its future. I would say that
>>> if using OGNL should have taught us anything is that if we want to use it as a
>>> dependency, we should volunteer on that side of things so that we can make
>>> sure it is maintained in the future (probably not a problem with Oval, but
>>> wouldn't hurt).
>>>
>>> Despite listing a disadvantage, I'm still +1 on this. I think users will
>>> likely welcome the added features of validation through Oval.
>>>
>>> -Wes
>>>
>>>
>>>
>>> --
>>>
>>> Wes Wannemacher
>>> Author - Struts 2 In Practice
>>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>>> http://www.manning.com/wannemacher
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Paul Benedict <pb...@apache.org>.
Don't forget Commons Validator 2 which is supposed to implement
JSR-303 bean validation.

PS: I think Struts 2 should have an API for pluggable validation
systems. Why should one be preferred over another -- as a decision for
us to make? Let the developer choose their implementation. Maybe
XWork, maybe OVal, maybe Commons Validator, maybe Hibernate Bean
Validation. It would be really neat to allow.

Paul

On Sun, Mar 29, 2009 at 8:48 PM, Musachy Barroso <mu...@gmail.com> wrote:
> That's a good point Wes. In fact I sent my first patch today and it
> got applied already :). I almost have XML working and I will be adding
> more tests in the next few days. When the plugin is ready we can bring
> it in, and see how people like it, and how it performs in production.
>
> musachy
>
> On Sat, Mar 28, 2009 at 8:49 PM, Wes Wannemacher <we...@wantii.com> wrote:
>> On Saturday 28 March 2009 20:42:32 Musachy Barroso wrote:
>>> I wanted to get some discussion going on the possibility of using a
>>> third party framework for validation, and deprecating XWork's one in
>>> the future. If there is a good library, well documented and powerful,
>>> which does all we need, I don't really see the point in maintaining
>>> our own implementation. Thoughts?
>>>
>>> //look mom, I am tryin' to deprecate more code!
>>>
>>> musachy
>>>
>>
>> Advantages -
>> 1. Most likely less code for us to maintain
>> 2. Oval implements the closest thing to a validation standard for beans in
>> java that I know of
>> 3. Possibly reducing the training curve of new developers adopting struts
>> 4. Being abstracted to a plugin allows for future enhancement via dropping in
>> other validation implementations
>>
>> Disadvantage -
>> - We don't own Oval and will not have much say in its future. I would say that
>> if using OGNL should have taught us anything is that if we want to use it as a
>> dependency, we should volunteer on that side of things so that we can make
>> sure it is maintained in the future (probably not a problem with Oval, but
>> wouldn't hurt).
>>
>> Despite listing a disadvantage, I'm still +1 on this. I think users will
>> likely welcome the added features of validation through Oval.
>>
>> -Wes
>>
>>
>>
>> --
>>
>> Wes Wannemacher
>> Author - Struts 2 In Practice
>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>> http://www.manning.com/wannemacher
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Musachy Barroso <mu...@gmail.com>.
That's a good point Wes. In fact I sent my first patch today and it
got applied already :). I almost have XML working and I will be adding
more tests in the next few days. When the plugin is ready we can bring
it in, and see how people like it, and how it performs in production.

musachy

On Sat, Mar 28, 2009 at 8:49 PM, Wes Wannemacher <we...@wantii.com> wrote:
> On Saturday 28 March 2009 20:42:32 Musachy Barroso wrote:
>> I wanted to get some discussion going on the possibility of using a
>> third party framework for validation, and deprecating XWork's one in
>> the future. If there is a good library, well documented and powerful,
>> which does all we need, I don't really see the point in maintaining
>> our own implementation. Thoughts?
>>
>> //look mom, I am tryin' to deprecate more code!
>>
>> musachy
>>
>
> Advantages -
> 1. Most likely less code for us to maintain
> 2. Oval implements the closest thing to a validation standard for beans in
> java that I know of
> 3. Possibly reducing the training curve of new developers adopting struts
> 4. Being abstracted to a plugin allows for future enhancement via dropping in
> other validation implementations
>
> Disadvantage -
> - We don't own Oval and will not have much say in its future. I would say that
> if using OGNL should have taught us anything is that if we want to use it as a
> dependency, we should volunteer on that side of things so that we can make
> sure it is maintained in the future (probably not a problem with Oval, but
> wouldn't hurt).
>
> Despite listing a disadvantage, I'm still +1 on this. I think users will
> likely welcome the added features of validation through Oval.
>
> -Wes
>
>
>
> --
>
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Wes Wannemacher <we...@wantii.com>.
On Saturday 28 March 2009 20:42:32 Musachy Barroso wrote:
> I wanted to get some discussion going on the possibility of using a
> third party framework for validation, and deprecating XWork's one in
> the future. If there is a good library, well documented and powerful,
> which does all we need, I don't really see the point in maintaining
> our own implementation. Thoughts?
>
> //look mom, I am tryin' to deprecate more code!
>
> musachy
>

Advantages - 
1. Most likely less code for us to maintain
2. Oval implements the closest thing to a validation standard for beans in 
java that I know of
3. Possibly reducing the training curve of new developers adopting struts
4. Being abstracted to a plugin allows for future enhancement via dropping in 
other validation implementations

Disadvantage - 
- We don't own Oval and will not have much say in its future. I would say that 
if using OGNL should have taught us anything is that if we want to use it as a 
dependency, we should volunteer on that side of things so that we can make 
sure it is maintained in the future (probably not a problem with Oval, but 
wouldn't hurt).

Despite listing a disadvantage, I'm still +1 on this. I think users will 
likely welcome the added features of validation through Oval.

-Wes



-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Musachy Barroso <mu...@gmail.com>.
I wanted to get some discussion going on the possibility of using a
third party framework for validation, and deprecating XWork's one in
the future. If there is a good library, well documented and powerful,
which does all we need, I don't really see the point in maintaining
our own implementation. Thoughts?

//look mom, I am tryin' to deprecate more code!

musachy

On Sat, Mar 28, 2009 at 7:21 PM, Musachy Barroso <mu...@gmail.com> wrote:
> The plugin is up in the sandbox, OVal is pretty nice. Only annotations
> are supported at the moment. I added a new @Profiles annotation that
> can be added to action methods to turn on just certain profiles (a
> profile is a set of validations), I find that feature quite cool.
>
> musachy
>
> On Sat, Mar 28, 2009 at 1:20 PM, Musachy Barroso <mu...@gmail.com> wrote:
>> they are implementing the validation jsr.
>>
>> musahcy
>>
>> On Sat, Mar 28, 2009 at 1:18 PM, Wes Wannemacher <we...@wantii.com> wrote:
>>> I've thought about that, but I still have a fantasy that the one bean
>>> validation jsr will go somewhere.
>>> I'll help out however I can.
>>> -Wes
>>>
>>> On 3/28/09, Musachy Barroso <mu...@gmail.com> wrote:
>>>> I am going to get an OVal plugin going in the sandbox, before I
>>>> re-invent the wheel, has anyone done this already?
>>>>
>>>> musachy
>>>>
>>>> --
>>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>>
>>> --
>>> Sent from my mobile device
>>>
>>> Wes Wannemacher
>>> Author - Struts 2 In Practice
>>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>>> http://www.manning.com/wannemacher
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Musachy Barroso <mu...@gmail.com>.
The plugin is up in the sandbox, OVal is pretty nice. Only annotations
are supported at the moment. I added a new @Profiles annotation that
can be added to action methods to turn on just certain profiles (a
profile is a set of validations), I find that feature quite cool.

musachy

On Sat, Mar 28, 2009 at 1:20 PM, Musachy Barroso <mu...@gmail.com> wrote:
> they are implementing the validation jsr.
>
> musahcy
>
> On Sat, Mar 28, 2009 at 1:18 PM, Wes Wannemacher <we...@wantii.com> wrote:
>> I've thought about that, but I still have a fantasy that the one bean
>> validation jsr will go somewhere.
>> I'll help out however I can.
>> -Wes
>>
>> On 3/28/09, Musachy Barroso <mu...@gmail.com> wrote:
>>> I am going to get an OVal plugin going in the sandbox, before I
>>> re-invent the wheel, has anyone done this already?
>>>
>>> musachy
>>>
>>> --
>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>> --
>> Sent from my mobile device
>>
>> Wes Wannemacher
>> Author - Struts 2 In Practice
>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
>> http://www.manning.com/wannemacher
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Musachy Barroso <mu...@gmail.com>.
they are implementing the validation jsr.

musahcy

On Sat, Mar 28, 2009 at 1:18 PM, Wes Wannemacher <we...@wantii.com> wrote:
> I've thought about that, but I still have a fantasy that the one bean
> validation jsr will go somewhere.
> I'll help out however I can.
> -Wes
>
> On 3/28/09, Musachy Barroso <mu...@gmail.com> wrote:
>> I am going to get an OVal plugin going in the sandbox, before I
>> re-invent the wheel, has anyone done this already?
>>
>> musachy
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
> --
> Sent from my mobile device
>
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: OVal plugin

Posted by Wes Wannemacher <we...@wantii.com>.
I've thought about that, but I still have a fantasy that the one bean
validation jsr will go somewhere.
I'll help out however I can.
-Wes

On 3/28/09, Musachy Barroso <mu...@gmail.com> wrote:
> I am going to get an OVal plugin going in the sandbox, before I
> re-invent the wheel, has anyone done this already?
>
> musachy
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

-- 
Sent from my mobile device

Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org