Home arrow PHP arrow The Modular Web Page

The Modular Web Page

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

Author Info:
By: Peter Lavin
Rating: 3 stars3 stars3 stars3 stars3 stars / 99
September 30, 2003
  1. · The Modular Web Page
  2. · Designing Your Page Layout
  3. · The Code
  4. · The Code, Cont'd
  5. · Conclusion

print this article

The Modular Web Page
(Page 1 of 5 )

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.

blog comments powered by Disqus

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- 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

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials