Forum Moderators: open

Message Too Old, No Replies

Truely Dynamic Site

Howto?

         

aspr1n

12:13 am on Nov 3, 2002 (gmt 0)

10+ Year Member



Hi all,

I have written plenty of stuff that pulls db generated content into nice neat tables etc, but I have neve tried building a completely dynamic site with *all* my xhtml content in a db, so....

I am writing a site that will pull all content from a database (MySQL & PHP), articles, news, as well as products etc, and then use mod rewrite to transpose to static urls.

I wonder what special considerations there are that anyone might be able to enlighten me on.

For example should I attempt to split the xhtml content say into multiple "components" (Subject, Summary, Other, Content etc)? If there is an image in the content, should that image be statically linked or dynamically as well?

Obviously, somehow maintaining the integrity of the xml content is important for updating and logic etc.

Also, any suggestions on URL layouts etc.

To make matters worse I come from a jsp background, so this really is going to be entertaining ;-)

cheers,

asp

aspr1n

12:20 am on Nov 3, 2002 (gmt 0)

10+ Year Member



Sorry, forgot to ask this as well ;-)

I'm used to using db's to store lots of little bits of information, rather than a small no. of big bits so....

In a long article, should I physically split the content from a db point of view (seems like a bad idea), or allow php to determine the maximum content on any one page? In which case is there a line to be drawn?

asp

Ian the Terrible

12:51 am on Nov 3, 2002 (gmt 0)



You probably don't need to split articles up in the database. MySQL's limit on TEXT data types is 64K, and if that's too limiting you can always use a MEDIUMTEXT, which can store up to a 16MB chunk of text. Should even *that* be too limiting, you could use a LONGTEXT, which will accomodate a 4GB chunk. And that's just nuts.

Use PHP to break them up, if you need to. How big a chunk is reasonable depends on the bandwidth of your expected audience.

SethCall

3:40 am on Nov 6, 2002 (gmt 0)

10+ Year Member



This is a very interesting question, and I am sad that it hasn't been answered yet. (I would like to hear some tips/hints/info too!)

I would go ahead and agree that allowing php to deal with the text is better than breaking it up in the database. I am sure you can imagine all the reasons why.