page 1 of 2
Comments: 33 | Views: 8548 | Downloads: 138
kenfine
kenfine
heaven and earth

I'll share my current work in progress, which may represent an impressive re-invention of the wheel.

I've been thinking really, really hard about content management issues, and the best ways to allow web pages to be programmically rendered while still allowing for flexible layouts.

My solution involves programmatic expansion of custom tags in several stages...tags describe high-level  page structure, and they also can be embedded by non-technical staff using a web-based inline text editor.
I'm coding this in ASP/VBScript even though I understand that ASP.NET richly supports the development of user tags.

I'm not formally trained in CS or web development -- my background is in visual art, and I'm sort of a collegue-less one-man shop in my job. One reason I'm posting this here is because I'm hoping that others with experience in advanced content management may have perspectives on how my design can be improved.

A Visio diagram that elaborates the sequence of how my pages will be built appears below.

I'll follow up this message with a message I wrote earlier that describes some of the rationales for how this thing will work, as well as a challenge for how to make my seperation of content and design more "pure".

mVPstar
mVPstar
I'm white because I smelt an onion.
Interesting. Can you provide examples of what each file would look like..xml...TempXML, etc..? I'm curious to see this.


I'm in the process of building a content management system as well.  Unfortunately, I'm very much limited (classic ASP Sad). If you are interested, I can post up my diagram (Keep in mind, I'm only 15 so my diagraming skills are a bit awkward Big Smile)
mVPstar
mVPstar
I'm white because I smelt an onion.
Well, for my system, I was trying to imitate the MS cms (I have absoluely no clue on how they made their CMS and no one else seems to know either).

Here's my diagram.  The CMS basically uses templating and I have to actually go out and make the templates on my own. It's not very useful right now since I haven't implemented an editing system (I can't actually have my users learn xml coding..need something more graphical). Your idea looks far more sophisticated than mine as you probably already notice. Wink

 

Oh btw...ignore the little wigglies. Smiley They are indeed hilarious...but should not take away from the seriousness of the project. Wink
mVPstar
mVPstar
I'm white because I smelt an onion.
kenfine wrote:
Enough soliloquy. Let me ask you a question: why are you inclined toward keeping your data store in XML versus in a database? Databases solve many problems. SQL Server is good.  


Well basically, the xml content is in a database. A cached version of the content is the xml file. Basically when a user requests the page, he requests the cached version or the newly generated cached version.

I could have it come straight from the database but I also want to expose the actual raw xml.  It seems a bit hard to grab that xml from a database than a raw file, although I could be completely mistaken.

Basically exposing the xml exposes that other alternative to grabbing data which I think is the big plus for xml. So in essence, I now have two methods of grabbing the data: going directly to the .asp page and viewing the html content or grabbing the data directly from the xml.

When I was talking alot about this system to friends who work in this kind of business, they also questioned me about having data "stored" in an xml file.  They reasoned: "XML is used to describe data, not to store it. That's what a database is for".  I understand this completely, however, a question that's always been lurking in my mind is..what exactly do you put in the database if it's supposed to be used for storing data?

Do you keep the html form of the data in the database and convert it to xml format which then converts to html again usin xslt?  Seems rather pointless.

A friend who works at a company called TorchBox told me of their CMS.  Basically in the databases, the raw xml is stored. Then they use abstraction to take the xml bits and plug them into templates. Lastly the final page is cached.

So, I decided to adopt their method of placing the raw xml in the database.

Regarding SQL Server, I don't actually have access to anything like SQL Server.  I end up using MS Access.  This CMS I'm building is basically for my school's library. 

Now when I think about it, what I was trying to accomplish, to make it easier for the librarians to manage the site, perhaps leaving everything in html and plugging in an editor and an administrative area would have probably been much easier than the horror I've created. Wink

Then again, I lose the benefits of xml, making content universal.

All that I really need to do now is make an editor that will take user input and describe it.

My xml content is basically something like:

<BR>   <body><BR>      <standardModule><BR>         <section><BR>            <title>Highlights</title><BR>             <separator /><BR>             <reference xlinkHref="reviewssubmissions"><BR>              <label>Submit a Book Review!</label><BR>          </reference><BR>          <para>Find out more about how you can get your voice heard...</para><BR>         </section><BR>      </standardModule><BR>   </body><BR>


Which then becomes:

<BR><div id="standardM"><BR>   <br/>  <BR>   <h4>Highlights</h4><BR>   <hr/><BR>   <a href="reviewssubmissions">Submit a Book Review!</a><BR>   <p><BR>      Find out more about how you can get your voice heard...<BR>   </p><BR></div><BR>



My concept uses xslt transformations which occur at the server.


Bah, I was gonna write some more but I gotta go to lunch. Tongue Out I'm starved.

Catch ya later!

mVPstar
mVPstar
mVPstar
I'm white because I smelt an onion.
kenfine wrote:
Write Microsoft, tell them you're a 15 year old genius, and to comp you a copy of SQL Server. Barring that, you can probably get an academic discounted version of the standard edition of SQL Server for ~300. Make some noise and someone may/should help you out.


*Ahem* Any one of you MS guys out there reading this...Charles... Wink



I think I got what you are doing. Very cool. Tongue Out Just curious, one of my problems is mixing server side coding (like page specific scripts, etc..) with the final rendered page, how did you work around this?  Like, sometimes it would be nice to pull stuff from a db here and there, yet rendering from an xml file makes only static information (unless you call an update everytime) possible.

Is it perhaps one of the custom tags or something?


Now as I write this, I think I figured out how to better use the DB to do what I wanted to do.

Thanks so much! As I talk to you, I'm learning so much more about CMS than I could dream of!

Thanks again!

mVPstar
mVPstar
mVPstar
I'm white because I smelt an onion.
Don't get me wrong, I use databases all the time.  Well, MS Access at least, but I use them for simple stuff like storing items in a shopping list (well not really storing items in a shopping list but you get the idea). It's a little hard for me to visualize in this project.

The thing is deciding what part of the content goes where in the database.

Right now I have a DB that has one table that sort of acts like a TOC of the website and tells where the cached xml is located, when were the files published, etc.  The other table contains all the header/content info for each page, the content which is in the same xml form as the cached xml file. The header isn't in xml form and is in fields (which is then assembled with the content into the cached xml file)


Switching over to classes and OOP actually helped me alot in making the viewing part of the system. I could simply do like:

If objXMLcached.Cached = true Then
xmlCached = objXMLcached.CachedPage
End If

mVPstar
mVPstar
mVPstar
I'm white because I smelt an onion.

Yeah that's pretty much how I have it right now (except the image):

cID
cTitle
cPageTitle
cAuthor
cPageHref
cDatePublished
cDateUpdated
cDescription
cContent
cCachedPage
cPageTemplate

I've never implemented a Join table so I'm not sure what that is exactly.

mVPstar
mVPstar
I'm white because I smelt an onion.

Thanks for the link! I'll check it out when I find some time.

I think I might go for a good revision of my system. 

Just one more question, at what level does your client editor edit btw? Does it edit at the custom tag level? 

mVPstar

mVPstar
mVPstar
I'm white because I smelt an onion.

EDIT: nvm..what I was going to ask was redundant. 

Still waiting for that SQL Server. Smiley

stephbu
stephbu
Error and Omissions Excluded

If you feel like a little dogfood - pickup SQL Express.

http://lab.msdn.microsoft.com/express/

erik_
erik_
Tablet Power
Just been reading quickly over the topic, maby this book is handly to read. I must amit I still need to start reading it, but I hope I got some time this summer.

Content Management Bible 2nd Edition by Bob Boiko
This approach sounds a lot like the open source cocoon for java. You might want to check that out.
mVPstar
mVPstar
I'm white because I smelt an onion.
hey kenfine, how do you implement the "join" stuff?

I'm totally revamping my DB design and actually making it relational for once Wink

I'm having problem establishing relationships.  Say if I wanted to allow for more authors, what should my tables look like? What would be the primary keys/foreign keys, etc?

Yeah, I'm not very good when it comes to databases. Tongue Out

mVPstar
Maurits
Maurits
AKA Matthew van Eerde
There are three canonical joins to remember:

one-to-one
Extend the table by adding fields, no need for a join

many-to-one
Create a foreign key from the joining field on the "many" side to the primary key on the "one" side.

many-to-many
Create an interstitial table with a composite key.  Create two foreign keys from this interstitial table to each of the tables you're joining.

For example:

Book to Title is a one-to-one join.  Create a Title field in the Books table.

Author to Quote is a one-to-many join.  One author, many quotes.  Create an AuthorID field in the Quotes table and a foreign key from Quotes.AuthorID to Authors.AuthorID.

Book to Author is a many-to-many join, as you wish to implement it.  Create an interstitial BookAuthors table, with at least the two fields BookID and AuthorID.  Create a composite primary key on BookAuthors of (BookID, AuthorID).  Create foreign keys:
BookAuthors.BookID to Books.BookID
BookAuthors.AuthorID to Authors.AuthorID

Then add rows to the BookAuthors table to note which books where written by which authors.  If a book has multiple authors, you can add multiple rows to that table for that book.

There are other methods - you might have fields like Books.PrimaryAuthorID and then have a BookSecondaryAuthors table.  Or you might try to squeeze all the AuthorID's into a comma-delimited field of the Books table.  But I like the first solution as it's a bit more key-friendly.
mVPstar
mVPstar
I'm white because I smelt an onion.
Does this work:
Image Hosted by ImageShack.us

mVPstar
Maurits
Maurits
AKA Matthew van Eerde
I don't see how that could work...

t_categories shouldn't have a cPageID column, should it?

I would do t_webpage_authors as:

PK, FK cPageID
PK, FK cAuthorID

note the composite PK
cPageID FK is to t_webpages.cPageID
cAuthorID FK is to t_authors.cAuthorID

similarly for t_webpage_categories

Not sure what t_webpages.cAuthors would hold?

Perhaps instead of t_webpage_authors you might make cAuthorID a field of t_updateDates?
page 1 of 2
Comments: 33 | Views: 8548 | Downloads: 138
Microsoft Communities