Client Side Validation in Ofbiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Client Side Validation in Ofbiz

Alex D. Fleming
Hi,
 
 Can anybody of you tell me why Ofbiz didn't implement any client side validation for required fields in any form ????
 
 Thanks in advance.
 Sam Dave
 
 
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
Reply | Threaded
Open this post in threaded view
|

Re: Client Side Validation in Ofbiz

cjhowe
The contributing member's javascript skills aren't as
strong as we'd like.  However, as a community our
server side validation scripting is very strong, or at
least OFBiz makes server side validation pretty easy.
Ideally, you may not want the round trip to tell
somebody they did missed a field, but until someone
finds it important enough to contribute client side
validation, I imagine it's not going to change very
much ;)

--- Sam Dave <[hidden email]> wrote:

> Hi,
>  
>  Can anybody of you tell me why Ofbiz didn't
> implement any client side validation for required
> fields in any form ????
>  
>  Thanks in advance.
>  Sam Dave
>  
>  
> ---------------------------------
>  All-new Yahoo! Mail - Fire up a more powerful email
> and get things done faster.

Reply | Threaded
Open this post in threaded view
|

Re: Client Side Validation in Ofbiz

David E Jones-2

On Aug 31, 2006, at 10:29 AM, Chris Howe wrote:

> The contributing member's javascript skills aren't as
> strong as we'd like.

Hmmm.... speak for yourself!

> However, as a community our
> server side validation scripting is very strong, or at
> least OFBiz makes server side validation pretty easy.
> Ideally, you may not want the round trip to tell
> somebody they did missed a field, but until someone
> finds it important enough to contribute client side
> validation, I imagine it's not going to change very
> much ;)

The real issue is that if you do client side validation you still  
HAVE to do server side validation because client side validation is  
not reliable unless you have tight control of the browser client  
being used, and its configuration (since JavaScript can be turned off  
in most browsers).

Because of that we decided to go with just server side stuff to  
simplify the development. For custom UIs you can easily add client  
side validation, and this is often done.

-David



> --- Sam Dave <[hidden email]> wrote:
>
>> Hi,
>>
>>  Can anybody of you tell me why Ofbiz didn't
>> implement any client side validation for required
>> fields in any form ????
>>
>>  Thanks in advance.
>>  Sam Dave
>>
>>  
>> ---------------------------------
>>  All-new Yahoo! Mail - Fire up a more powerful email
>> and get things done faster.
>

Reply | Threaded
Open this post in threaded view
|

Re: Client Side Validation in Ofbiz

cjhowe
I'm sorry David, I guess I was speaking for myself.  I
did the whole assuming thing.  </face red>

--- David E Jones <[hidden email]>
wrote:

>
> On Aug 31, 2006, at 10:29 AM, Chris Howe wrote:
>
> > The contributing member's javascript skills aren't
> as
> > strong as we'd like.
>
> Hmmm.... speak for yourself!
>
> > However, as a community our
> > server side validation scripting is very strong,
> or at
> > least OFBiz makes server side validation pretty
> easy.
> > Ideally, you may not want the round trip to tell
> > somebody they did missed a field, but until
> someone
> > finds it important enough to contribute client
> side
> > validation, I imagine it's not going to change
> very
> > much ;)
>
> The real issue is that if you do client side
> validation you still  
> HAVE to do server side validation because client
> side validation is  
> not reliable unless you have tight control of the
> browser client  
> being used, and its configuration (since JavaScript
> can be turned off  
> in most browsers).
>
> Because of that we decided to go with just server
> side stuff to  
> simplify the development. For custom UIs you can
> easily add client  
> side validation, and this is often done.
>
> -David
>
>
>
> > --- Sam Dave <[hidden email]> wrote:
> >
> >> Hi,
> >>
> >>  Can anybody of you tell me why Ofbiz didn't
> >> implement any client side validation for required
> >> fields in any form ????
> >>
> >>  Thanks in advance.
> >>  Sam Dave
> >>
> >>  
> >> ---------------------------------
> >>  All-new Yahoo! Mail - Fire up a more powerful
> email
> >> and get things done faster.
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Client Side Validation in Ofbiz

Adrian Crum
In reply to this post by David E Jones-2
I agree with David's approcah. Client side capabilities are truly unknown -
especially when you consider cell phone and PDA clients. It's wise to design the
UI for the "dumbest" client available.


David E Jones wrote:

>
> On Aug 31, 2006, at 10:29 AM, Chris Howe wrote:
>
>> The contributing member's javascript skills aren't as
>> strong as we'd like.
>
>
> Hmmm.... speak for yourself!
>
>> However, as a community our
>> server side validation scripting is very strong, or at
>> least OFBiz makes server side validation pretty easy.
>> Ideally, you may not want the round trip to tell
>> somebody they did missed a field, but until someone
>> finds it important enough to contribute client side
>> validation, I imagine it's not going to change very
>> much ;)
>
>
> The real issue is that if you do client side validation you still  HAVE
> to do server side validation because client side validation is  not
> reliable unless you have tight control of the browser client  being
> used, and its configuration (since JavaScript can be turned off  in most
> browsers).
>
> Because of that we decided to go with just server side stuff to  
> simplify the development. For custom UIs you can easily add client  side
> validation, and this is often done.
>
> -David
>
>
>
>> --- Sam Dave <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>>  Can anybody of you tell me why Ofbiz didn't
>>> implement any client side validation for required
>>> fields in any form ????
>>>
>>>  Thanks in advance.
>>>  Sam Dave
>>>
>>>        
>>> ---------------------------------
>>>  All-new Yahoo! Mail - Fire up a more powerful email
>>> and get things done faster.
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Client Side Validation in Ofbiz

Alex D. Fleming
In reply to this post by David E Jones-2
Thanks for the reply David,Chris and Others.
 But I think there must be an client side validation first and if it doesn't work then server side validation must be there.
 Anyway Its just a thought.
 
 Actually I was working with Struts Framework and in that framework both the validation have been implementated very nicely.That's why I thought that it must have to be present in Ofbiz as well.
 
 Can we start voting for it ???
 
 Thanks for your time.
 Sam Dave
 

David E Jones <[hidden email]> wrote:
On Aug 31, 2006, at 10:29 AM, Chris Howe wrote:

> The contributing member's javascript skills aren't as
> strong as we'd like.

Hmmm.... speak for yourself!

> However, as a community our
> server side validation scripting is very strong, or at
> least OFBiz makes server side validation pretty easy.
> Ideally, you may not want the round trip to tell
> somebody they did missed a field, but until someone
> finds it important enough to contribute client side
> validation, I imagine it's not going to change very
> much ;)

The real issue is that if you do client side validation you still  
HAVE to do server side validation because client side validation is  
not reliable unless you have tight control of the browser client  
being used, and its configuration (since JavaScript can be turned off  
in most browsers).

Because of that we decided to go with just server side stuff to  
simplify the development. For custom UIs you can easily add client  
side validation, and this is often done.

-David



> --- Sam Dave  wrote:
>
>> Hi,
>>
>>  Can anybody of you tell me why Ofbiz didn't
>> implement any client side validation for required
>> fields in any form ????
>>
>>  Thanks in advance.
>>  Sam Dave
>>
>>    
>> ---------------------------------
>>  All-new Yahoo! Mail - Fire up a more powerful email
>> and get things done faster.
>



 
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
flj
Reply | Threaded
Open this post in threaded view
|

Re: Client Side Validation in Ofbiz

flj
In reply to this post by Alex D. Fleming
Hello.

I can understand your need for simple client side validations like  
mandatory fields. I see quite a few reasons for not using client side  
validations:

First, you never know who is calling into the services exposed by OFBiz.  
You wouldn't want somebody hooking into your implementation of OFBiz to  
damage your data by submitting data which is not valid from a user  
interface other than the one you designed and implemented, and where you  
carefully crafted all validations.

Second, validations imposed by business rules may be quite complex. So  
complex that you may query several objects other than the one being  
validated before you can validate the data that was submitted. Doing this  
in the client is not economic, IMO. Only allowing some validations in the  
client and other validations on the server would yield an inconsistent and  
harder to read the code, and probably also more difficult to program,  
since you need to always think/look where which validation is placed.

Third, some validations may require access to data to which the person  
submitting them should not have access. You may be able to implement such  
validations on the server, but I think it would be pretty difficult to do  
this on the client in a safe way, since allowing the client to access the  
protected data would actually allow the user to read this data.

br,

--
Florin Jurcovici
------------------
What happens if you get scared half to death twice?


On Thu, 31 Aug 2006 18:34:54 +0300, Sam Dave <[hidden email]>  
wrote:

> Hi,
> Can anybody of you tell me why Ofbiz didn't implement any client side  
> validation for required fields in any form ????
> Thanks in advance.
>  Sam Dave
>
> ---------------------------------
>  All-new Yahoo! Mail - Fire up a more powerful email and get things done  
> faster.