Active server pages are web pages that your web server creates on the fly. This site, the Web Builders' Toolkit, uses active server pages. If we'd wanted the Toolkit to be a regular site, we'd need a page for fonts, a page for color, and so on, all down the list. When you click on a link, you'd tell the web server, in effect, "give me this page about fonts," and the web server would send you the page you identified. The page itself never changes (until you edit it, which most of us do all too seldom).
With active server pages, you tell the web server, in effect, "give me this page, and I want the page to be about fonts, so give me the introduction to fonts you have in your database and all the font links you have in your database."
Since we're extremely lazy, that's the way we did it. In fact, we're so lazy we made one web page do the work for this whole web site. Depending on which link you click (which determines what you tell the web server), the page you're looking at will be filled with information about fonts, colors, or (in this case) active server pages.
Let's get down to the nitty gritty just a little bit. Look at the URL of this page in your web browser. First, you'll notice that the name of the page is
index.php instead of
index.html. That means we're using the PHP active server page scripting language. As you've wandered around the web you've probably noticed some pages called
whatever.cfm. Instead of PHP, those pages use Microsoft Active Server Page and Cold Fusion, respectively.
Tacked onto the very end of the URL for this page is a question mark and the characters "
cat=active_page". Go up to the line where your web browser displays the URL and change "
active_page" to "
fonts" and press Enter. If you aren't reading this sentence, it's because we forgot to ask you to come back once you'd seen what changing the URL did. Oh well.
You need basically three things to make active server pages work: a web server, a database, and a scripting language. It used to be that databases were expensive, well beyond the reach of normal human beings. Some still are. But open source databases like MySQL, web servers like Apache, and scripting languages like PHP make it possible for cheapskates like us to have active server pages. Now all you need to invest is the time to learn how your active server scripting language and database work and maybe a couple of extra bucks for a web host that supports databases and active server pages.
Now imagine you had to write the PHP code to make this website work. Your code would grab the characters after the "
fonts" or "
active_page" or whatever) out of the URL, and then it would look through your database for all the links that matched that code and print them neatly on the web page. That's pretty much it.
Now we won't try to kid you. This is like programming, and if you know programming isn't for you, you can just admire what we're doing. But if you don't mind a little programming, you'll find PHP is a lot of fun to play with. If you're interested, here's the code that makes this page work.
Once again in our links we're going to talk about things we know: Apache (the web server), PHP (the scripting language and active server glue) and MySQL (the database). That doesn't mean we think they're better than the alternatives. They're just what we know. You can find out about other technologies in your favorite search engine.