PHP
  Home arrow PHP arrow The Modular Web Page
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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

The Modular Web Page
By: Peter Lavin
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 88
    2003-09-30

    Table of Contents:
  • The Modular Web Page
  • Designing Your Page Layout
  • The Code
  • The Code, Cont'd
  • Conclusion

  • 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


    The Modular Web Page


    (Page 1 of 5 )

    Peter's latest article shows us how taking a modular approach to design websites can save us time, maintenance, and insanity.

    A modular approach to page design can save time in developing and maintaining a web site. A page template may be created and the different components of the page plugged in where appropriate. No tools other than a text editor are required. This will involve “including” files within one another. Since this necessitates server-side processing some kind of server will be required. To test the code presented here we will be using a PHP enabled server. This can be done quite readily if you are using Apache web server with a Linux distribution. If you are running Windows and Personal Web Server or Internet Information Server you will need to ensure that they are PHP enabled.

    This article will take a modular approach to creating web pages. It is often the case that all pages on a web site incorporate some identical features. The top, the sidebar and the bottom of a page might be identical throughout a site. Only the content in the centre of the page changes. If a site has multiple pages and each one of them has the same graphic at the top, the same links in a sidebar and likewise with copyright and site information at the bottom it makes sense to create a template that can be repeated. Why cut and paste many times when you don’t need to? Even more importantly, you greatly simplify the maintenance of your web pages. If one of your links changes you only need to update it in one place. As noted above the ability to include files will require some kind of server-side technology. We will be using PHP but you could as easily use ASP or Server Side Includes. However, you will have to change the syntax and file names accordingly.

    More PHP Articles
    More By Peter Lavin


       · This is a terrific article. It has been my experience that modular programming has...
       · I just wanted to point out that it has been suggested that in php using a include...
       · I just wonder if possible to call template.php and pass to it page with center...
       · The article is allright. For one, it encourages the user to use unsecure practices,...
     

    PHP ARTICLES

    - Making Usage Statistics in PHP
    - Installing PHP under Windows: Further Config...
    - File Version Management in PHP
    - Statistical View of Data in a Clustered Bar ...
    - Creating a Multi-File Upload Script in PHP
    - Executing Microsoft SQL Server Stored Proced...
    - Code 10x More Efficiently Using Data Access ...
    - A Few Tips for Speeding Up PHP Code
    - The Modular Web Page
    - Quick E-Commerce with PHP and PayPal
    - Regression Testing With JMeter
    - Building an Iterator with PHP
    - PHP Frontend to ImageMagick
    - Using PEAR's mimeDecode Module
    - Incoming Mail and PHP







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