[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Underwhelmed (WAS: XOM micro tutorial)


xom tutorial
"Aaron Skonnard" <aarons@d...> wrote:
| Arjun Ray [mailto:aray@n...] wrote:
 
|> The basic premise  is tag soup: writing a bunch of tags directly into 
|> what is supposed to be a structured object. 

| Huh? So being able to move between the canonical serialized form and the
| object model itself is hostile use?

Yes, in ways that usually only the other guy finds out.

First, consider this pattern:

   foo.Bar = "some string" ;
   foo.Bar = foo.Bar + "another string" ;

If this idiom is possible, then it follows that that it is not worthwhile
to validate the string being assigned as a "property", because you never
know whether you're in the middle of some complex constructive process or
at the end.  It works swimmingly as long as the "inputs" at any point are
kosher, but it works *equally "well" when they are not*.  You are wide
open to misuse, even inadvertently.  Why is this important?  Because of
Murphy's Law: anything that can go wrong, will.  The "API" has set a trap.

Second, have you considered encoding issues?  Directly [expletive deleted] in strings
that could be "serialized XML" invites precisely the kinds of problems
that Tim Bray was talking about.  Again, this works swimmingly if all data
are Windows-1252 or whatever, but neither does the API know that, it isn't
in a position either to find out at the right time or to enforce a policy.
Yet another trap.

The API is *meant* to be quick and dirty.  Best not to manufacture
"technical justifications" for that.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.