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

Re: RE: [Summary #2] Should Subject Matter Experts Determine X

  • From: "Kurt Cagle" <kurt.cagle@g...>
  • To: xml-dev@l...
  • Date: Tue, 14 Oct 2008 20:38:21 -0700

Re:  RE: [Summary #2] Should Subject Matter Experts Determine X
Roger,

I'd also agree that this is a case of inadequately determining requirements, but I'd also argue that this is one of those situations where a difference in design in the first place may have been more appropriate. Consider the original example:

<Payment>
      <Method>Paypal</Method>
      <Method>money order</Method>
      <Method>cashier's check</Method>
  </Payment>

In this particular case, the use of an alternate envelope doesn't make a lot of sense here - it makes it more difficult to write queries against it, it makes it more difficult to build interfaces around it, and so forth. To me, this is one of those cases where you'd be better of going with an attribute, especially once the model has been produced:

<Payment>
      <Method monetized="true">Paypal</Method>
      <Method monetized="false">money order</Method>
      <Method monetized="false">cashier's check</Method>
  </Payment>

and of course, you can set a default on the attribute in at least XSD, if this is getting verbose:

<Payment>
      <Method monetized="true">Paypal</Method>
      <Method>money order</Method>
      <Method>cashier's check</Method>
  </Payment>

The advantage here is that your enumerations remain simple, as an XQuery that populates a list option might illustrate

let $payment := $myObj//Payment[1]
let $selectBox := <select>
    {for $method in $payment return
         <option value="{string($method)}"
                     selected="{if ($method/@monetized='true') then 'selected' else ''}">{string($method)}</option>
    }
</select>

The point I'm trying to make here though is that in general, when designing a schema that's already in active use, design such that structure remains backward compatible and that properties changes that manifest are either additions to the existing scheme (with an informal agreement to deprecate the use of a given element that is no longer in use) or are attributes that determine the characteristics of the object so being modeled.

Schemas evolved, and sometimes you do have to go in and redesign from the ground up ... but this should definitely be a major version type of change with the understanding that less significant changes should augment rather than rearrange structure until such time as the schema requires major rework.

-- Kurt


On Tue, Oct 14, 2008 at 4:45 PM, Costello, Roger L. <costello@m...> wrote:

Hi Folks,

Below is an example of a business interest influencing an XML data
design.


QUESTIONS:

1. Do you agree with my example? Would you revise it in any way?

2. Can you think of another simple, compelling example of a business
interest influencing an XML data design?


EXAMPLE OF BUSINESS INTERESTS INFLUENCING XML DATA DESIGN

A SME specifies, "There are three methods of payment: Paypal, money
order, or cashier's check."

Here is an XML data design which expresses the SME's specification:

  <Payment>
      <Method>Paypal</Method>
      <Method>money order</Method>
      <Method>cashier's check</Method>
  </Payment>

Then, a business person announces, "Our business has a partnership with
Paypal. We earn money each time a customer pays using Paypal. While we
do accept the other payment methods, we earn no money with them. So, be
sure to design the data so that Paypal is accentuated and the others
are de-emphasized."

To de-emphasize the two other payment methods, the above XML data
design is modified so that they are put lower in the data hierarchy:

  <Payment>
      <Method>Paypal</Method>
      <Alternate>
          <Method>money order</Method>
          <Method>cashier's check</Method>
      </Alternate>
  </Payment>

Thus we see an example of the influence of business interests on XML
data design.

/Roger


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@l...
subscribe: xml-dev-subscribe@l...
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php




--
Kurt Cagle
Managing Editor, http://xml.com
O'Reilly
kurt@o...



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