473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

The Proxy Pattern in PHP 5

This week I've I continued my series of design patterns examples using
PHP 5 with the Bridge Pattern and the Flyweight Pattern.

Here now is my 19th design pattern example using PHP 5, the Proxy
Pattern.

http://www.fluffycat.com/PHP-Design-Patterns/Proxy/

In the proxy pattern one class stands in for and controll all calls to
another class.

This could be because the real subject class is on another platform,
the real subject is "expensive" to create so we only create it if
necessary, or to controll access to the real subject class.

A proxy can also add access functionality, such as keeping track of
how many times a real subject is called.

Proxy is a nice little pattern, being both fairly simple and widely
used.
Aug 25 '06 #1
1 3116
FluffyCat wrote:
This week I've I continued my series of design patterns examples using
PHP 5 with the Bridge Pattern and the Flyweight Pattern.

Here now is my 19th design pattern example using PHP 5, the Proxy
Pattern.

http://www.fluffycat.com/PHP-Design-Patterns/Proxy/

In the proxy pattern one class stands in for and controll all calls to
another class.

This could be because the real subject class is on another platform,
the real subject is "expensive" to create so we only create it if
necessary, or to controll access to the real subject class.

A proxy can also add access functionality, such as keeping track of
how many times a real subject is called.

Proxy is a nice little pattern, being both fairly simple and widely
used.
Just want to thank you for you lessons on Design Patterns in PHP 5.

--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Aug 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: harry | last post by:
Hi, I have a program that runs on multiple client pc's. Occasionally one or more of those pc's use VPN to connect to another corporate network. When using VPN they need to set proxy server in...
3
by: Ohad Young | last post by:
Hi, I have a webservice method that returns an instance of a custom class I created (e.g., bank account). The class definition in the webservice contains properties, overrides Object.ToString...
1
by: Marcel Hug | last post by:
Hi NG ! I have the following situation: I have a database on a server in my network and few client-computers on which my software runs. My software must connect the database on the network and...
4
by: JuHui | last post by:
If a proxy is alive then return true, else return fals after 1 second. thanks
4
by: Sharon | last post by:
Hi all, Can any one explain the relationship between real & transparent proxy? I couldn't fully understand it from the explanation at MSDN. Thanks, Sharon.
2
by: D.J. Heap | last post by:
Is there a way to get VS2005 to generate the Begin/End pattern (as VS2003 always did) for async web service calls rather than the MethodAsync/MethodCompleted pattern when adding web references? ...
9
by: Christian Hackl | last post by:
Hi! I've got a design question related to the combination of the NVI idiom (non-virtual interfaces, ) and popular object-oriented patterns such as Proxy or Decorator, i.e. those which have the...
7
by: chandru1782 | last post by:
Dear friends, I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy. when trying to install...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
I'm researching what is the best way to create a generic WCF proxy wrapper that has the following requirements: 1. Remove the System.ServiceModel config section requirement for clients. We have...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.