The Story of CMS

Everything todo with programming goes HERE.
Post Reply
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

The Story of CMS

Post by Lucifer »

Ok, before continuing the discussion in the other thread about building a CMS system, I thought it would be helpful to Luke specifically if I told hiim a story that contained as many of the lessons I've learned as possible. :)

As some of you are aware, no doubt, for the last 4 years or so I've put food on the table by making money on the web. Right now I'm a contract programmer with one customer, and that customer builds a web-based CRM (that's Customer Relationship Management). From December to July my whole life was building a Mambo portal to their CRM package, and in doing so I became intimately familiar with Mambo (thus qualifying my rant on the subject). Right now I'm hacking on gForge, the project that was started by the same guy who wrote most of the code that drives sourceforge, which he forked right before VALinux closed up the source to sourceforge. (Having only recently learned about it, I've only recently begun to withdraw from sourceforge myself) Mambo, gForge, and the CRM package I mentioned are all responsible for taking content out of a database and generating web pages from it.

Now, then, is the story of how I came to be doing this. Part of the story which I will not tell includes my own rather emotional journey that wound up with me eradicating MS Windows from my home.

In the beginning, I was hired as a sales guy for a loser software reseller. Their website was built in html, not html 4.01 transitional, 4.01 strict, or anything like that. <html></html> And the guy that built it was bound and determined to support Nutscrape 4, which still had about a 10% share of the market when the story begins. I started my own website at this time on earthlink's 10MB webspace. It was 4 pages or so, this article, a javascript-based breakout clone that I wrote, a links page, and a contact page. It had a navigation bar at the top, which later moved to the right-hand side. I didn't update it very often because every time I added a page, I had to go to all existing pages and add a new link in the navigation bar.

The company I worked for had their site hosted on an IIS server, and it was programmed with ASP. So, to learn ASP, I found that my dad's site was on a Linux server that included Chili!ASP (which was subsequently bought by Sun). So I wrote a basic product database in Chili!ASP for my dad. I used server-side includes for the top navigation bar, the copyright notice in the footer, and the basic top-level layout of the page. The only thing I used the database for was to build the product catalog in the main content area. My dad, who is no programmer (no matter what he tells you), tried to update a page and found that while he knew html, he couldn't update his website. My dad and I had a falling out over his site soon after, and he hasn't updated it in years.

So I was in a quandary, then. How do I make a website that someone like my dad can update, add new content, and not have to update every single page for one link? And still have it reasonably navigable by any random web user?

At work, I managed to convince the guy that we needed to switch out to CSS, that Nutscrape would be supported in the change, and that we could more easily update the look of the website. We could incrementally improve the website's look and feel by using the css. I pointed out to him that his failure to use the doctype tag caused the rendering problems he had, and his insistence on a complex layout made it harder to debug. So I went through every page, simplifying the layout. We used server-side includes there just like I did on my dad's site, and it worked because the only two people who worked on the site knew how to handle it. I also started learning about search engine optimization at this time, which is a nice footnote, but the only thing that matters is that I learned how important it was to select tags for your words that represent what they say, and not select tags that represent what the words should look like. That's also the foundation of css. :)

So, css gave us control over the look of the site, but we still had templates, we were still plagued with server-side includes, and heaven forbid anyone else should ever need to add content to the site.

It came time for me to add a new page to the site, and in doing so I was going to have to update about 4 pages, and it was really getting old. I decided my time would be better spent automating that, and I knew enough ASP to do it. So I wrote my first CMS. I created another products table for each product we carried, and each product had a type associated with it. That type just linked to another record in the same table. So products and categories were represented on the same table. I then wrote a script that generated a series of links laid out vertically that showed all pages related to the product (using an already existing table to make the links), and a script that generated the main content area. I used server-side includes to tie them all together, migrated all the old product pages into the database, and then wrote my new web page.

And I was happy. For the first time, adding a new page was just a matter of going to the admin interface I wrote, clicking "Add new page", filling in a few fields, and writing the content. It was still a bit rough around the edges, but I was happy with it.

Then I got a killer deal on broadband and got off earthlink's server. As far as I know, my original site is still hosted somewhere in earthlink land. And I moved my website to a new server, in a new ISP's webspace, and was happy. After having written my first CMS I decided to see if I could add some of that cool dynamic stuff to my site, but it wasn't happening. ISP webspace is the suck. So I updated the look a bit, wrote another page, and moved on.

I left this company and went somewhere else. In the meantime, I had to move my website two more times as @Home went under, AT&T took over, and then sold to Comcast, and I was just plain sick of moving my website. I had switched over to Linux at home, but hadn't learned any Linux-based languages. I was still stuck with ASP. But I was determined to not have to move my website anymore and brought it to my home computer.

I took a close look at my website and realized I hated making web pages. I liked designing them, but when it came to building a website, after 3 or 4 pages, it got annoying. So I looked for a solution to this problem and found WikkiTikkiTavi. I installed it, fell in love with it, and moved all of my content to it. Then followed a period of serious growth in the content of my website.

During this time, my old friend from the other company and I set up shop selling web marketing services. As part of the deal, we built our own website to show how we ate our own dogfood. Since ASP was all we knew, we got the site hosted on an IIS box. We then filled it up with server-side includes and crap. Since we didn't have a CRM package, I wrote up a basic CRM package in ASP and put it on the website. I used it, he didn't, and I'm still pissed about it. It had email, and it had contacts, and a few other things. I also wrote up a fully-functional database administration program, just like phpMyAdmin, only in ASP and targetting Access and MS SQL Server. I was getting pretty hot with web-based database programming.

Well we went back and forth fighting over the company, and fighting over how the website should be built. He swore we didn't have time to build a CMS, and I swore we couldn't afford not to. We butted heads over a number of things, and I finally took off. I went home and built another CMS, I had learned why a wiki is not a general-purpose CMS, but I had also learned how beautiful wiki formatting is.

And one of the guys on the WikkiTikkiTavi developer's list happened to have a php widget for processing wiki-style formatting.

So I moved my site piecemeal into a new CMS system where I created a Categories table that linked directly to pages in 'Tavi's database. Then I tore it all down, intending to sell something from my website. I forget what it was, exactly. And when I was screwing with the new site, building yet another site that used server-side includes for content management (because I didn't think I had time to build a fancy one), I discovered that my website had already been attracting a thousand unique visitors a month. So I hurriedly put it back together, and since the linking to 'tavi's database had always been iffy at best, I created a new table, migrated the articles to it, and went with it.

Now I had a website that generated the links on the left-hand side of the page and used information from the querystring to pick out the specific articles to show. I did a lot of things similar to 'tavi, but it was my first real experience with php and I wasn't too hot on it.

Then I started Texas Brand Barbecue. But my website was still growing in traffic, and it became clear that my computer couldn't support it. So I signed up with a web hosting service and moved my site, again. It was such a pain to move, and it never really ran snappy. But I was tired of moving it, still, having moved it 4 times in the last 9 months. I was also tired of not having a good CMS, so I decided to commit to writing a really good one. So I'd write a few lines of code, then be away building the barbecue stand for a few days. The going was so slow, I finally started googling for a CMS system.

I tried 3, in the end. Mambo was the best of them all. Mambo provided a simple template system so I could design the page once and that same page would be used for all time. It claimed to manage all links, but it lied. It claimed a lot of things, but regardless it was much better than what I had. After installing Mambo, I had a website that I could write new content quickly and easily, classify it into a category and a section, and the software would handle linking.

I did not have the ability to mark content items as related. I've been fighting with Mambo ever since to straighten that out. I wanted to write a book on the site (it's partially written and there, if you want to read it, that is, if you're interested in automechanics), but Mambo didn't let me. I had the modular program I wanted, but it didn't seem to have everything I needed.

When I started my current gig, I was originally going to build the Mambo components to depend on the CRM package being on the same computer. I used the CRM's internal apis to access the database. BUt I had problems with includes and paths and stuff, one of those weird places where php sucks balls. Since the CRM package had a soap interface, I finally decided to use soap. So, what I wrote was simple. If you register on a Mambo site that has this portal installed, your information gets stored in a leads table so a salesguy can call you. (It's not as evil as it sounds) If you have an issue with the company, they create a case in their CRM software to manage all the information associated with your issue. I wrote a front-end to that system, so users of the website can update their case information through the company's website. The end result? Greater communication between sales, support, and customers.

So what is a CMS, then?

A basic CMS takes a known page layout and generates links and content. In this manner, a wiki classifies as a CMS. But what if you're a product-oriented site? What is a CMS to you? Obviously you need a product catalog stored in there somewhere, and you need a way to show an index, related products, related articles, and other things. Like Amazon. (I left out the part of the story involving osCommerce) Aha, but what if you're a journalism site? Well, then your CMS needs to show news, sorted by date, category, author, and so forth.

So your CMS then has to organize the content it stores and display in a manner which is appropriate for the audience and the writer. If you write a news story, you don't want it to appear as a product page!

When you split the team up into lots of people, your CMS has to do more. It has to allow a guy who only knows how to use Dreamweaver to build the layout of the site. It has to allow the writers to write without having to use Dreamweaver. Quite the contrary, they want to use Word or somesuch. It has to allow the programmers to work on the site without disturbing the others, and there should never be a situation where a broken template or a poorly-formatted article requires anybody else on the team to deal with it. The template designer shouldnt be making his template accomodate bad tag choices by the writer. And through it all, the website needs to provide a consistent look and feel and be easy to use by visitors to the site.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Post Reply