diff options
| author | hukl <hukl@eight.local> | 2009-02-08 13:12:41 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-02-08 13:12:41 +0100 |
| commit | 1a6516c7c8103fb63e7e11134e0fd8ff9f26d6fe (patch) | |
| tree | 7af93da4140414d8e5237f7f99e64bed461489f6 | |
| parent | 3289d0a7a0589baa5bff470df4e07ec2bed99222 (diff) | |
refined concept
| -rw-r--r-- | doc/README_FOR_APP | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP index bd9abe7..ef03d13 100644 --- a/doc/README_FOR_APP +++ b/doc/README_FOR_APP | |||
| @@ -93,4 +93,45 @@ extract db/updates.tbz | |||
| 93 | start a script/console and execute the following commands: | 93 | start a script/console and execute the following commands: |
| 94 | 94 | ||
| 95 | i = UpdateImporter.new("#{RAILS_ROOT}/db/updates") | 95 | i = UpdateImporter.new("#{RAILS_ROOT}/db/updates") |
| 96 | i.import_xml \ No newline at end of file | 96 | i.import_xml |
| 97 | |||
| 98 | =============================================================================== | ||
| 99 | Node | ||
| 100 | |||
| 101 | The whole structure of the website is built from nodes. They live within a | ||
| 102 | nested set structure. Nodes are really just proxy objects though. They point to | ||
| 103 | information but they don't hold that information themselves. Instead they have | ||
| 104 | pages associated to them. When you want to render a particular node, you | ||
| 105 | actually render a page associated to that node. When multiple pages are attached | ||
| 106 | to a node, they act as one page with many revisions. The node itself holds the | ||
| 107 | pointer to current or head revision. | ||
| 108 | |||
| 109 | Page | ||
| 110 | |||
| 111 | Although there is really on Page class, the pages associated to one node differ | ||
| 112 | slightly. Obviously there is a slight difference between the head and the other | ||
| 113 | revisions. While the head is always the most recent page which is publicly | ||
| 114 | available, all the older revisions are only kind of a history. | ||
| 115 | |||
| 116 | Now when a user wants to modify or edit the content of the head revision he or | ||
| 117 | she is editing a new revision instead. This new revision is considered a draft | ||
| 118 | and has the current content of the head revision copied onto itself. | ||
| 119 | |||
| 120 | Draft | ||
| 121 | |||
| 122 | A draft has an author attached to it which makes sure that only the creator of | ||
| 123 | that draft is able to edit it. This is a form of pessimistic locking as it | ||
| 124 | prevents more than one user from editing and saving the same page. | ||
| 125 | |||
| 126 | However, if an author should choose to abandon his draft or to let somebody else | ||
| 127 | finish it, the author can withdraw his lock. In this case, the draft has no | ||
| 128 | longer an author associated to itself which enables another user to edit this | ||
| 129 | draft. | ||
| 130 | |||
| 131 | To abandon or revert a draft, the author can also delete it entirely so that | ||
| 132 | when another user is editing, he or she would get a fresh copy from the current | ||
| 133 | head revision. | ||
| 134 | |||
| 135 | Of course a admin user can always override or remove locks on drafts. In case | ||
| 136 | an author created a draft but simply didn't care anymore, an admin could remove | ||
| 137 | that draft or the lock on it enabling other users to edit that page again. \ No newline at end of file | ||
