XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
How to do XML design, per Jackson Structured Design

Hi Folks,

I am reading the book that Sean McGrath recommended [1] on Jackson Structured Design. Wow, I am discovering that this book is really about XML design (and it was written in 1979).

Here are some fantastic things I've learned:

1. Böhm and Jacopini proved in 1966 that all programming problems can be solved by using only three program component types: sequence, iteration, selection.

2. Dijkstra has pointed out that data can be described by using the same types of component.

3. Design the data structure, then design the program to match the data structure.

4. The data structures control the program structure.

5. Design the data to model the end user's real world. 

6. When the program structure is based upon the data structures, then the program is firmly established in the real world. 

7. Programming technique is alien to the end user. The end user's demands start from the end user's real world. The program structure must reflect this real world.

8. Component types (sequence, iteration, selection) may be mixed. However, you must make sure that each XML element belongs to one and only one of the three component types.

Examples:

a. Good: BookStore consists of a list of Book elements.

<BookStore>
      <Book>...</Book>
      <Book>...</Book>
      ...
</BookStore>

BookStore is of the iteration (list) type. 

b. Bad: BookStore consists of a sequence of Location and list of Book elements.

<BookStore>
      <Location>...</Location>
      <Book>...</Book>
      <Book>...</Book>
      ...
</BookStore>

This is bad because BookStore is both an iteration and a sequence type. Don't mix component types in an element!

c. Good: BookStore consists of a sequence of Location and Books element. Books consists of a list of Book elements.

<BookStore>
      <Location>...</Location>
      <Books>
            <Book>...</Book>
            <Book>...</Book>
            ...
      </Books>
</BookStore>

Now BookStore is of the sequence type and Books is of the iteration (list) type. Each are of just one component type - good!

Jackson Structured Design tells us how to do XML design. Neat!

/Roger

[1] JSP A Practical Method of Program Design by Leif Ingevaldsson


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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS