Re: Trying to build a database driven website
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Wed, 01 Oct 2008 23:44:43 -0400
doznot wrote:
Jerry Stuckle wrote:
That's because your first premise is 100% incorrect.
I've been out of town and I don't read news on my traveling laptop.
So I'm jumping back in a bit late.
And this thread is getting a bit tired. However, you (Jerry) have
successfully dodged my main point from the beginning. All I said, at the
start, was that there was a "valid small site niche" for a files-based CMS (or page generation tool). I never said a files-based system was "better than" anything. I said it was a valid alternative to a
database, that makes particular sense in the small site context.
No, I didn't dodge your main point. I don't think a database-based system is harder or more complex than a file-based system. Rather, I think it's much easier. Less to worry about.
The one point that does make (a lot of) sense to me is the inherent
difficulty in performing search and replace operations on html
fragments, that need to be updated. In a database context these
search and replace operations (over semi-random fragments, not
labeled columns) must be framed inside query, fetch, replace and
update sequences in a database. Over files it's so easy you type
the code out at the command line. You cannot do that with query fetch
replace and update sequences, especially when the fragments you are
working over might appear in differently named columns, perhaps even
in different tables.
It is quite easy to do search/replace in a database. Queries are not hard, and you don't need to fetch anything.
And databases don't require command-line access to the system - not available on many shared hosts.
Also, if you design your database correctly, they won't appear in different tables or columns.
Html fragments (that exist in all database driven packages I've ever seen) will contain small sub-strings that periodically need to be changed. Perhaps it's a link that has been moved, where the link in question is known to exist on multiple, indeterminate pages.
Or perhaps said html fragments are known to contain references Joe Blow
is now an MD instead of an intern. That particular chore comes up
again and again and again in my work (search for a text pattern
buried in html fragments and change it to something else).
Quite easy to do in a database, if you know how. In fact, even easier, if you plan your database with changing data in mind.
In the case of a link, for instance - just have a table with links in it and refer to it from other tables. That way you only need to change one link.
However, even if you have the link embedded in multiple html fragments, it's quite easy to change.
Search and replace over html fragments stored in a database
is more cumbersome than working over files. That makes room for a
niche alternative. A reference to this sort of thing (a files-based system) was mentioned in this group about a half a year ago and it
got attacked then by the usual aggressive and pretend-to-know-everything
attackers, but it also got praised by at least one of the group's most prestigious participants.
Not if you know how do to it, it isn't.
I don't think a files-based system would be appropriate for a large
commercial site. But for read-mostly informational sites of 100 pages
or less it works well indeed for me, and I find it to be so much
quicker and easier to deal with than the larger database-driven sites,
that I also worked with for years.
I'm glad it works well for you. But I doubt it will work for most sites - or on many shared hosting companies (which don't have command line access).
A database-based solution works on any host which supports databases (and if they don't, they aren't worth using, IMHO).
But you ignored my main point. A vast majority of the database-driven sites do NOT store such HTML in databases. The main ones which do are using CMS's such as Drupal, Joomla, Mambo, etc. That's a completely different approach to database-driven websites.
I've only had one site (a non-profit) which used a CMS, and that's because they needed a blog. And actually, the blog was only a small part of the site. The rest of the site was also database-driven - but had no HTML (other than that entered by members for their own pages). However, it used databases heavily.
All the rest of my sites use databases heavily, also. But they aren't a CMS, so they have very little HTML in the database.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: Trying to build a database driven website
- From: doznot
- Re: Trying to build a database driven website
- References:
- Re: Trying to build a database driven website
- From: doznot
- Re: Trying to build a database driven website
- Prev by Date: Re: Not displaying erros
- Next by Date: Re: PHP COM and Excel
- Previous by thread: Re: Trying to build a database driven website
- Next by thread: Re: Trying to build a database driven website
- Index(es):
Relevant Pages
|