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