summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rdoc135
1 files changed, 4 insertions, 131 deletions
diff --git a/README.rdoc b/README.rdoc
index 29bde3d..bc1c858 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,135 +1,8 @@
1=CCCMS 1=CCCMS
2 2
3==Setup 3This is the repository for the CCCMS. Its a simple content management system
4inspired all the good parts of different other simple content management systems.
4 5
5* git clone git://github.com/hukl/cccms.git 6Go to the wiki to read what is all about
6* git submodule init
7* git submodule update
8* create a database.yml in /db
9* rake db:migrate
10* untar db/updates.tbz
11* rake cccms:create_admin_user (admin:foobar)
12* rake cccms:import_updates
13* rake cccms:create_home_page
14* ./script/server to start the webserver
15 7
16==Documentation 8http://wiki.github.com/hukl/cccms \ No newline at end of file
17
18User stories in doc/success_stories.txt
19
20execute: rake doc:app on the command line to get a html api documentation in
21doc/app
22
23==General
24
25===Nodes
26
27The whole structure of the website is built from nodes. They live within a
28nested set structure. Therefor a given node has parents, children, descendants
29etc.
30
31The position of a node within the nested set corresponds directly to the URL
32under which that node is accessible:
33
34 root
35 \__updates
36 \__2009
37 \___ultra_important_news
38
39http://domain/de/updates/2009/ultra_important_news
40
41Note that the first parameter after the domain is the locale. Everything after
42the locale identifier is the unique path of a given node. The unique path itself
43is generated from the slugs of the ancestors of a node. The last part of the
44unique path is taken from the slug of the node.
45
46Once a node is added to the nested set or moved within, the unique path of that
47node is generated from all its ancestors up to the root node. The computed path
48is then saved on the node object itself, allowing the system to retrieve a
49node simply by looking for the right url in the unique_path column. This is a
50lot faster then walking down the tree.
51
52Nodes are really just proxy objects. They point to information but they don't
53hold that information themselves. Instead they have pages associated to them.
54When you want to render a particular node, you actually render a page associated
55to that node. When multiple pages are attached to a node, they act as one page
56with many revisions. The node itself holds the pointer to current or head
57revision.
58
59===Pages
60
61Although there is really one Page class, the pages associated to one node differ
62slightly. Obviously there is a slight difference between the head and the other
63revisions. While the head is always the most recent page which is publicly
64available, all the older revisions are only kind of a history.
65
66Now when a user wants to modify or edit the content of the head revision he or
67she is editing a new revision instead. This new revision is considered a draft
68and has the current content of the head revision copied onto itself.
69
70====Draft
71
72A draft has an author attached to it which makes sure that only the creator of
73that draft is able to edit it. This is a form of pessimistic locking as it
74prevents more than one user from editing and saving the same page.
75
76However, if an author should choose to abandon his draft or to let somebody else
77finish it, the author can withdraw his lock. In this case, the draft has no
78longer an author associated to itself which enables another user to edit this
79draft.
80
81To abandon or revert a draft, the author can also delete it entirely so that
82when another user is editing, he or she would get a fresh copy from the current
83head revision.
84
85Of course a admin user can always override or remove locks on drafts. In case
86an author created a draft but simply didn't care anymore, an admin could remove
87that draft or the lock on it, enabling other users to edit that page again.
88
89===Tags
90
91Pages of course come with meta data attatched to them. Tags are one kind of
92meta data. They can be understood and used as keywords, categories, tags or any
93similar concept.
94
95===Templates
96
97Althought there is only one, simple and unified, template for editing pages, it
98is possible to select from different templates for public display. This
99selection of templates allows slight alterations of the layout. For example one
100template would display every attribute of a page (like date, author, abstract)
101while another template would hide this information away. One would show the tags
102of a page, another wouldn't.
103
104===Aggregation
105
106Keywords and other meta data can be used to aggregate any ammount of pages
107into the body of another page.
108
109 <aggregate
110 tags="update pressemitteilung"
111 limit="20"
112 order_by="published_at"
113 order_direction="DESC"
114 />
115
116===Permissions
117
118The permission system is geared towards our use-case which means you won't find
119the standard create/update/destroy derived permissions.
120Every user without having any permissions is allowed to perform non-destructive
121tasks that won't affect the frontend (published pages). What am I talking about?
122
123Bob has no permissions whatsoever still he is allowed to edit a #Page anywhere,
124because this action will only create a new revision of the #Page which is not
125immediately published. He won't be able to manipulate a #Node in any way
126(unique_name, slug, ordering, structure) because this would affect the frontend
127without further notice.
128
129Having a #Permission on a #Node makes Bob an admin for this #Node and all it's
130children. Now Bob can do pretty much anything on these nodes including such fun
131things as:
132 - Create/Update/Delete a #Node
133 - Reorder children of the #Node
134 - Rejecting a draft and telling the author to get his/her spelling right.
135 - Clear a stale lock on a #Node \ No newline at end of file