Abstract
In this chapter, we look at the proxy pattern. A proxy is an object that can be used to control access to another object. It implements the same interface as this other object and passes on any method invocations to it. This other object is often called the real subject. A proxy can be instantiated in place of this real subject and allow it to be accessed remotely. It can also delay instantiation of the real subject until it is actually needed; this is especially useful if the real subject takes a long time to initialize, or is too large to keep in memory when it isn’t needed. Proxies can be very helpful when dealing with classes that are slow to load data to a user interface.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
Rights and permissions
Copyright information
© 2008 Ross Harmes and Dustin Diaz
About this chapter
Cite this chapter
(2008). The Proxy Pattern. In: Pro JavaScript Design Patterns. Apress. https://doi.org/10.1007/978-1-4302-0496-1_14
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0496-1_14
Publisher Name: Apress
Print ISBN: 978-1-59059-908-2
Online ISBN: 978-1-4302-0496-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)