Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I keep coming across the word "proxy" used as a verb in tutorials, etc. Usually something will "proxy to" something else. What does this mean?

Having spent some time googling for what it means in a programming context, I mostly found "proxy server" or some other noun use. I understand the word proxy generally means "a stand in," so "proxy to" must mean "to stand in for." Right? But I'm still confused, because it doesn't seem to be used like that.

An example (from a PHP ZF tutorial): "__get(), __set(), __isset(), and __call(): All of these methods simply proxy to the row instance stored in $_row. This provides an easy way to composite Zend_Db_Table_Row with our Model Resource Item." from Keith Pope, Zend Framework 1.8 Web Application Development, 2009.

What does the author mean by "proxy to" in this context?

share|improve this question
3  
It means the author fails Dijkstra's criterion for competence: "Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer." –  Jerry Coffin Jun 14 '11 at 15:02
1  
Calvin: "I like to verb words". –  Cyclops Jun 14 '11 at 15:58
    
@Cyclops: +zillion. Exactly. –  user25791 Jun 14 '11 at 16:29
add comment

2 Answers

up vote 7 down vote accepted

A proxy, in its most general form, is a class functioning as an interface to something else. The proxy could interface to anything: a network connection, a large object in memory, a file, or some other resource that is expensive or impossible to duplicate. - Wikipedia

In the very context you quote, it means that said methods serve to provide an interface to the instance stored in $_row.

share|improve this answer
add comment

The author assumed incorrectly that everybody is familiar with the Proxy pattern. He could have written These methods act as proxies so even people without knowledge of the pattern could understand.

share|improve this answer
    
I agree. But the word "proxy" isn't really limited to computer science, and so it's sufficiently ambiguous by itself to warrant more specific language, I think, whether as a noun or as a verb. So if I saw "these methods act as proxies" I would still be confused. I would've preferred to read "these methods act as interfaces to the instance stored in $_row (cf. Author, "Proxy Pattern")" or something like that. –  user25791 Jun 14 '11 at 16:42
    
it is not limited to CS but it has the same meaning outside it. A proxy is "something" that acts on behalf of one other. In CS it can be an object or a function, in real life can be a person. If you know the meaning of the word outside of CS you can certainly understand it in CS too. Yes I understand the ambiguity you're talking about, but then it would be the same for "interface". If we use common english words in CS is because they represent the same concept, otherwise we would call them differently. –  Pastronio Faruglio Jun 14 '11 at 16:53
    
Well, I guess I think "act as an interface" is more descriptive than "act on behalf of," because it says a little more about what the action itself is. –  user25791 Jun 14 '11 at 17:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.