即使只是暂时使用数据,这也是用对象表示数据的一种很合理的情形。
Even if you use the data only briefly, this is still a situation where using objects to represent your data makes a lot of sense.
这种模式中,一个对象(代理)处理对另一个对象(因为没有更好的名称,暂时称之为实际对象)的访问。
In this pattern, an object (the proxy) handles all access to another object (which, for lack of a better name, I'll call the real object).
“可能你发言的对象是几千号人,他们挤在一个房间里吵吵嚷嚷,面对这样的情况,不妨先暂时专心对一个人说话,”他说。
"Whether you have a few people in the room or a thousand, direct your focus to one person at a time," he said.
应用推荐