![]() |
|
#1
|
|||
|
|||
|
I've just written a basic content management system in ASP.NET, using VB. BASICALLY (and I mean basically, because the implementation was a pain) It allows me to create text files which contain modules of pages, then assemble pages by sticking these textfiles together using includes.
Anyway, I was just wondering if creating/editing these text files and then including them in these pages is the best way to go about content management. Its VERY object-oriented, since one can use these content modules again and again for headers, footers, whatever. But I'm not sure how elegant it is, and how all the includes and such would tax a server in operation. Right now, it works great set up on a localhost. Basically, what I'm asking is, is there a better way of serving the same functionality as these textfiles? Database? I've always considered databases for repititious content. While I do have database connections in the plan, they aren't for web page construction (e.g. headers, footers, etc), but for content like news items, etc. Any help? Thanks, -Rob http://www.abstractia.com |
|
#2
|
|||
|
|||
|
About two years ago I made the conscious decision to work more with file-based CMS architecture than db-based ones. The main reason is usually navigation; a file-based system lends itself to a more hierarchical structure, and has been around forever. And the overhead seems to be directly related to the host machine's power.
Since I made that decision, creating a CMS has been pretty painless, and fairly easy to maintain...now I just have to hook up that nice rich html editor i wrote a while ago. |
|
#3
|
|||
|
|||
|
Have you taken a look at DotNetNuke.com?
Stephen W. Cote wranlon@hotmail.com http://www.whitefrost.com/ |
|
#4
|
|||
|
|||
|
Rob,
This is a very interesting point that you raise and something I have agonised over before too. The first obvious hit in using FS is loss of performance but with rich caching systems that ASP.NET exposes its a minor moan. I must admit there are advantages to both but all my recent projects have used database in conjunction with HTTP modules. While the FS structure is clearer and will provide you with XCOPY deployment, you need to be a pretty skilled developer to work with the hierachy and cache it properly. If you are using a rich discipline structure, you also need to work with FileSystemWatchers which generally means installing an NT service on the box. The FS solution also requires gross duplication of your XML schema throughout the FS structure. A database solution is far more viable to be honest. Now the question you should be asking is this: What chunks of data do I store (be it in a database or XML file)? A database will allow you to abstract very far you would perhaps only store some kind of XHTML 2.0 style markup representing your content, rather than getting into some XML schema. It's key that you store using something like XHTML 2.0 so that your content looks correct when taken out of context of its structure view. i.e. you are effectivly abstracting the two and hence their relationship becomes one->many. -- Regards, Tim Scarfe <tim@developer-x.com> http://www.developer-x.com |
|
#5
|
|||
|
|||
|
would it also be true to consider the choice of FS vs. DB from a security point of view, in that a DB is more secure than FS. i would also argue to a point (though i know very little about this matter), that its not so much as where you store it (be it FS, DB etc.), but how you store it (like as XHTML2 as Tim suggests).
[url="http://chrispoole.com"]Chris[/url:mhay65wlx4] |
|
#6
|
|||
|
|||
|
If you write static - completed - files to the filesystem, you don't have to call the database on each request. Kinda like MovableType does. Combine this with [url="http://simon.incutio.com/archive/2002/11/16/funkyCachingExplained"]funky caching[/url:6yvw4c6fjc] and you'll have a very powerful system.
- [url="http://neo.dzygn.com/"]Mark[/url:6yvw4c6fjc] |
|
#7
|
|||
|
|||
|
Chris,
Security is the same for either (assuming you are going the NT/SQL Server route). i.e. You can just use ACLs. Security for the FS would be slightly more rich because it is a hierachial system but picking at straws. It would be hard to take advantage of FS security if you didn't have access to the server and infrastructure. Database servers allow slightly more flexibility in this regard. The whole issue is slightly subjective and more implentation details are required. -- Regards, Tim Scarfe <tim@developer-x.com> http://www.developer-x.com |
|
#8
|
|||
|
|||
|
Ok, there's a lot of bogus bull**** flying around here. I want to clear up a couple of perceptions that many of you seem to hold:
1.) an RDBMS or OODBMS is more secure than the filesystem. This is complete bull****. Totally bogus, since it ignores the two questions you have to ask when analying a security system: secure against who or what? for how long? Since no one here seems to be defining threat models, any statement of primacy are prima-facia false, since they can't be true when I assign an arbitrary threat model. 2.) a database is slower. Again, complete BS. Slower for what? Slower in what capacity? And with how much application logic on top of it? Databases are data stores that may or may not be well suited to a particular task. The relative speed of your system (regardless of the underlying storage mechanism) is going to be tightly related to how you do (or don't) play to the strengths of your storage schema. If you know that the filesystem is an atomic, hierarchial, lock-on-write, multiple-reader storage mechanism supporting streaming reads and can design for those criteria, I bet you could design a CMS that's roughly as fast as anything you can do with and RDBMS (ignoring complex searches, for the time being). RDBMSes are implemented on top of filesystems, after all. Tim is of course right here: to have an intelligent discussion of any part of the described system, we need to know more about it. -- Alex Russell http://netWindows.org http://alex.netWindows.org |
|
#9
|
|||
|
|||
|
Who said a database is slower?
<blockquote id="quote"><span class="smalltext" id="quote">quote:<hr id="quote"> Ok, there's a lot of bogus bull**** flying around here. <hr id="quote"></blockquote id="quote"></span id="quote"> Thanks for your comments, but you didn't point out any "bogus" information. I already commented on what Chris said about security. We are not defining threat models because we are not mitigating any risk yet! Cool comments but chill out man ![]() -- Regards, Tim Scarfe <tim@developer-x.com> http://www.developer-x.com |
|
#10
|
|||
|
|||
|
What do you think of using a FS for content items with a specific purpose, (i.e. html markup, specialized unique content) and using DB to feed into XML/RSS allowing for things like news feeds,etc to have a database backend (inherent archiving).
http://www.abstractia.com/expoundlogic.gif I'm not the best with flowchart logic, but take a gander at what I've developed thus far. These are .aspx components in the system. See how the database connections go through the XML/RSS? Thats what I'm talking about. I'll put up a small demo of this system once I hammer out the quirks -Rob http://www.abstractia.com |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|