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

Re: Make implicit structures explicit

  • From: Frank Manola <fmanola@acm.org>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Tue, 08 Apr 2014 17:44:00 -0400

Re:  Make implicit structures explicit
I think designing data structures without any consideration of what they are going to be used for isn't really "design" at all.


On Apr 8, 2014, at 4:09 PM, "Costello, Roger L." <costello@mitre.org> wrote:

> Hi Folks,
> 
> Suppose that you document the steps to be taken by an aircraft in its landing procedure:
> 
> 1. Contact control tower
> 
> 2. Enter glide slope
> 
> 3. Correct for wind conditions
> 
> Suppose those things must be followed in the sequence listed.
> 
> The XML could be designed like this:
> 
> <aircraft-approach-procedure>
>    <transition>Contact control tower</transition>
>    <transition>Enter glide slope</transition>
>    <transition>Correct for wind conditions</transition>
> </aircraft-approach-procedure>
> 
> That design relies (implicitly) on the order of the <transition> elements for denoting the sequence of steps to be taken. 
> 
> An alternative design is to (explicitly) specify the order. Here is one way to accomplish this:
> 
> <aircraft-approach-procedure>
>    <transition step="2">Enter glide slope</transition>
>    <transition step="3">Correct for wind conditions</transition>
>    <transition step="1">Contact control tower</transition>
> </aircraft-approach-procedure>
> 
> Note that in this design it is not necessary to list the <transition> elements in a particular order since @step explicitly indicates the order.
> 
> I vote for the latter as best practice. I invoke this principle as my justification: 
> 
> 	Make implicit structures explicit.
> 
> What do you think?
> 
> /Roger
> 



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