/[cvs]/nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/DesignPattern/RemoteProxy.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Wed Mar 5 16:10:17 2003 UTC revision 1.8 by joko, Mon Mar 10 22:31:56 2003 UTC
# Line 6  Line 6 
6   * @package org.netfrag.glib   * @package org.netfrag.glib
7   * @name DesignPattern::RemoteProxy   * @name DesignPattern::RemoteProxy
8   *   *
9   */   *
10     * <b>Cvs-Log:</b>
11  /**   *
12     * <pre>
13   * -------------------------------------------------------------------------   * -------------------------------------------------------------------------
14   *    $Id$   *    $Id$
15   * -------------------------------------------------------------------------   * -------------------------------------------------------------------------
16   *    $Log$   *    $Log$
17     *    Revision 1.8  2003/03/10 22:31:56  joko
18     *    + fixed metadata for phpDocumentor
19     *
20     *    Revision 1.7  2003/03/09 15:51:44  joko
21     *    + additional metadata for Autodia
22     *
23     *    Revision 1.6  2003/03/05 17:28:43  joko
24     *    updated docu (phpDocumentor testing....)
25     *
26     *    Revision 1.5  2003/03/05 17:02:22  joko
27     *    updated docu (phpDocumentor testing....)
28     *
29     *    Revision 1.4  2003/03/05 16:32:19  joko
30     *    updated docu (phpDocumentor testing....)
31     *
32   *    Revision 1.3  2003/03/05 16:10:17  joko   *    Revision 1.3  2003/03/05 16:10:17  joko
33   *    updated docu (phpDocumentor testing....)   *    updated docu (phpDocumentor testing....)
34   *   *
# Line 107  Line 123 
123   *    Revision 1.1  2002/10/09 00:51:39  cvsjoko   *    Revision 1.1  2002/10/09 00:51:39  cvsjoko
124   *    + new   *    + new
125   * -------------------------------------------------------------------------   * -------------------------------------------------------------------------
126     * </pre>
127     *
128     */
129    
130    
131    
132    
133    /**
134     * Load required modules:
135     *
136   */   */
137    loadModule('DesignPattern::Proxy');
138    
139    
140  /**  /**
141   * Data::Driver::Proxy  --  Multiple stage data fetching and caching   * DesignPattern::RemoteProxy  --  Multiple stage data fetching and caching
142   *   *
143   *   *
144   * This class (Data::Driver::Proxy) provides an abstract framework   * This class (DesignPattern::RemoteProxy) provides an abstract framework
145   * for loading/saving arbitrary data from/to data storages interfaced   * for loading/saving arbitrary data from/to data storages interfaced
146   * by storage *proxy*-drivers.   * by storage *proxy*-drivers.
147   * Don't mix these up with the concrete storage *handle*-drivers   * Don't mix these up with the concrete storage *handle*-drivers
# Line 122  Line 150 
150   * providing a more highlevel, consistent API making   * providing a more highlevel, consistent API making
151   * it easier for Data::Driver::Proxy to do its main work:   * it easier for Data::Driver::Proxy to do its main work:
152   *   *
153     * quote from: http://home.earthlink.net/~huston2/dp/proxy.html
154     * "A remote proxy provides a local representative for an
155     * object that resides in a different address space. This is
156     * what the "stub" code in RPC and CORBA provides."
157     *
158     *
159   * Multiple stage data fetching and caching:   * Multiple stage data fetching and caching:
160   *   *
161     * <pre>
162     *
163   * DATA, ...   * DATA, ...
164   *    ... also refered to as data, should be handled as   *    ... also refered to as data, should be handled as
165   *    something called data.   *    something called data.
# Line 166  Line 202 
202   *    o Data::Driver::PEAR::DB   *    o Data::Driver::PEAR::DB
203   *    x Data::Driver::PEAR::Tree (via Data::Lift)   *    x Data::Driver::PEAR::Tree (via Data::Lift)
204   *   *
205   */   * </pre>
206     *
207  /**   *
208   * An attempt to implement some software design patterns...   * An attempt to implement some software design patterns
209   * --- RemoteProxyPattern   * --- RemoteProxyPattern
210   *   *
211     * @link http://www.agcs.com/supportv2/techpapers/patterns/papers/tutnotes/sld017.htm
212     * @link http://home.earthlink.net/~huston2/dp/proxy.html
213     * @link http://wiki.cs.uiuc.edu/PatternStories/RemoteObject
214   * @link http://c2.com/cgi-bin/wiki?ProxyPattern   * @link http://c2.com/cgi-bin/wiki?ProxyPattern
215     * @link http://c2.com/cgi-bin/wiki?LazyProxies
216   *   *
217   * @author Andreas Motl <andreas.motl@ilo.de>   * @author Andreas Motl <andreas.motl@ilo.de>
218   * @link http://www.netfrag.org/~joko/   * @link http://www.netfrag.org/~joko/
# Line 182  Line 222 
222   * @link http://www.gnu.org/licenses/lgpl.txt   * @link http://www.gnu.org/licenses/lgpl.txt
223   *   *
224   * @package org.netfrag.glib   * @package org.netfrag.glib
225     * @subpackage DesignPattern
226   * @name DesignPattern::RemoteProxy   * @name DesignPattern::RemoteProxy
227   *   *
  */  
   
 /**  
  * @todo  
  * <pre>  
  *  x extend options to en-/disable caching via a) session and/or b) database  
  *    o make feature available via runtime setter-method to these options  
  *  o use PEAR::Cache for caching purposes!!!  
  *  o refactor database access: use PEAR for this! no more 'connectdb' here!!!  
  *  o make database connection more flexible to make possible  
  *      to have different (probably named) proxy databases (besides a "main database")  
  *  o rename this to Data::Proxy? or split into Data::Query, Data::Result and Data::Wrapper?  
  * </pre>  
228   *   *
229   */   * @todo extend options to en-/disable caching via a) session and/or b) database
230     *           make feature available via runtime setter-method to these options
231  /**   * @todo PEAR::Cache for caching purposes!!!
232   * Load required modules:   * @todo refactor database access: use PEAR for this! no more 'connectdb' here!!!
233     * @todo make database connection more flexible to make possible
234     *           to have different (probably named) proxy databases (besides a "main database")
235     * @todo rename this to Data::Proxy? or split into Data::Query, Data::Result and Data::Wrapper?
236     * @todo refactor this to a "RemoteObject" class!!! (inheriting from DesignPattern::RemoteObject)
237     * @todo rename this to "DesignPattern::LazyRemoteProxy"???
238   *   *
239   */   */
 loadModule('DesignPattern::Proxy');  
   
240  class DesignPattern_RemoteProxy extends DesignPattern_Proxy {  class DesignPattern_RemoteProxy extends DesignPattern_Proxy {
241    
242    var $objectId;    var $objectId;
# Line 258  class DesignPattern_RemoteProxy extends Line 289  class DesignPattern_RemoteProxy extends
289        session_register_safe("proxy");        session_register_safe("proxy");
290      }        }  
291    
292        /**
293         * <!-- Autodia -->
294         * can do: (this is metadata supplied for Autodia, don't delete!)
295         *  $this->backend = new DataSource_Proxy_XMLRPC()
296         *
297         */
298    
299      if ($this->meta[remote]) {      if ($this->meta[remote]) {
300        //$this->backend = mkObject('Data::Driver::RPC::Remote', $this->meta[rpcinfo]);        //$this->backend = mkObject('Data::Driver::RPC::Remote', $this->meta[rpcinfo]);
301        $this->backend = php::mkComponent('DataSource::Proxy::XMLRPC', $this->meta[rpcinfo]);        $this->backend = php::mkComponent('DataSource::Proxy::XMLRPC', $this->meta[rpcinfo]);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.8

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed