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]
Re: [xml-dev] Avoid Flowcharts, Base Program Structures on Data Structures

On Sat, Oct 19, 2013 at 10:57 PM, Costello, Roger L. <costello@mitre.org> wrote:

Another, more positive, lesson is that program structures should be based on data structures. There are deep underlying reasons why this is so… (he gives many reasons) …The computer system sees the world through the medium of its data structures.

The Jackson Design Technique

This is the basis of the Jackson design technique: We start by (1) considering the data structures, which we then use to (2) form a program structure. We list the executable operations needed to carry out the task, and (3) allocate each operation to a component of the program structure.

There are, of course, further steps in the design process, but these three are the first and the most important: the quality of the work we do as we take these steps will determine the quality of the programs we write.



“program structures should be based on data structures

When you design a program, how do you base your program structures on the structures in the XML input?



Look at your input XML. Define an empty template for every element and every attribute.
Augment that by

a) An empty template for every context sensitive element that is relevant to our problem domain.
So if you had XML
You would have a template for A B and C and if relevant to the problem A/B

b) An empty template for all predicates. Look at the predicate and determine which element it should be applied on and define an empty template for that.

You now have near as damn it a data driven program structure a la Jackson. If we leave of step b above you can reuse it for other problems on the same XML input.

Write template rules for the templates you have defined - thats operation allocation in Jackson.

You may have to resolve structure clashes by resorting to things like keys or groupings but push style XSLT processing is a natural fit for the Jackson methodology.

[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