How to Start a Web Site, Part 2
March 7th, 2007
In How to Start a Web Site, Part 1, I lightly outlined the process for obtaining a domain name, starting a shared hosting account, and setting DNS servers.
In this installment, I’ll give a bit of insight into some of the publishing/blog software out there. I’ll focus only on the ones I’ve used, of course.
Before discussing specific packages, though, I guess I should touch on what software is, how it relates to resources (like pages), and where a database fits into everything.
I’ll also tell you how to set up the very cool Mint stats package on a host running PHP and MySQL.
The Server
Remember in Part 1 when I described a server as a computer that sends information out in response to requests from a Web browser? I was totally telling the truth. I was also totally skipping an important, yet confusing distinction.
The actual hardware is called a “server” but so is a piece of software running on that computer. Maybe it’s best to say that the combination of the two is really what constitutes a server versus a normal computer. A server is a computer running server software, in other words.
Most Web servers are running the Apache HTTP server. Apache is great. It’s a classic. It’s a workhorse. There are alternatives, of course, but Apache is sort of king.
Static vs. Dynamic
Generally, there are two ways in which a given resource (like a blog entry) can be served: statically and dynamically.
A static resource is a file living inside a folder. When the Web server software receives a request for a file (represented by a URI, like “tobyjoe.com/about/index.html”) it looks inside of a given folder, finds the file, and sends it to the browser that requested it.
Dynamic resources are the results of programs and are often recreated every time a user sends a request. Leaving a comment on a blog or performing other operations that add information to a page is a good example of a dynamic request.
Databases
You may wonder what happens when you add a comment to a blog and where the comment is stored so that other folks can see it. The answer is that most dynamic content is stored in a database.
A database is any collection of persisted, or stored, data. A text file can be considered a database, though most folks prefer to use a more complex system for storing their data.
On most Web servers, the database of choice is a special software package called MySQL. There are lots of different database types and systems out there, though. Another excellent database system is called PostgreSQL. It’s not quite as popular as MySQL, but it’s catching up. A few others you may have heard of are Oracle, MSSQL, Sybase, SQLite, and Access (yuck!)
In all likelihood, your shared hosting account will use Apache, MySQL, and a scripting language.
Scripting
When a dynamic request hits a server, the server software needs to know how to respond. The most common and essential functionality, like sending an image file, is usually handled by Apache. It’s excellent at doing the cookie-cutter stuff that all sites need to do: sending files, recording a log message for every hit to your site, and deciding what type of resource is needed by a given request.
Because Apache is so solid, we developers don’t like to go fiddling with its insides. It’s just not that fun. Or safe.
So how do we write programs that can do whatever we want if we aren’t modifying Apache? As you may have deduced from the title of this section (you’re so clever!), the answer is to use server scripting.
The most popular scripting language for the Web is PHP. It’s so popular, in fact, I decided to write a book about it.
You can think of PHP (or server scripting in general) as a simple way to write a custom application for processing Web requests. When Apache sees a request for a PHP script (usually ending in ”.php”) it will use its PHP interpreter to read the script and perform whatever actions are inside before sending the result back to the browser.
Common tasks of PHP are to do things like connect to a database system, retrieve all the blog posts that mention pizza, create a page that shows a list of links to those posts, and send the resulting dynamically-generated page back to the browser.
I know, it’s daunting.
Some of the common languages used to write Web applications are: PHP, Ruby, Python, Java, C#, and perl. There are, of course, more – but who cares?
Publishing and/or Blog Software
Now that I’ve described all that semi-technical crap, we can get to the point: Unless you’re a developer with an itch to scratch, you should consider using established and respected software written by other folks and reviewed by endless smarties before writing your own. That isn’t true for everything, but this also isn’t an article for developers, so I’ll digress.
I’ve installed and used a few of the popular self-publishing packages and can speak fondly of a couple of them.
Most of them are fairly similar to a newbie, and you will probably be fine with whichever you choose.
The big players are:
I’ve had experience with each of these. Honestly, they’re all just fine and have active development communities adding plug-ins and enhancements. I used TextPattern back when Ian Kennedy and I were running FiftyMillimeter. It worked fine, but the UI wasn’t great.
I personally use Mephisto, but that’s in large part because it’s written in Rails and I’m a pretty active Rails developer.
Check out the sites for each, peep the screenshots, and check around on sites that you enjoy to see what tools they use. It’s often mentioned somewhere in a footer or sidebar.
Stats
I work in advertising, and build sites for giant brands, small hip brands, and have done just about every-damn-type of project on the Web. One consistent desire, naturally, is to monitor stats: how many people visit, how many come back, where they’re from, how they found you, etc.
There are too many reporting packages out there. Most of them were ‘designed’ by developers and are clunky and geared towards information you probably won’t care about.
Enter Mint.
Mint was developed and designed by Shaun Inman and reflects his interests (and yours, I bet): good UI, good usability and good info design. The code is pretty solid and the plugin architecture is nice. I have a few nitpicks, but what geek doesn’t nitpick EVERYTHING under the sun?
I wholeheartedly endorse the use of Mint if you have access to a server that runs PHP and MySQL. It’s $30 for a license, but worth it.
Next
As you can see, there are so many options at every turn that writing a general tutorial is daunting if not impossible. I think the next steps are to cover Google Adsense. What else?
Holler.
Comments for “How to Start a Web Site, Part 2”
TobyJoe, this is great. it fills in a number of blanks in my self-taught experiment leading to a semi-complete website… one day. and so, as promised, i will send cookies for mihow (seeing as you’ve already chosen the name Vector for baby-to-be).
Oh dear. I do hope folks realize that we’re not naming Ndugu Vector. I was kidding. Right? You know that, right? Penis, maybe. But not Vector.
We’ve just installed Mint and I must say it really is worth more than $30.
Thanks for that.
(p.s. Don’t tell Shaun, but i would have paid $15/year!!!)
Add Your Comment