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

Re: Better design: "flatter is better" or "nesting is better"

  • To: "Costello, Roger L." <costello@m...>
  • Subject: Re: Better design: "flatter is better" or "nesting is better" ?
  • From: Peter Hunsberger <peter.hunsberger@g...>
  • Date: Fri, 30 Sep 2005 14:34:01 -0500
  • Cc: XML Developers List <xml-dev@l...>
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RjkwpcGhbEBRiyE0VOFbJBPlK655w2G8ESEM6MZnBBwbBgABSTAKdlt9/GG9batsjVI9yaWbelVe/iu6fAVDT68zrAWyWMtpAsavbeHg3pgAJgY2WxOI3uR0RFv3CIry2TOtpZQ797t6XF5o5xqZ1CrKBxfcvehR5bF+tBG26G8=
  • In-reply-to: <827BC324B431954A855DC4E39E71B02874BDF0@I...>
  • References: <827BC324B431954A855DC4E39E71B02874BDF0@I...>
  • Reply-to: Peter Hunsberger <peter.hunsberger@g...>

being better
On 9/30/05, Costello, Roger L. <costello@m...> wrote:
> Hi Folks,
>
> Many thanks for your excellent comments!
>
> First, I will attempt to summarize the points that were raised in your
> comments.  Then, in the spirit of the philosopher Karl Popper I will boldly
> propose a solution to the question: "How should XML documents be designed?"

<snip/>

>
> To recap - when designing XML:
>                          - be practical;
>                          - be simple;
>                          - don't use unnecessary tags;
>                          - design your XML to work well with your
> applications *today*;
>                          - most likely, "flatter is better".
>
> Comments?  /Roger
>

Roger,

I've spent a fair amount of time working on design principles that
might apply when building applications that span XML, relational
databases and OO technologies. Our main application has a pretty low
amount of conversion and data management needed to move data from the
back end to the user and back again and my goal is to keep the
application as flexible as possible and as efficient as possible.  As
a result this is an area where I've got a lot of interest.  I have no
real disagreement with what you've got so far, but perhaps some
expansion:

In general, I think you've really got to look at where the data is
being used before making any recommendations on how to structure it. 
In particular, if the data is being stored in a highly normalized RDB
then any XML data that is being created or manipulated close to that
portion of the app. should likely reflect that structure. Conversely,
if the data is being presented to the user via some GUI then it makes
sense to at least have some temporary instance XML that is close to
the denormalized GUI it is targeted for. In between we might have an
intermediate transport format. Thus, I fined we end up with three main
XML designs:

1) highly normalized, flat structures for use in and around the RDB
management layer;

2) composite object models that encapsulate domain specific business
rules on how the normalized data structures are used together and
perhaps reflect some of these rules within the data structure;

3) presentation specific structures that reflect some (perhaps
abstract) denormalized, hierarchical presentation model.

Each of these is used as needed and XSLT and SAX parsers convert
between them.  If I've got to pick a model for exchange with external
entities it could be any of these depending on the level of
integration and the purpose for which we are exchanging the data.  The
more automated the exchange, the more likely the model is going to be
close to the normalized back end representation (by definition, that
is already supposed to be a granular representation known to work in
your domain.)  The more humans involved in the exchange, the more
likely I'm going to be looking at some structure that matches a
denormalized hierarchical representation; this format should be a
closer match to a human readable document.

So I might perhaps add a meta design principle: design for the problem
at hand and not according to some overall design principle...

--
Peter Hunsberger

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.