[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
How to do XML design, per Jackson Structured Design
- From: "Costello, Roger L." <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Wed, 20 Nov 2013 23:18:57 +0000
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]