抽象不要依赖细节,细节要依赖抽象。
Abstractions should not depend on details. Details should depend on abstractions.
依赖抽象,不要依赖具体。
高层不应该依赖底层模块,两者应该抽象(无法被实例话的接口,类啥的);抽象不应该依赖细节;细节应该反而依赖抽象,换句话说也就是面向接口编程。
High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.
他们都应该依赖于抽象。
细节应该依赖于抽象。
工厂类和抽象工厂类能够被用做依赖框架,但是已经有了专门的框架,被称为反转控制容器。
Factories and Abstract Factories can be used as dependency frameworks, but there are specialized frameworks for that, known as Inversion of Control Container.
业务功能的抽象定义(可以通过一个WSDL中的端口类型来描述)并不依赖所使用的协议。
The abstract definition of a business function, describable via a port type in WSDL, is not dependent on the protocol used.
然后,程序功能就会渐渐的抽象为服务,它是通过依赖注射来管理的,并位于合适的服务层中。
Then, gradually, application functionality can be abstracted into services, which are managed via dependency injection and which reside in a proper service layer.
依赖倒置原则声明了我们应该将高层模块和低层模块解偶,在高层类和低层类之间引入一个抽象层。
Dependency Inversion Principle states that we should decouple high level modules from low level modules, introducing an abstraction layer between the high level classes and low level classes.
当直觉可能引发的错误显而易见时尤其如此,特别是正确答案依赖于逻辑和抽象推理时——这些能力IQ测试测量得很好。
This is particularly true when any intuitive pitfalls are obvious, especially if a correct answer depends on logic or abstract reasoning - abilities that IQ tests measure well.
任何依赖自然现象、抽象的概念以及自然规律的发明都不能被授予专利。
Anything that relies on natural phenomena, abstract ideas or the laws of nature does not qualify.
我们是应该信任抽象理论推理的能力呢,还是应该依赖更加直接的情感反应?
Should we be putting our faith in our capacity for abstract theoretical reasoning, or should we be relying on our more immediate emotional responses?
在图2所示的应用程序中,GUI依赖于一个抽象——一个数据访问对象或DAO。
In the application shown in Figure 2, the GUI relies on an abstraction — a data access object or DAO.
GUI对某个实现(而不是抽象)的依赖会对系统造成限制。
The GUI's dependence on an implementation rather than an abstraction limits the system.
实践am的团队宁愿迟些使用抽象,通过重构并依赖于自动化测试来允许变更。
Teams practicing am would rather hold off on the abstractions and allow for change by relying on automated tests to enable refactoring.
不要让抽象的消费者依赖于除过那个抽象的公共契约的任何东西。
Don't let the consumer of an abstraction depend on anything but the public contract of that abstraction.
高层模块不应该依赖底层模块,两者都应该依赖其抽象。
High level modules should not depend upon low level modules. Rather, both should depend upon abstractions.
这是因为GWT对宿主环境底层的正则表达式机制的依赖也是不完美抽象所带来问题的一个例子。
This is because of GWT's reliance on the host environment's underlying regexp mechanism and is an example of the trouble that imperfect abstractions can land you in.
松散耦合应用程序中的组件依赖于各种接口和抽象类,而紧密耦合的系统则与之相反,其组件依赖于各种具体的类。
Its components rely on interfaces and abstract classes as opposed to concrete ones, as they would in a tightly coupled system.
返回消息的使用依赖建模的具体/抽象程度。
The use of return messages depends on the level of detail/abstraction that is being modeled.
因为dao无法通过接口或抽象类隐藏注入细节,所以任何更改都可能影响它的依赖组件。
Because dao is unable to hide implantation details through interfaces or abstract classes, any changes could then impact on its dependent components.
当您使用模型驱动的开发(Model Driven Development,MDD)方法进行软件开发时,您的成功一贯依赖于抽象的使用。
When you pursue a Model Driven development (MDD) approach to software development, your success consistently relies on the use of abstractions.
virtioAPI依赖一个简单的缓冲抽象来封装来宾操作系统需要的命令和数据。
The virtio API relies on a simple buffer abstraction to encapsulate the command and data needs of the guest.
因为Spring配置依赖于先前定义的“抽象”bean,因此它变得相当简洁。
Because the Spring configuration relies on the "abstract" beans defined earlier, it becomes reasonably compact.
由于Swing建立在抽象窗口工具包(awt)之上,对组件焦点的管理便依赖于awt中的底层焦点管理。
Because Swing is built on top of the Abstract Window Toolkit (AWT), the management of component focus relies on the underlying focus management in the AWT.
它是可重用的,因为它依赖于一个简单的基础设(一个接口和一个抽象方面),并使您可以在多种情况下重复使用一个ContractManager。
It is reusable because it relies on a simple infrastructure (an interface and an abstract aspect) and lets you reuse a single ContractManager in more than one situation.
依赖性倒置原则的基本思想就是对象应该依赖于抽象而不是实现。
The basic idea behind dependency inversion is that objects should be dependent upon abstractions and not upon implementations.
更进一步,他倒置了依赖关系:我们应该基于抽象来写细节,而不是基于细节来写我们的抽像。
Further more it inverts the dependency: instead of writing our abstractions based on details, the we should write the details based on abstractions.
依赖性倒置注重依赖于抽象(而非实现),这样可以在同一个代码库中创建大量的灵活性。
Dependency inversion stresses reliance on abstractions over implementations, which creates a great deal of flexibility within a code base.
ModelMBean提供了一个改进的抽象层,并扩展了DynamicMBean模型以进一步减少对给定实现的依赖性。
Model MBeans provide an improved layer of abstraction and extend the Dynamic MBean model to further remove dependencies on a given implementation.
应用推荐