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.

  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




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
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- 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...

Developer Shed Affiliates


Dev Shed Tutorial Topics: