Home arrow PHP arrow Creating AJAX Requester Objects with Abstract Factory Classes in PHP 5

Creating AJAX Requester Objects with Abstract Factory Classes in PHP 5

The abstract factory pattern can be useful if you’re developing a PHP application that needs to create diverse objects in multiple contexts. If you’re interested in learning the basics of this design pattern, this set of articles might be what you’re looking for. Welcome to the second installment of the series “Using abstract factory classes in PHP 5.” In a step-by-step guide, this series teaches you how to create abstract factory classes in PHP 5 by providing you with a wealth of educational examples on the topic.

  1. Creating AJAX Requester Objects with Abstract Factory Classes in PHP 5
  2. Working with AJAX HTTP requester objects
  3. Completing the schema imposed by the abstract factory pattern
  4. Demonstrating the functionality of the abstract factory pattern
By: Alejandro Gervasio
Rating: starstarstarstarstar / 5
January 31, 2007

print this article



Just in case the abstract factory pattern doesn't ring any bells for you, let me quickly explain how it works. Basically, when this pattern is applied, there's an abstract factory class which defines what type of objects should be created by the corresponding concrete factories. On the other hand, these factories implement the required logic to make sure that the correct objects are returned to client code, according to the context where they're used.

Logically, if you're anything like me, the above definition may sound rather complex. Taking this into account, in the first article of the series I explained how to use the abstract factory pattern to create different types of DIV elements, in this way showing a concrete case where this pattern can be examined in detail.

Now that you hopefully have a stronger background in how this useful pattern works in PHP 5, I'm going to continue showing you more situations where abstract factory classes can be used properly. More specifically, in this second article of the series, I'm going to demonstrate how to apply the abstract factory pattern to create diverse AJAX HTTP requester objects, which can be used in distinct contexts.

I'm pretty certain that once you read this tutorial, you'll have a more accurate idea of how to apply this handy pattern in your own PHP applications.

Having already defined the subject of this article, let's find out together how to use an abstract factory class to create AJAX HTTP requester objects. Let's begin now!

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