Chapter 6Content ManagementThere are two fundamental elements to content management: (1)storing stuff in a content repository, and (2) supporting the workflowof a group of people engaged in putting stuff into that repository. Thischapter will treat the storage problem first and then the workflowsupport problem. We'll also look at version control <strong>for</strong> both contentand software, at look and feel design <strong>for</strong> individual pages, atnavigation design, and at in<strong>for</strong>mation architecture.Part of the art of content management <strong>for</strong> an online learningcommunity is reducing the number of types of content. For example,consider a community where the publisher says "I want articles[magnet content], comments from users on articles, news from thepublisher, comments on news from users, questions from users, andanswers to questions." A naive implementation from thesespecifications would result in the creation of six database tables:articles, comments_on_articles, news,comments_on_news, questions, answers. From the RDBMS'sperspective, there is nothing overwhelming about six tables. Butconsider that every new table defined in the RDBMS implies roughly20 Web scripts. Ten of these scripts will constitute a user experience:view a directory of content in Table A, view one category, view oneitem, view the newest items, grab a <strong>for</strong>m to insert an item, confirminsertion, request an email alert of comments on an item. Ten ofthese scripts will constitute an administrator's experience: view adirectory of content in Table A, view one category, view one item,view the newest items, approve an item, disapprove an item, deletean item, confirm deletion of an item, etc. It will be a bit tough to codethese 20 scripts in a general fashion because the SQL statementswill differ in at least the table names used.Consider further that to offer a complete index of site content, you'llhave to write a program that pulls text from at least six tables into asingle index.How different are these six kinds of content, really? We'll look at thetables that we need to define <strong>for</strong> storing articles, then proceed to theother types of content.94Anderssoneve@eveandersson.comPhilipGreenspunphilg@mit.eduAndrewGrumetaegrumet@alum.mit.edu14.2 Exercise 1: <strong>Community</strong> Reading List, DataModel and Amazon APIYour goal in this exercise is to provide a facility <strong>for</strong> your communitymembers to develop a shared reading list, a set of books that new ornovice members might find useful. You'll use the SOAP interface thatis part of Amazon Web Services(http://www.amazon.com/webservices/) to retrieve productin<strong>for</strong>mation directly from the Amazon servers that will then bedisplayed within your server's HTML pages.Start by writing a design document that lays out your SQL data modeland how you're going to use the Amazon API (which functions tocall? which values to process?). Your recommended_books tableprobably should be keyed by the International Standard BookNumber (ISBN). For most of your career as a data modeler, it is bestto use generated keys. However, in this case there is an entireinfrastructure to ensure the uniqueness of the ISBN (seewww.isbn.org) and there<strong>for</strong>e it is safe <strong>for</strong> use as a primary key.For each book your data model ought to be able to record at least thefollowing:• title• authors (either mushed together in one column, a horrifyingviolation of First Normal Form, or broken out if you have theenergy)255
Here's a raw SOAP request/response pair <strong>for</strong> a hypothetical "who'sonline" service that returns in<strong>for</strong>mation about users who have beenactive in the last N seconds:Request (plus whitespace <strong>for</strong> readability)POST /services/WhosOnline.asmx HTTP/1.1Host: somehostContent-Type: text/xml; charset=utf-8Content-Length: lengthSOAPAction: "http://jpfo.org/WhosOnline"600Response (plus whitespace <strong>for</strong> readability)HTTP/1.1 200 OKContent-Type: text/xml; charset=utf-8Content-Length: lengthEve2546.1 A Simple Data Model <strong>for</strong> ArticlesHere's a very basic data model <strong>for</strong> storing articles:create table articles (article_id integer primary key,-- who contributed this and whencreation_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)languagechar(2) references language_codes,-- could be text/html or text/plain or-- some sort of XML documentmime_type varchar(100) not null,-- will hold the title in most casesone_line_summary varchar(200) not null,-- the entire article; 4 GB limitbody clob);Should all articles in the database be shown to all users? Perhaps itwould be nice to have the ability to store an article and hold it <strong>for</strong>editorial examination:create table articles (article_id integer primary key,creation_user not null references users,creation_date not null date,languagechar(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')));Do you trust all the programmers in your organization to remember toinclude a where editorial_status = 'approved' clause inevery script on the site? If not, perhaps it would be better to renamethe table altogether and build a view <strong>for</strong> use by applicationprogrammers:create table articles_raw (article_id integer primary key,...editorial_status varchar(30)check (editorial_status in95
- Page 1 and 2:
SoftwareEngineering forInternetAppl
- Page 3 and 4:
Signature: ________________________
- Page 5 and 6:
end-users. We use every opportunity
- Page 7 and 8:
• availability of magnet content
- Page 9 and 10:
• we want to see if a student is
- Page 11 and 12:
you supply English-language queries
- Page 13 and 14:
What to do during lecturesWe try to
- Page 15 and 16:
The one-term cram courseWhen teachi
- Page 17 and 18:
332• spend a term learning how to
- Page 19 and 20:
Once we've taught students how to b
- Page 21 and 22:
has permission to perform each task
- Page 23 and 24:
UDDIUnixcustomer's credit card. If
- Page 25 and 26:
thousands of concurrent users. This
- Page 27 and 28:
OraclePerlnamed XYZ" without the pr
- Page 29 and 30:
LDAPLinuxbits per color, a vastly s
- Page 31 and 32:
FilterFirewallFlat-fileGIF318functi
- Page 33 and 34:
when there is an educational dimens
- Page 35 and 36:
system. The authors of the core pro
- Page 37 and 38:
Sign-OffsTry to schedule comprehens
- Page 39 and 40:
scheduling goals that both you and
- Page 41 and 42:
Client Tenure In Job (new, mid-term
- Page 43 and 44: ReferencesEngagement ManagementSQL*
- Page 45 and 46: Decision-makers often bring senior
- Page 47 and 48: presentation to a panel of outsider
- Page 49 and 50: 300always been written by programme
- Page 51 and 52: 17.3 Professionalism in the Softwar
- Page 53 and 54: Try to make sure that your audience
- Page 55 and 56: Chapter 17WriteupIf I am not for my
- Page 57 and 58: Suppose that an RDBMS failure were
- Page 59 and 60: analysis programs analyzing standar
- Page 61 and 62: at 9 hours 11 minutes 59 seconds pa
- Page 63 and 64: found" will result in an access log
- Page 65 and 66: 15.18 Time and MotionThe team shoul
- Page 67 and 68: select 227, 891, 'algorithm', curre
- Page 69 and 70: create table km_object_views (objec
- Page 71 and 72: • object-create• object-display
- Page 73 and 74: The trees chapter of SQL for Web Ne
- Page 75 and 76: );274-- ordering within a form, low
- Page 77 and 78: and start the high-level document f
- Page 79 and 80: Example Ontology 2: FlyingWe want a
- Page 81 and 82: systems. What would a knowledge man
- Page 83 and 84: spreadsheet". Other users can comme
- Page 85 and 86: Chapter 15Metadata (and Automatic C
- Page 87 and 88: {site url}{site description}en-usCo
- Page 89 and 90: drawing on the intermodule API that
- Page 91 and 92: At this point you have something of
- Page 93: • description• URL for a photo
- Page 97 and 98: Chapter 14Distributed Computing wit
- Page 99 and 100: conduct programmer job interviews h
- Page 101 and 102: Most admin pages can be excluded fr
- Page 103 and 104: content that should distinguish one
- Page 105 and 106: Chapter 13Planning ReduxA lot has c
- Page 107 and 108: the Internet-specific problem of no
- Page 109 and 110: wouldn't see these dirty tricks unl
- Page 111 and 112: 12.8 Exercise 4: Big BrotherGeneral
- Page 113 and 114: than one call to contains in the sa
- Page 115 and 116: A third argument against the split
- Page 117 and 118: way 1 1/16One might argue that this
- Page 119 and 120: absquatulate 612bedizen 36, 9211cry
- Page 121 and 122: What if the user typed multiple wor
- Page 123 and 124: Chapter 12S E A R C HRecall from th
- Page 125 and 126: long as it is much easier to remove
- Page 127 and 128: features that are helpful? What fea
- Page 129 and 130: made it in 1938)? Upon reflection,
- Page 131 and 132: environment, we identify users by t
- Page 133 and 134: those updates by no more than 1 min
- Page 135 and 136: Balancer and mod_backhand, a load b
- Page 137 and 138: translation had elapsed--the site w
- Page 139 and 140: It seems reasonable to expect that
- Page 141 and 142: 11.1.5 Transport-Layer EncryptionWh
- Page 143 and 144: such as ticket bookings would colla
- Page 145 and 146:
give their site a unique look and f
- Page 147 and 148:
It isn't challenging to throw hardw
- Page 149 and 150:
Chapter 11Scaling GracefullyLet's l
- Page 151 and 152:
10.15 Beyond VoiceXML: Conversation
- Page 153 and 154:
Consider that if you're authenticat
- Page 155 and 156:
In this example, we:194• ask the
- Page 157 and 158:
As in any XML document, every openi
- Page 159 and 160:
(http://www.voicegenie.com). These
- Page 161 and 162:
Chapter 10Voice (VoiceXML)questions
- Page 163 and 164:
9.15 MoreStandards information:•
- Page 165 and 166:
9.14 The FutureIn most countries th
- Page 167 and 168:
9.10 Exercise 7: Build a Pulse Page
- Page 169 and 170:
9.6 Keypad HyperlinksLet's look at
- Page 171 and 172:
text/xml,application/xml,applicatio
- Page 173 and 174:
Protocol (IP) routing, a standard H