Home arrow PHP arrow Setting up the Foundation for an Extensible Website Engine with PHP 5

Setting up the Foundation for an Extensible Website Engine with PHP 5

Building a dynamic website with a database backend is something that nearly every PHP programmer will need to do, usually sooner rather than later. If you haven't done it yet (or even if you have), this two-part article series will show you how to develop a website engine that can generate pages on the fly from a simple database structure.

TABLE OF CONTENTS:
  1. Setting up the Foundation for an Extensible Website Engine with PHP 5
  2. Defining the core structure of a simple yet dynamic website
  3. Creating a simple template file
  4. Defining the database schema with MySQL
By: Alejandro Gervasio
Rating: starstarstarstarstar / 14
October 24, 2006

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

I'm sure that you still remember those old, sweet days, when building websites was a matter of coding a bunch of all-static HTML pages, including a few images on them, and creating the corresponding hyperlinks to use the goodies of the HTTP protocol. Yeah, those times were great, weren't they?

However, not all things must have that nostalgic feeling. This is particularly true when it comes to stressing the advantages of developing modern dynamic websites, which are mostly driven by a database backend. Definitely, creating websites that use different layers for storing content, handling visual presentation and structure, and performing all sorts of clever tasks via a server-side programming language (like PHP, among others), has become the usual scenario for many web developers.

Of course, since the subject is rather huge, there are many ways to build dynamic websites, aside from using a group of database tables for storing distilled content. You can use flat files for saving data, or in the best case, if your storage requirements aren't particularly demanding, server memory can be also a fairly good option. Nevertheless, as the web grows to unimaginable dimensions, databases are by far the most used mechanism for saving the contents of a website, and certainly that tendency has been continuing steadily for a considerable amount of time.

So, what's the point of this introduction, after all? Well, for experienced PHP developers, building database-driven websites can be considered a straightforward process, which probably will be performed with minor hassles, but for beginners or intermediate programmers, this experience surely may be quite troubling.

Therefore, in response to all the reasons that I mentioned above, over the course of this two-part series, I'll walk you through the development of a highly extensible and "pluggable" website engine with PHP 5, which will allow you generate web pages on the fly based on a predefined (but simple) database structure. By using a few comprehensive PHP classes, along with a single template file, you'll be able to create truly dynamic websites that maintain a consistent look across their pages.

Have you been missing the "dynamic" feature of your websites lately? Let's fix that up quickly with this expandable, PHP 5-based website engine!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap

Dev Shed Tutorial Topics: