diff options
| author | hukl <hukl@eight.local> | 2009-02-15 21:08:02 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-02-15 21:08:02 +0100 |
| commit | ab939244c26743512763f64c5f4292826e4470c2 (patch) | |
| tree | ac556e992c330fb5f7006b698a32785a4fb659ec /README.rdoc | |
| parent | c9d0f429b4ae6f82172b94282ff39734e1df8964 (diff) | |
renamed readme so it will render nicely on github
Diffstat (limited to 'README.rdoc')
| -rw-r--r-- | README.rdoc | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..c52596f --- /dev/null +++ b/README.rdoc | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | =CCCMS | ||
| 2 | |||
| 3 | ==Setup | ||
| 4 | |||
| 5 | git clone git://github.com/hukl/cccms.git | ||
| 6 | |||
| 7 | git checkout --track -b poc1 origin/poc1 | ||
| 8 | |||
| 9 | git submodule init | ||
| 10 | |||
| 11 | git submodule update | ||
| 12 | |||
| 13 | ==Import old xml files | ||
| 14 | |||
| 15 | extract db/updates.tbz | ||
| 16 | |||
| 17 | start a script/console and execute the following commands: | ||
| 18 | |||
| 19 | i = UpdateImporter.new("#{RAILS_ROOT}/db/updates") | ||
| 20 | i.import_xml | ||
| 21 | |||
| 22 | ==Documentation | ||
| 23 | |||
| 24 | User stories in doc/success_stories.txt | ||
| 25 | |||
| 26 | execute: rake doc:app on the command line to get a html api documentation in | ||
| 27 | doc/app | ||
| 28 | |||
| 29 | ==General | ||
| 30 | |||
| 31 | ===Nodes | ||
| 32 | |||
| 33 | The whole structure of the website is built from nodes. They live within a | ||
| 34 | nested set structure. Therefor a given node has parents, children, descendants | ||
| 35 | etc. | ||
| 36 | |||
| 37 | The position of a node within the nested set corresponds directly to the URL | ||
| 38 | under which that node is accessible: | ||
| 39 | |||
| 40 | root | ||
| 41 | \__updates | ||
| 42 | \__2009 | ||
| 43 | \___ultra_important_news | ||
| 44 | |||
| 45 | http://domain/de/updates/2009/ultra_important_news | ||
| 46 | |||
| 47 | Note that the first parameter after the domain is the locale. Everything after | ||
| 48 | the locale identifier is the unique path of a given node. The unique path itself | ||
| 49 | is generated from the slugs of the ancestors of a node. The last part of the | ||
| 50 | unique path is taken from the slug of the node. | ||
| 51 | |||
| 52 | Once a node is added to the nested set or moved within, the unique path of that | ||
| 53 | node is generated from all its ancestors up to the root node. The computed path | ||
| 54 | is then saved on the node object itself, allowing the system to retrieve a | ||
| 55 | node simply by looking for the right url in the unique_path column. This is a | ||
| 56 | lot faster then walking down the tree. | ||
| 57 | |||
| 58 | Nodes are really just proxy objects. They point to information but they don't | ||
| 59 | hold that information themselves. Instead they have pages associated to them. | ||
| 60 | When you want to render a particular node, you actually render a page associated | ||
| 61 | to that node. When multiple pages are attached to a node, they act as one page | ||
| 62 | with many revisions. The node itself holds the pointer to current or head | ||
| 63 | revision. | ||
| 64 | |||
| 65 | ===Pages | ||
| 66 | |||
| 67 | Although there is really one Page class, the pages associated to one node differ | ||
| 68 | slightly. Obviously there is a slight difference between the head and the other | ||
| 69 | revisions. While the head is always the most recent page which is publicly | ||
| 70 | available, all the older revisions are only kind of a history. | ||
| 71 | |||
| 72 | Now when a user wants to modify or edit the content of the head revision he or | ||
| 73 | she is editing a new revision instead. This new revision is considered a draft | ||
| 74 | and has the current content of the head revision copied onto itself. | ||
| 75 | |||
| 76 | ====Draft | ||
| 77 | |||
| 78 | A draft has an author attached to it which makes sure that only the creator of | ||
| 79 | that draft is able to edit it. This is a form of pessimistic locking as it | ||
| 80 | prevents more than one user from editing and saving the same page. | ||
| 81 | |||
| 82 | However, if an author should choose to abandon his draft or to let somebody else | ||
| 83 | finish it, the author can withdraw his lock. In this case, the draft has no | ||
| 84 | longer an author associated to itself which enables another user to edit this | ||
| 85 | draft. | ||
| 86 | |||
| 87 | To abandon or revert a draft, the author can also delete it entirely so that | ||
| 88 | when another user is editing, he or she would get a fresh copy from the current | ||
| 89 | head revision. | ||
| 90 | |||
| 91 | Of course a admin user can always override or remove locks on drafts. In case | ||
| 92 | an author created a draft but simply didn't care anymore, an admin could remove | ||
| 93 | that draft or the lock on it, enabling other users to edit that page again. | ||
| 94 | |||
| 95 | ===Tags | ||
| 96 | |||
| 97 | Pages of course come with meta data attatched to them. Tags are one kind of | ||
| 98 | meta data. They can be understood and used as keywords, categories, tags or any | ||
| 99 | similar concept. | ||
| 100 | |||
| 101 | ===Templates | ||
| 102 | |||
| 103 | Althought there is only one, simple and unified, template for editing pages, it | ||
| 104 | is possible to select from different templates for public display. This | ||
| 105 | selection of templates allows slight alterations of the layout. For example one | ||
| 106 | template would display every attribute of a page (like date, author, abstract) | ||
| 107 | while another template would hide this information away. One would show the tags | ||
| 108 | of a page, another wouldn't. | ||
| 109 | |||
| 110 | ===Aggregation | ||
| 111 | |||
| 112 | Keywords and other meta data can be used to aggregate any ammount of pages | ||
| 113 | into the body of another page. | ||
| 114 | |||
| 115 | <aggregate | ||
| 116 | tags="update pressemitteilung" | ||
| 117 | limit="20" | ||
| 118 | order_by="published_at" | ||
| 119 | order_direction="DESC" | ||
| 120 | /> \ No newline at end of file | ||
