Mercurial > paraspace
changeset 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 | b0cc5da28141 |
children | aed662c820d8 |
files | docs/describe-data-struct.muse |
diffstat | 1 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/describe-data-struct.muse Fri Jun 10 08:50:20 2011 +0800 @@ -0,0 +1,32 @@ +Data struct own some relation-ship or logics internally. Usually, +they are described in code spreaded over the project. The problem of +code is deattach relationships from the data struct. You don't see +the relationship with definition of data struct alone. You can also +not get the relationship from the code easily. So, we need a way +to describe relationship in the definition of data struct to attach +the information with data struct. + +Attaching relationship is not only easy to read, but also parse-able. +Relationships are attached a part of definition of data struct. They +are not code, it means more easy to be parsed. A lot of code can be +generated automatically by tools. + +Persisted data (in secondary storage) is usually a tree with reference +between branches while internal data struct is usually a group of +interconnected objects. We dont use persisted one directly because +they are more hard to be used. You need extra-logic to travel +persisted data struct. We need the code to convert persisted data +struct to internal one and in reversed, but it is tedious. With a +language to describe data struct with attaching relationship, we can +generate code for conversion of data struct from/to persisted to/from +internal ones. + +** Construction + + - types + - relationships + - reference + - dependency + - constrain + - condition + - path