What do you think would be the reasoning for
ending a discussion that soon or at all?
- keep focus on current articles?
- keep the database small (e.g. delete comments for older articles)?
Yes, about 80 lines of ASP/HTML code I think, and a half dozen stored
procedures. Mail me offline and I'll show you... I'm a little afraid of
what joe public will do to it, since I'm not exactly a fan favorite around
here. The admin side is a little more complex, but only because I'm an
overachiever.
Did you add, or would it be advisable to add an index for new comments
within a certain time frame?
I don't know what you mean. Comments are associated with a posting/article
whatever you want to call it, and are displayed after the article in either
ascending or descending order. So if you want to index performance, maybe
you have this:
CREATE TABLE dbo.BlogPosts
(
BlogPostID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,
dt SMALLDATETIME NOT NULL DEFAULT GETDATE(),
title VARCHAR(255) NOT NULL,
body TEXT
--, other columns yadda yadda
)
GO
CREATE INDEX dt ON dbo.BlogPosts(dt)
GO
CREATE TABLE dbo.BlogPostComments
(
BlogPostCommentID INT IDENTITY(1,1) PRIMARY KEY NONCLUSTERED,
-- not necessary for the IDENTITY column, but makes it easier
-- from a management perspective, e.g. Delete comment x
BlogPostID INT NOT NULL
FOREIGN KEY REFERENCES dbo.BlogPosts(BlogPostID),
dt SMALLDATETIME NOT NULL DEFAULT GETDATE()
--, name, email, body yadda yadda
)
GO
CREATE CLUSTERED INDEX id_dt ON dbo.BlogPostComments
(
BlogPostID,
dt -- DESC if you want last comment listed first
)
GO
Now, you could get more complicated than that, for example you could show
replies in a threaded fashion like a newsgroup, so I could reply to a
comment and it would visually show me that I replied to the comment, not to
the original article. Most blogs, I think, don't require that level of
sophistication -- this can lead to recursive queries and poor performance if
the nesting gets too deep.
Not ever having produced an RSS feed, I'll need to research.
It's really not a lot of work. Basically you just have an XML entry for
each post, or maybe your feed only shows the most recent 20 articles, or
only those that were posted or have comments that were posted in the last 3
days. It can be that dynamic and then some...
Should you require a registration to post?
I think it's a bad idea, unless the user is really going to get something
out of registering. People tend to shy away from sites that require
registration.
Of course, if you don't have registration, there is no accountability, and
you will become a moderator / babysitter for those that can't keep their
temper in check or just like to cause problems.
What statistical processing should be included?
I have article views by date range (e.g. What were the top 5 most popular
articles viewed this week), which articles have the most comments, the most
recent comments, etc.
Not sure what at 5006 is relevant here.
That's just my signature in Outlook Express on my PC at work. (See the --,
that's a sig separator.)