Re: Proxy pattern. Confusion in Virtual Proxy ?
Wednesday, September 26, 2001 06:18 AM
perhaps you have a document. this document contains system architecture which consist of text and images showing various UML diagrams. lets also say that you are creating your own viewer for this document in swing. what you can do is load all the text at first and place proxies for all images in the document. the document loads extremely fast because it is loading only text. for each UML diagram, there is a link stating something like "click here to see UML diagram" if the user clicks the link, the image is loaded into the document. what you gain is 1) documents loads fast so user can immediately start browsing it. 2) if the user is not interested in the UML diagrams, it does not have to wait for them to load. 3) if some UML diagram is really, really big, the user can read the document while the image is getting loaded. this technique is also commonly used in HTML documents containing diagrams which are shown as tiny pictures that expand in another window when clicked.