tags:

views:

36

answers:

1

I'm refactoring an older online catalog system where the various messages sent to users - things like 'Thank you for registering with our store', 'Thank you for your order', 'Your order has shipped' - were all stored as text fields in the database.

It's worked well enough and it's nice to have the CMS subsystem be able to simply pull a db field into a browser-based editor for updates. But a browser-based editor is also a downside if I want a richer editor to handle more complex layout functions.

Should I give consideration to moving the messages to the filesystem and just store a URI in the db?

thx

+1  A: 

It sounds like you're already considering it! :)

Well, doing that will add complexity won't it, because information will have to be looked up. You'll have to look in the database anyway to find where the file is, so what's the point. It'll probably go wonky over time, unless you're very careful, you'll end up with URI's in the database where the file is missing, or files without a URI in the database.

I'm assuming your richer editor works on files, and that's why you're considering switching to file based?

How about, when you get the record out of the db, just extract the data to temporary file then. Then edit it in the rich editor, then when you've finished and saved it, write it back to the db.

To be honest, I don't really know enough to answer this. What editor are you considering using?

Scott Langham
I use FrontPage...doesn't everybody? ..just kidding....Dreamweaver. But you are right I'll probably have to pay a bit closer attention to paths of images and script includes than i'm used to with conventional design but that shouldn't be too great of a problem. thx
justSteve