/[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.6 by joko, Wed Mar 5 17:28:43 2003 UTC revision 1.7 by joko, Sun Mar 9 15:51:44 2003 UTC
# Line 15  Line 15 
15   *    $Id$   *    $Id$
16   * -------------------------------------------------------------------------   * -------------------------------------------------------------------------
17   *    $Log$   *    $Log$
18     *    Revision 1.7  2003/03/09 15:51:44  joko
19     *    + additional metadata for Autodia
20     *
21   *    Revision 1.6  2003/03/05 17:28:43  joko   *    Revision 1.6  2003/03/05 17:28:43  joko
22   *    updated docu (phpDocumentor testing....)   *    updated docu (phpDocumentor testing....)
23   *   *
# Line 133  loadModule('DesignPattern::Proxy'); Line 136  loadModule('DesignPattern::Proxy');
136    
137    
138  /**  /**
139   * Data::Driver::Proxy  --  Multiple stage data fetching and caching   * DesignPattern::RemoteProxy  --  Multiple stage data fetching and caching
140   *   *
141   *   *
142   * This class (Data::Driver::Proxy) provides an abstract framework   * This class (DesignPattern::RemoteProxy) provides an abstract framework
143   * for loading/saving arbitrary data from/to data storages interfaced   * for loading/saving arbitrary data from/to data storages interfaced
144   * by storage *proxy*-drivers.   * by storage *proxy*-drivers.
145   * Don't mix these up with the concrete storage *handle*-drivers   * Don't mix these up with the concrete storage *handle*-drivers
# Line 145  loadModule('DesignPattern::Proxy'); Line 148  loadModule('DesignPattern::Proxy');
148   * providing a more highlevel, consistent API making   * providing a more highlevel, consistent API making
149   * it easier for Data::Driver::Proxy to do its main work:   * it easier for Data::Driver::Proxy to do its main work:
150   *   *
151     * quote from: http://home.earthlink.net/~huston2/dp/proxy.html
152     * "A remote proxy provides a local representative for an
153     * object that resides in a different address space. This is
154     * what the "stub" code in RPC and CORBA provides."
155     *
156     *
157   * Multiple stage data fetching and caching:   * Multiple stage data fetching and caching:
158   *   *
159   * <pre>   * <pre>
# Line 197  loadModule('DesignPattern::Proxy'); Line 206  loadModule('DesignPattern::Proxy');
206   * An attempt to implement some software design patterns   * An attempt to implement some software design patterns
207   * --- RemoteProxyPattern   * --- RemoteProxyPattern
208   *   *
209     * @link http://www.agcs.com/supportv2/techpapers/patterns/papers/tutnotes/sld017.htm
210     * @link http://home.earthlink.net/~huston2/dp/proxy.html
211     * @link http://wiki.cs.uiuc.edu/PatternStories/RemoteObject
212   * @link http://c2.com/cgi-bin/wiki?ProxyPattern   * @link http://c2.com/cgi-bin/wiki?ProxyPattern
213     * @link http://c2.com/cgi-bin/wiki?LazyProxies
214   *   *
215   * @author Andreas Motl <andreas.motl@ilo.de>   * @author Andreas Motl <andreas.motl@ilo.de>
216   * @link http://www.netfrag.org/~joko/   * @link http://www.netfrag.org/~joko/
# Line 211  loadModule('DesignPattern::Proxy'); Line 224  loadModule('DesignPattern::Proxy');
224   * @name DesignPattern::RemoteProxy   * @name DesignPattern::RemoteProxy
225   *   *
226   *   *
227   * @todo   * @todo extend options to en-/disable caching via a) session and/or b) database
228   * <pre>   *           make feature available via runtime setter-method to these options
229   * x extend options to en-/disable caching via a) session and/or b) database   * @todo PEAR::Cache for caching purposes!!!
230   *   o make feature available via runtime setter-method to these options   * @todo refactor database access: use PEAR for this! no more 'connectdb' here!!!
231   * o use PEAR::Cache for caching purposes!!!   * @todo make database connection more flexible to make possible
232   * o refactor database access: use PEAR for this! no more 'connectdb' here!!!   *           to have different (probably named) proxy databases (besides a "main database")
233   * o make database connection more flexible to make possible   * @todo rename this to Data::Proxy? or split into Data::Query, Data::Result and Data::Wrapper?
234   *     to have different (probably named) proxy databases (besides a "main database")   * @todo refactor this to a "RemoteObject" class!!! (inheriting from DesignPattern::RemoteObject)
235   * o rename this to Data::Proxy? or split into Data::Query, Data::Result and Data::Wrapper?   * @todo rename this to "DesignPattern::LazyRemoteProxy"???
  * </pre>  
236   *   *
237   */   */
238  class DesignPattern_RemoteProxy extends DesignPattern_Proxy {  class DesignPattern_RemoteProxy extends DesignPattern_Proxy {
# Line 275  class DesignPattern_RemoteProxy extends Line 287  class DesignPattern_RemoteProxy extends
287        session_register_safe("proxy");        session_register_safe("proxy");
288      }        }  
289    
290        /**
291         * <!-- Autodia -->
292         * can do: (this is metadata supplied for Autodia, don't delete!)
293         *  $this->backend = new DataSource_Proxy_XMLRPC()
294         *
295         */
296    
297      if ($this->meta[remote]) {      if ($this->meta[remote]) {
298        //$this->backend = mkObject('Data::Driver::RPC::Remote', $this->meta[rpcinfo]);        //$this->backend = mkObject('Data::Driver::RPC::Remote', $this->meta[rpcinfo]);
299        $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.6  
changed lines
  Added in v.1.7

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