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

Re: To namespace or not to Namespace ....

  • From: David <dlee@calldei.com>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 07 Apr 2010 16:43:16 -0400

Re:  To namespace or not to Namespace ....
Been holding my tounge on this ...
you may not go "wrong" but there is definately a reasonably large "cost" 
in adding namespaces.
Not referring to the Theoretical "cost" of following the right design 
pattern.
I'm refering to the practical cost of the programmers getting it right.
I'd love to pretend that using namespaces is just as easy as not, but 
its not true.

ALL (bar none) of the XML tools, frameworks, and technologies, are more 
work to actually use and get to work right when dealing with namespaces 
then when not.   How much more work ? It depends on the programmer and 
the tools.
But everything from the basics of xpath to the details of getting a 
QName() element created right, to parsing a SAX stream to serialization 
etc ... all are harder with namespaces then without.

Now the opposite is also true ... once you get the 'plunbing worked out' 
and suppose your expert at all the tools and technologies,
then dealing with complex XML from multiple sources can be vastly easier 
with namespaces then without ...
Or perhaps even impossible without namespaces ...
But by no means is it B&W.

I see a startum ... its probably a n-dimensional one but lets pick 1D 
(to use the spherical elephant example).


One end:
"One Shot" I write it and read it and noone else needs it XML.
==> Namespaces are just extra work with little benefit.


Other End.
"Published Standard Modules" ... Stuff thats intended to be vastly 
consumed, and plugged into other vocabularies.
===> Probably wont work at all without namespaces


Then there's the middle which is most everything ...


By the way, I have loved this debate ! I particularly enjoy the fact 
that I keep being swayed over the fence by nearly every comment.

-------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org


On 4/7/2010 4:33 PM, Andrew Welch wrote:
>> I just hope people will actually evaluate the costs of using namespaces
>> before automatically sticking them on everything.
>>      
> You can't go far wrong if:
>
> - You pick a namespace that will never change: don't use dates, or
> words like 'proposed' or 'beta', or embed version information
> - You always use a prefix
> - You tell the team to always use an XML parser to read the XML, and
> an XML writer to serialise the XML, and never ever process XML as a
> string
>
>
>
>    


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.