1 / 9

Content Management

INTERNET ENGINEERING. MOHAMMAD BORUJERDI. Content Management. CHAPTER 6. Fundamental elements to content management: (1) storing stuff in a content repository. (2) supporting the workflow of a group of people engaged in putting stuff into repository.

thuy
Download Presentation

Content Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 Fundamental elements to content management: (1) storing stuff in a content repository. (2) supporting the workflow of a group of people engaged in putting stuff into repository. An important part of the art of content management for an online learning community is reducing the number of types of content because every new table defined implies roughly twenty Web scripts. Example : 6 tables: articles, comments_on_articles, news, comments_on_news, questions, answers. User Experience scripts : view a directory of content in Table A, view one category, view one item, view the newest items, grab a form to insert an item, confirm insertion, request an email alert of comments on an item. Admin scripts : view a directory of content in Table A, view one category, view one item, view the newest items, approve an item, disapprove an item, delete an item, confirm deletion of an item, etc. It will be a bit tough to code these twenty scripts in a general fashion because the SQL statements will differ in at least the table names used. 1

  2. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 A Simple Data Model for Articles : Here's a very basic data model for storing articles: create table articles ( article_id integer primary key, -- who contributed this and when creation_user not null references users, creation_date not null date, -- what language is this in? -- visit http://www.w3.org/International/O-charset-lang -- to see the allowable 2-character codes (en is English, ja is Japanese) language char(2) references language_codes, -- could be text/html or text/plain or some sort of XML document mime_type varchar(100) not null, -- will hold the title in most cases one_line_summary varchar(200) not null, -- the entire article; 4 GB limit body clob ); 2

  3. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 Should all articles shown to all users? Perhaps it would be nice to have the ability to store an article and hold it for editorial examination: create table articles ( . . . editorial_status varchar(30) check (editorial_status in ('submitted','rejected','approved','expired')) ); Programmers in your organization must remember to include a where editorial_status = 'approved' clause in every script on the site? Perhaps not. rename the table altogether and build a view for use by application programmers: create table articles_raw ( . . . ); create view articles_approved as select * from articles_raw where editorial_status = 'approved'; 3

  4. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 Comments on Articles One of the six required elements of online community: means of collaboration. Are often the most interesting material on a site. Ability to express and present multiple truths. create table comments_on_articles_raw ( comment_idinteger primary key, -- on what article is this a comment? refers_tonot null references articles, creation_usenot null references users, creation_datenot null date, languagechar(2) references language_codes, mime_typevarchar(100) not null, one_line_summaryvarchar(200) not null, bodyclob, editorial_statusvarchar(30) check (editorial_status in ('submitted','rejected','approved','expired')) ); create view comments_on_articles_approved as select * from comments_on_articles_raw where editorial_status = 'approved'; 4

  5. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 Combining the two tables using refers_to. create table content_raw ( content_id integer primary key, -- if not NULL, this row represents a comment refers_to references content_raw, -- who contributed this and when creation_user not null references users, creation_date not null date, -- what language is this in? -- visit http://www.w3.org/International/O-charset-lang language char(2) references language_codes, -- could be text/html or text/plain or some sort of XML document mime_type varchar(100) not null, one_line_summary varchar(200) not null, body clob, editorial_status varchar(30) check (editorial_status in ('submitted','rejected','approved','expired')) ); 5

  6. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 To be able to write some scripts without having to think about the fact that different content types are merged create view articles_approved as select * from content_raw where refers_to is null and editorial_status = 'approved'; create view comments_on_articles_approved as select * from content_raw where refers_to is not null and editorial_status = 'approved'; 6

  7. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 What is Different about News? An expiration date and a release_time these columns could be useful for all site content. create table content_raw ( content_id integer primary key, refers_to references content_raw, creation_user not null references users, creation_date not null date, release_time date, -- NULL means "immediate" expiration_time date, -- NULL means "never expires" language char(2) references language_codes, mime_type varchar(100) not null, one_line_summary varchar(200) not null, body clob, editorial_status varchar(30) check (editorial_status in ('submitted','rejected','approved','expired')) ); 7

  8. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 To distinguishes a news story from an article on the Windows We'll need one more column: create table content_raw ( content_id integer primary key, content_type varchar(100) not null, refers_to references content, creation_user not null references users, creation_date not null date, release_time date, expiration_time date, language char(2) references language_codes, mime_type varchar(100) not null, one_line_summary varchar(200) not null, body clob, editorial_status varchar(30) check (editorial_status in ('submitted','rejected','approved','expired')) ); create view news_current_and_approved as select * from content_raw where content_type = 'news' and (release_time is null or sysdate >= release_time) and (expiration_time is null or sysdate <= expiration_time) and editorial_status = 'approved'; 8

  9. INTERNET ENGINEERING MOHAMMAD BORUJERDI Content Management CHAPTER 6 What about Discussion? simply add rows to the content_raw table with a content_type of "forum_posting" and query for the questions by checking refers_to is null. On a site with multiple forums, we'd need to add a parent_id column to indicat under which topic a given question falls. Within a forum with many archived posts, we'll also need some way of storing categorization, e.g., "this is aDarkroom question". Why Not Use the File System? One good thing about the file system is that there are a lot of tools for users with different levels of skill to add, update, remove, and rename files. One bad thing about giving many people access to the file system is the potential for chaos. A designer is supposed to upload a template, but ends up removing a script by mistake. The deepest problem with using the file system as a cornerstone of your content management system is that files are outside of the database. You will need to store a lot of references to content in the database, e.g., "User 960 is the author of Article 231", "Comment 912 is a comment on Article 529", etc. It is very difficult to keep a set of consistent references to things outside the RDBMS.. . . . . 9

More Related