My perception of Castor and the reason to use it is based on the ability to 
validate your data/value objects in Java, thus ensuring that if your data is 
valid, and another system has problems using it, it is the other system and 
not the base Java code.

Furthermore, the use of XSD's for data objects allows the proliferation of 
many standard value objects to be used across a myriad of applications with 
the ability of those applciations to validate the data they are sending, 
thus ensuring ease of communication across disparate systems.

With the above 2 said, that is my guess as to why someone would expect Flex 
to validate the XML via the XSD before sending; that way you can ensure the 
data you are sending back to Java is valid ... in form, not in contents. 
So, if the number is 0-0-0-0-0 instead of 000-000-0000, that is a data input 
validation error, but at least the data is well formed.

Does that make sense?  I'm not saying I agree with using an XSD vs. just 
straight RemoteObject and mapping both server-side and client side value 
object classes to match as close as possible, and through testing you are 
ensured that the data works since you mirrored the Java class client side in 
a value object, but your thoughts do help me understand the "why" someone 
would want to do it; I'm trying to build up a decent inference here.


----- Original Message ----- 
From: "Steven Webster" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 24, 2005 11:12 AM
Subject: RE: [flexcoders] Validating XML


Jester,

> Is there a way to validate XML through an XSD on the client
> before sending it through an HTTPService?

Quick answer is no, I don't think you can do schema validation
on the client ... however, I'd also argue that this kind of
validation belongs on the server anyway (and that client-side
validation exists to improve the user-experience, and to reduce
unncecessary roundtrip to the server, rather than to validate
correctness of the data in the strictest sense).

Thoughts ?

Steven

--
Steven Webster
Technical Director
iteration::two

This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.

Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.




Yahoo! Groups Links







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to