NEWS/InternalStructure

From ThorxWiki
(Difference between revisions)
Jump to: navigation, search
(Moved from /Implementation)
 
m (markup touchup)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
You can summarise any NEWS request down to four possibilities.
 
You can summarise any NEWS request down to four possibilities.
# Request a page to view
+
* Request a page to view
# Request a page to edit
+
* Request a page to edit
# Preview an edited page
+
* Preview an edited page
# Save an edited page
+
* Save an edited page
   
 
So, let's elaborate the stages NEWS goes through for each.
 
So, let's elaborate the stages NEWS goes through for each.
* Request to view
+
== Request to view ==
## Security layer checks access permissions of user requesting (via cookies)
+
# Security layer checks access permissions of user requesting (via cookies)
## Security layer checks view permissions of page requested (via 'page i/o' module)
+
# Security layer checks view permissions of page requested (via 'page i/o' module)
## Translation layer fetches the page from i/o and renders it to html
+
# Translation layer fetches the page from i/o and renders it to html
## page is returned to user.
+
# page is returned to user.
   
* Request to Edit
+
== Request to Edit ==
## Security checks user permissions
+
# Security checks user permissions
## Security checks edit permissions of page
+
# Security checks edit permissions of page
### If edit is OK, then Translator fetches page and renders it to an edit form
+
## If edit is OK, then Translator fetches page and renders it to an edit form
### If edit is not OK, but view is OK, then Translator fetches the page and renders it to 'view raw source'
+
## If edit is not OK, but view is OK, then Translator fetches the page and renders it to 'view raw source'
## page is returned to user
+
# page is returned to user
   
* Preview/save an edit
+
== Preview/save an edit ==
## Security checks user perms and edit perms of the page
+
# Security checks user perms and edit perms of the page
### If edit is OK then feed to Translator which checks for concurrent edits.
+
## If edit is OK then feed to Translator which checks for concurrent edits.
#### If no concurrent edits, then render the page as page, and ALSO as edit form. (or save page if saving rather than previewing)
+
### If no concurrent edits, then render the page as page, and ALSO as edit form. (or save page if saving rather than previewing)
#### If concurrent editing has occured, then render the new page, show diffs, and show current edited version as edit form.
+
### If concurrent editing has occured, then render the new page, show diffs, and show current edited version as edit form.
### If edit is not OK, but view is OK, then Translator renders the changes as 'view raw source', but no further editing.
+
## If edit is not OK, but view is OK, then Translator renders the changes as 'view raw source', but no further editing.
## page is returned to user
+
# page is returned to user

Latest revision as of 15:01, 2 May 2008

You can summarise any NEWS request down to four possibilities.

  • Request a page to view
  • Request a page to edit
  • Preview an edited page
  • Save an edited page

So, let's elaborate the stages NEWS goes through for each.

[edit] Request to view

  1. Security layer checks access permissions of user requesting (via cookies)
  2. Security layer checks view permissions of page requested (via 'page i/o' module)
  3. Translation layer fetches the page from i/o and renders it to html
  4. page is returned to user.

[edit] Request to Edit

  1. Security checks user permissions
  2. Security checks edit permissions of page
    1. If edit is OK, then Translator fetches page and renders it to an edit form
    2. If edit is not OK, but view is OK, then Translator fetches the page and renders it to 'view raw source'
  3. page is returned to user

[edit] Preview/save an edit

  1. Security checks user perms and edit perms of the page
    1. If edit is OK then feed to Translator which checks for concurrent edits.
      1. If no concurrent edits, then render the page as page, and ALSO as edit form. (or save page if saving rather than previewing)
      2. If concurrent editing has occured, then render the new page, show diffs, and show current edited version as edit form.
    2. If edit is not OK, but view is OK, then Translator renders the changes as 'view raw source', but no further editing.
  2. page is returned to user
Personal tools
Namespaces

Variants
Actions
Navigation
meta navigation
More thorx
Tools