comparison docs/describe-data-struct.muse @ 30:e790c6b2d5d9

doc for data struct description
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 10 Jun 2011 08:50:20 +0800
parents
children
comparison
equal deleted inserted replaced
29:b0cc5da28141 30:e790c6b2d5d9
1 Data struct own some relation-ship or logics internally. Usually,
2 they are described in code spreaded over the project. The problem of
3 code is deattach relationships from the data struct. You don't see
4 the relationship with definition of data struct alone. You can also
5 not get the relationship from the code easily. So, we need a way
6 to describe relationship in the definition of data struct to attach
7 the information with data struct.
8
9 Attaching relationship is not only easy to read, but also parse-able.
10 Relationships are attached a part of definition of data struct. They
11 are not code, it means more easy to be parsed. A lot of code can be
12 generated automatically by tools.
13
14 Persisted data (in secondary storage) is usually a tree with reference
15 between branches while internal data struct is usually a group of
16 interconnected objects. We dont use persisted one directly because
17 they are more hard to be used. You need extra-logic to travel
18 persisted data struct. We need the code to convert persisted data
19 struct to internal one and in reversed, but it is tedious. With a
20 language to describe data struct with attaching relationship, we can
21 generate code for conversion of data struct from/to persisted to/from
22 internal ones.
23
24 ** Construction
25
26 - types
27 - relationships
28 - reference
29 - dependency
30 - constrain
31 - condition
32 - path