SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 94 | Next

Hasin Hayder

"Object-Oriented Programming with PHP5"

The main idea is to decrease the concrete dependency among objects while
coding. What is the benefit of such programming? One simple answer??”it always
increases the portability of your code.
Using the Proxy pattern you can create a local version of a remote object. It provides
a common API for accessing methods of a remote object without knowing the things
behind the scene. The best example of a Proxy pattern could be the XML RPC and
SOAP client and server for PHP.
Let's take a look at the following code. Here we are creating a class, which can access
any method of a remotely created object. The methods of a remote object are exposed
via the XML RPC server and then they are accessed via XML RPC clients.
Chapter 4
[ 87 ]
Context
Remote Object
Local Object
Proxy
If you are wondering how it works, you will find that almost every blog engine
supports three popular blogging API: i.e. Blogger, MetaWebLog, and MovableType.
Using these methods you can remotely manage your blog. Which methods are
supported, will depend on the blog engine.
We will use Incutio PHP XML-RPC library to create a sample server and client object.
Let us create a server first. You can download the XML-RPC Library from here:
http://scripts.


Pages:
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6