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

Re: Help with XML anti pattern

  • From: Norman Gray <norman.gray@glasgow.ac.uk>
  • To: William David Velasquez <wd@creativosdigitales.co>
  • Date: Tue, 23 Nov 2021 21:49:58 +0000

Re:  Help with XML anti pattern
William, greetings.

On 23 Nov 2021, at 18:21, William David Velasquez wrote:

<ext:UBLExtension>
<ext:ExtensionContent>
<SWMaker>
<SWMakerInfo>
<Name>FirstName</Name>
<Value>Erick</Value>
<Name>LastName</Name>
<Value>Rich</Value>
<Name>SWName</Name>
<Value>FancySoft v.1.0</Value>
</SWMakerInfo>
</SWMaker>
</ext:ExtensionContent>
</ext:UBLExtension>
and

I'm expecting customer won't be open to accept the change, because the actual structure can do the work.

So, what arguments would you use to convince the customer?
One possible tack is to note that the key-value structure is highly unidiomatic XML, so XML tools will always work poorly with it (you're mentioned a couple of examples of what one might call 'impedance mismatches' already), and it is thus building in technical debt by design.

If the context is such that there is a set of key-value pairs being serialised in this way, for in-principle arbitrary keys, then the conclusion may be that XML is a poor way of doing this serialisation. Use JSON instead (cf the discussion on this list in the last few weeks). I think this is quite a good example of XML not being the right answer for every problem, and indeed this is the sort of solution that gives XML a bad name.

If the conclusion is that there are key-value pairs, and this serialisation has got to have pointy brackets in it (kos that's what the kool kidz are doing these days), then potentially use plist format [1]. I don't think anyone believes that .plist was a good Apple design decision, but there are at least libraries for it, and no-one has to waste their good energies trying to put a different shade of lipstick on this particular pig.

I see that there's at least some 'ext:' XML namespacing happening there, so another one surely wouldn't hurt.

(I don't think <Name>/<Value> is a great design, by the way)

Best wishes,

Norman


[1] https://en.wikipedia.org/wiki/Property_list

--
Norman Gray : https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK


[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.