PHP
  Home arrow PHP arrow Page 2 - Building a Site Engine with PHP, Part 1
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
PHP

Building a Site Engine with PHP, Part 1
By: James Murray
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 135
    2004-06-07


    Table of Contents:
  • Building a Site Engine with PHP, Part 1
  • First Things First
  • Better Than your Local Rental Security Officer
  • The Template Got All GUI
  • Build It and They Will Come

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Building a Site Engine with PHP, Part 1 - First Things First
    ( Page 2 of 5 )

    The best thing to do first, I say, is to get out some paper and one of those sticks that write stuff.... Oh, yeah, a pencil! Then literally draw out a diagram of your plan on coding. No need for a bunch of words, just horribly sketched boxes and lines, labeled with each elements name. I decided that I would need to first create, in order, the following things for my site engine:

    • Database
    • Main index page
    • Plug-in system
    • Module system (plug-ins for the plug-ins)
    • Content blocks

    So, trying to stay advanced, I grabbed my $5 mechanical pencil, and I sketched it out like this:

    Pretty isn't it? Basically, what I have here is my index page calls the database, selects all the plug-ins that are initialized for the specific site, then the plug-ins select all the modules that at initialized for the selected plug-ins. Then the modules select all the content blocks that are initialized for the selected modules with a few more parameters checked, such as authentication level and specific page. Then it's all returned to the index page to form the website. This diagram is an easier read.

    Index >--call plug-ins--> Loaded Plug-ins >--call modules--> Loaded modules >--call block--> Loaded blocks >--return data--> Index displays data

    This has shown to be a very solid method of doing a plug-in system, due to the fact that if a plug-in isn't loaded the content block that depends on that certain plug-in won't load and cause nasty errors. Now that the plug-ins have been briefly described, I'll talk about the authentication and block systems.



     
     
    >>> More PHP Articles          >>> More By James Murray
     

       

    PHP ARTICLES

    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek