The way I think about programming to interfaces is that, as I write client code, I want to write against the interface of the type that's as far up that hierarchy as I can go, without going too far.
而我所考虑的面向接口编程方式是这样的,当我编写客户端代码时,我会针对接口尽量调用抽象的类也就是层次顶端的类型,但同时要基本包括所需的内容。
Now, with the server running locally, the IRC client up and running, and the PEAR modules installed, I can write the PHP bot that will retrieve the weather conditions in my hometown.
现在,服务器已在本地运行,IRC 客户机已安装好并在运行,并且安装了 PEAR 模块,我就可以编写接收我所在地区的天气状况的 PHP 聊天机器人(bot) 了。
In Listing 3, the servlet opens up a stream directly to the client and USES the generated code to write the binary protocol buffers data to the stream.
在清单3中,servlet直接打开到客户端的流并使用生成的代码编写到流的二进制协议buffers数据。
应用推荐