Changes

Jump to: navigation, search

Proxy

89 bytes added, 16:48, 22 March 2007
no edit summary
The <i>Proxy</i> pattern is used in software development to create a placeholder for an object. The Proxies provide an interface to another object is not actually created until the information that the such as a network connection, a large object holds is required. This extra layer of abstraction saves time when in memory, a program must access a database file, or a disk for the information.<br /><br />If the information some other resource that is never required, the database/disk will never be queried and the system will run more efficiently with less slowdowns for unnecessary materializationsexpensive or impossible to duplicate.
<br />
<br />
==Proxy Design Pattern==
When a request is made "<i>Any operations performed on the proxies are forwarded to a Proxy, the real original object is then instantiated. From then onOnce all instances of the proxy are out of scope, any further requests are made to the real complex object's memory may be deallocated.</i>" - <b>Proxy Pattern, Wikipedia. org</b><br />There are four common situations where a Proxy pattern is required:
<br />
===Virtual Proxy - Java===
This sample code is from the Apache Geronimo server runtime framework written in J2EE. It is copyrighted by <b>IBM</b> and licensed by <b>[http://www.google.com/codesearch?hl=en&q=show:x-Vlj2phf84:hfeVps_3TKA:KxOJN1EfkwE&sa=N&ct=rd&cs_p=http://archive.apache.org/dist/geronimo/1.0-M5/geronimo-1.0-M5-src.tar.gz&cs_f=geronimo-1.0-M5/LICENSE.txt Apache]</b>. The code in this example is located in the <i>GBeanCollectionReference.java</i> of the <b>Geronimo</b> framework. It allows a user to create their own J2EE 1.4 certified application server. It can deploy servlets, XML, and other web applications. The Virtual Proxy pattern can be seen throughout this code file as highlighted:
<br />
<pre>
1
edit

Navigation menu