From the course: Java Design Patterns: Structural

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understand the Proxy pattern

Understand the Proxy pattern - Java Tutorial

From the course: Java Design Patterns: Structural

Start my 1-month free trial

Understand the Proxy pattern

- [Instructor] A proxy is used as a source of replacement for a real object. It literally means a substitute for the real thing. In real life, a good example of a proxy is a bank card. Instead of paying with the real money in your accounts, your bank card acts as a proxy and allows you to access. the actual money when you need it. In computing, you might've have come across the concept of proxy servers, which is service that sit between the clients and the actual server and pass messages between the two. This is a similar concept to the proxy pattern in Java. There are a few different types of proxy patterns. The one I'm going to be concentrating on in this chapter is virtual proxies. Virtual proxies are used to save memory and improve startup times and applications. Say, for example, you have an app for displaying documents. There might be a big picture on page 50, say of the document. And when you open the document,…

Contents