Author Topic: Compendium's programation?  (Read 747 times)

radicalblues

  • CC:DBT Dream Team
  • Guardian (+100)
  • *
  • Posts: 163
  • It's not easy being green
    • View Profile
    • X Radical Dreamers
Compendium's programation?
« on: June 28, 2008, 09:06:53 am »
The site's clean, organized and understandable design has very much called my attention. I know the forum runs by simplemachines, and you've greatly integrated it to the site.

But about the compendium itself, does it run under certain script, or one of the webmasters completely programmed it? Is it like a Wiki (that doesn't suck) where the webmasters can edit entries? As I see links like this: http://www.chronocompendium.com/Term/Image:Community.png.html

And also at the bottom things like "The following pages link to this image:", which most certainly are automatically generated...

So, pardon my webmaster curiosity, who is the mastermind behind this system? :o

Ramsus

  • Guest
Re: Compendium's programation?
« Reply #1 on: June 28, 2008, 03:53:52 pm »
There's nothing much to see here -- certainly nothing impressive or praiseworthy. Everything technical could be completely redone from scratch in a couple of days, and even then most of that time would be designing and implementing a common layout, not writing code.

The bulk of the site is powered by Media Wiki and SMF (originally we used phpBB).

The rest of the site is run by three Python CGI-scripts:
http://www.chronocompendium.com/index.py - Generates the news page from the news forum.
http://www.chronocompendium.com/rssnews.py - Generates RSS feed of the site news.
http://www.chronocompendium.com/story.py?id=1 - Generates story content from collections of XML files.

As well as a small, hidden utility library of Python code I've written for generic web development, originally used in the since removed Projects MiniWikis and still somewhat used by the above three scripts.

As for all of the URLs, everything is rewritten with Apache mod_rewrite to a scheme that should be usable even if we were to abandon MediaWiki or remove those CGI scripts. The only exceptions are some of the images and special pages in the Wiki and any links to the forums.

Also, it'd actually be more efficient in this case to just use PHP (CGI scripts with scripting languages incur the overhead of the interpreter on each hit unless you use something like FastCGI to make them long-running), but it's more fun for me to write Python code (it does make handling character encoding issues and international text easier too). Even using a "fun" language though, most web development for content and community sites like this is pretty boring from a computer science standpoint, which is why the site has almost no original code, as that'd be a waste of time with no reward.

Finally, I would emphasize that web development in particular requires a strong working knowledge of secure coding practices and the reasoning behind them. I could rewrite the site from scratch with no security holes by design (even writing my own web server and database), but that's because I've read lots of books, articles, and presentations and practiced a lot of things concerning code security over the years, and my computer science knowledge and programming skills aren't limited to simple web development tasks. I can usually find some major security flaw in quite a few fansites with custom written parts within a matter of minutes.

Which is also the reason I'm so lazy with the site. From a technical standpoint, it's nothing special, and it's pretty boring. There's much more to learn from out there.

I'll also note that the other major issue with new developers, especially on the web, is they have no clue about the proper handling of international text because they know nothing about character encoding and unicode, and thus how to handle text from HTML form to database to presentation consistently without introducing the ability to screw it all up. On the web, this is especially important stuff... I mean, almost everything here is bloody text!



Ramsus

  • Guest
Re: Compendium's programation?
« Reply #2 on: June 28, 2008, 04:19:52 pm »
Just to show how little custom code there is, here are those three scripts:

http://www.chronocompendium.com/ramsus/code/

radicalblues

  • CC:DBT Dream Team
  • Guardian (+100)
  • *
  • Posts: 163
  • It's not easy being green
    • View Profile
    • X Radical Dreamers
Re: Compendium's programation?
« Reply #3 on: June 29, 2008, 03:32:18 am »
Thanks for your elaborate reply and the scripts, that was pretty insightful :)
Indeed it's sort-of simple, but I love the simplicity of it.

I currently run a spanish site about a rock band, X JAPAN, which I'm gonna make in english now too. I've been experimenting with various php methods for easy updating, but hadn't found a system I really liked.