Home arrow PHP arrow Building Object-oriented Web Pages with HTTP Compression in PHP

Building Object-oriented Web Pages with HTTP Compression in PHP

Here we go! Welcome to the third -– and last -- part of the series “Using HTTP compression in PHP.” Just in case you didn’t know, this set of tutorials explores the advantages of using HTTP compression on dynamic PHP pages, reducing their download times and increasing the overall performance of PHP applications.

TABLE OF CONTENTS:
  1. Building Object-oriented Web Pages with HTTP Compression in PHP
  2. Object-based web pages in a nutshell: defining (X)HTML widget classes
  3. More web page objects ahead: defining the remaining (X)HTML widget classes
  4. Putting the pieces together: compressing the output of a web page generator class
By: Alejandro Gervasio
Rating: starstarstarstarstar / 5
April 24, 2006

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Stepping back for a moment to the second part of the series, I’m sure you’ll recall that I explained how to introduce “Gzip” encoding as part of a generic data compressing PHP class. I coded this by using the PHP built-in “gzencode()” function, in order to compress dynamic output generated by parsed PHP files.

As you saw, this simple (and powerful) approach allowed me to use HTTP compression, only spawning a single “DataCompressor” object and eventually using its corresponding methods. Although this object-based approach is pretty basic in its conception, it’s actually very useful for demonstrating how HTTP compression can be used when writing either procedural or object-oriented PHP code.

Now, bringing our attention to the subject of this last tutorial, I’ll extend the application of “Gzip” encoding on dynamic PHP pages by implementing the data compression method that I explained before, within a PHP application that uses objects as the driving force for creating dynamic web pages. In short, what you’ll learn is how to compress parsed PHP pages, which, as I said before, are generated on the fly by a bunch of web page objects.

Having drawn the guidelines for this article, it’s a good time to start learning how to use HTTP compression on object-oriented web documents. Let’s go!



 
 
>>> 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: