PHP
  Home arrow PHP arrow Setting up the Foundation for an Exten...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Setting up the Foundation for an Extensible Website Engine with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2006-10-24

    Table of Contents:
  • Setting up the Foundation for an Extensible Website Engine with PHP 5
  • Defining the core structure of a simple yet dynamic website
  • Creating a simple template file
  • Defining the database schema with MySQL

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

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


    (Page 1 of 4 )

    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.

    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


       · If you're taking your first steps on building dynamic websites with PHP, hopefully...
       · Though I understand the goals of this tutorial, and that it is more of a beginner...
       · Thank you for your extensive comments on my PHP article. As I said in the...
       · Hi, Nice article.Shouldn't there be a part where you pull data from the mysql...
       · Hello Robert,Thank you for the kind comment on my PHP article. You're correct...
       · Here is a more advanced version of a site...
       · Thank you for the contribution. Yes, I've read that series of articles too and...
     

       

    PHP ARTICLES

    - Viewing and Editing Tasks for a Project Mana...
    - More on Private Methods with PHP 5 Member Vi...
    - Adding Tasks to a Project Management Applica...
    - Utilizing Private Methods with PHP 5 and Mem...
    - Making Changes in a Project Management Appli...
    - Defining Public and Protected Methods with M...
    - HTML for a Project Management Application
    - Using Subclasses and Accessors with Member V...
    - Implementing Internet Protocols with PHP
    - Project Management: The Application
    - Working with Private Properties to Protect P...
    - Protecting PHP 5 Class Data with Member Visi...
    - Setting Up a Web-based Image Hosting Service
    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway