RE: Data architecture question
| From: | Dave Thomas | Date: | Thu, 14 Dec 2000 10:59:15 +0000 |
| Subject: | RE: Data architecture question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30279@lists.php.net to get a copy of this message | ||
Well, you might start by asking yourself how far you intend to scale this sucker and how users and
site admins will use this.
I found a few very insightful bits of information on the net when I began construction on a similar
site to the one you mention:
1. Philip and Alex's Guide to Web Publishing, chapter 3: Scalable systems for on-line
communities. It was written my this hotshot MIT guy Philip Greenspun, creator of photo.net (only
it's a shame he based his beautiful system in TCL instead of PHP -- the architecture's
great though). Available online at http://www.arsdigita.com/books/panda/community.
This is a real gold-mine & a practical data model for nearly exactly the kind of
site/application you seem to be looking for, Ashley. You may need to look no further than
"Module 2: Content Database." I adapted this table to suit my needs, and at the time, I
needed it to link to arguments to another PHP application.
2. The PHP FastTemplate module. Tie this in to the previous "static_pages" table from
the previous section to hold ONLY content in the database, not HTML layout.
My implementation actually did what Alex suggested -- create an admin with a PHP cgi-binary which
ran as a CRON job and recreated the flat html pages.
3. A more state-of-the-art solution could be to use an XML flatfiles + relational database. I
envision using a hybrid system of flatfiles like Phil describles, but have a look at the
O'reilly book 'Managing Internet Groupware.' They implement an 'XML
docbase' solution in Perl
Yep -- that's probably the 'state-of-the-art' way of dealing with the problem -- I
wish I knew Perl better.
That would save you some hassles since I suspect it's a lot easier to make sweeping changes to
the content using a tool like Perl on XML flatfiles than to a BLOB in a relational database. And if
you screw something up, XML document validation may catch it before it bites you.
I'm just fascinated by PHP architectural issues. I'd be interested in furthering this
architecture into a PHP OSS project so I wouldn't mind helping you pave the way. Keep me up to
date with the decisions you decide to make
Dave