Yet another CMS, take 2

Posted Monday, July 4, 2005

Filed under: , ,

As I wrote a while ago, I want to create a CMS that's better than what I have yet found. Here's where I stand for the moment.

After weeks of redefining the framework and the design constraints, I finally decided on keeping things as straight as possible: one database table for texts, one for images, one for comments. This likely won't change, because it can't really be much simpler!
From that point, whether you want to make a blog, gallery or forum is up to you because they use the same basic elements. I have yet to determine the mechanism I will use to map urls to what is pulled from the database.
I have also a table for links, one for events and one for users --this one with a password column.

Too often the designer is placed at the centre of the system but this is starting to change. Apple's new OS, folksonomies, tag clouds, search as sorting, all recent developments lead to the idea that architecture only belongs to the backend, to be replaced by categories on the frontend.
I need to learn more about databases to determine if I should implement a category table (updated in the background when an element's tags change) or just "sniff" them on the fly.
Basically, that's where I stand for now... Things are likely to change again but for the moment I feel like I've taken it a bit closer to my aim.

My tables have the following architecture:

  1. id
  2. title
  3. description
  4. content
  5. author
  6. (author's) email
  7. (author's) url
  8. category (list)
  9. date 1
  10. date 2
  11. visibility
  12. (password only for users)

The title has to be unique, and the following fields are indexed: date, category and author.
[Edit: Saving author info (name, email and url) for every input is a bit of table space indeed. But I decided to do it because people don't always take the trouble to sign up, or even log in. Upon entering content, the system will compare the information provided by the user and offer to associate the content to the account -prompting for the password- if there is any match.
Means that I need to add another column with author id, mapped to the author table. It's really getting more complicated by the minute!]
[Edit 2: another solution would be to record an author id in place of author name email etc... Means I'd have to look it up from the author table when displaying an element with such a signature. Oh well, all that to avoid adding another column to that darn table.]

Comments disabled because of spammers.

comment #1 On 04/07, Fetard wrote :

Why should the title be unique? Two posts could have the same title but a different id.

You should perhaps add a variable for "type" value, like text, picture...

Sorry for my bad english :)

comment #2 On 04/07, korbo wrote :

Because ids will be used internally, not externally. I'd like to have urls like "/yet another CMS" be mapped properly by the system, instead of "/id/245/yet+another+CMS". Is it taking it too far? You tell me...

comment #3 On 04/07, Fetard wrote :

But you could use the ID and the title in URLs also, like /?id=XX&title=Bla+bla+more+blablabla, to be more readable by search crawlers :)

comment #4 On 05/07, Fetard wrote :

Arghhhhhhhhhhhh you "justify" your text...

(Did you notice the fact that when you click on my website's URL Firefox shows you the site of 'Le monde'?)

comment #5 On 05/07, Korbo wrote :

I don't see your point. What does the world care about a database id? The world needs a way to tell what article they want that's easy to remember and makes sense with the content of the article. Which corresponds exactly to the definition of the title of the article in my opinion, not some random meaningless id.

Let the machine do the dirty work, and the users enjoy the results. (And the coders sweat out there behind their screens :-))

comment #6 On 05/07, Korbo wrote :

Yes, I justify paragraphs, I like things to be square. Centered and right-aligned text is difficult to read, and left-aligned as well to me.

If your urls redirected, it's because you added http, which is already added by the cms. Any url will be stripped of "http://" now, though I should only strip them in the beginning. Not interested in regular expressions at this very moment, so I'll leave it that way. :-)

comment #7 On 06/07, Fetard wrote :

But, if you have two articles or posts or pictures with the same title?

comment #8 On 06/07, Fetard wrote :

For the redirection, the problem is not that I forgot to cut off the http...

The fact is : when you surf on http://http://www.domain.com on Firefox, it shows "Le monde"'s website :o

comment #9 On 06/07, Korbo wrote :

Well, two texts or images with the same title, I guess it means that they are not descriptive enough. That's what it takes to have purely friendly urls...

comment #10 On 06/07, Fetard wrote :

You are limiting writers' possibilities by this way...

comment #11 On 07/07, Korbo wrote :

Well, yeah. But on the other hand, two pictures, or two texts with the same name would only confuse the visitor. There are no such things as synonyms.
Consider a forum: two guys post the same question with the same subject. The second one is presented with a choice: graft his question to the existing thread, or choose a more precise subject.
Consider a gallery: same situation, the uploader can either (if allowed to) replace the first image with the new version or modify the title of his/her picture.
Consider a blog, a calendar, anything: two items with the same name only cause confusion.
I really think that everybody wins in the end.
(Of course, the person won't have to retype everything!)

comment #12 On 08/07, Fetard wrote :

And so, in your table, you save the full title of the post/picture?

Technorati Profile