In this example from Domain-Driven Design, my impression was that the "layers" the author refers to arent levels of abstraction, but levels of visibility/awareness to the end-user. And the "level" is the depth/degree to which something is exposed or hidden to the user or operator.

In DIP, the level of abstraction refers to levels of knowledge and interdependency of software entities (e.g., objects) upon other software entities.

So "level of abstraction" (as DIP uses the term "level") doesnt help us determine which objects are domain objects and which ones arent. But "layer of application" (as DDD uses the term) does tell us something about which objects are "closer" to the problem domain and which are closer to the solution/implementation domain.

The difference between level of abstraction and layer of application, to me, is that:

* Layer of Application pertains to knowledge about parts of the system that are apparent to its external user;

* Level of Abstraction pertains to knowledge about parts of the system that are apparent to other parts of the system.

How does Dependency Inversion work in component-based systems? If there are multiple components that are clients of a server component, does each client define an interface that the server multiply inherits? Is it possible to package the server for reuse independent of its clients, and still isolate clients from changes to the server? Via Adapters? Who owns/specifies the adapters? (I'm working in a legacy app w/ one million lines of C++. We're trying to migrate it to a component-based layered architecture, using a Service-Oriented Architecture infrastructure. There appear to be opportunities for DIP.)

Bob then reports that "DDD also says that 'higher' layers should depend on 'lower' layers. Indeed, he stresses that when lower layers need to communicate upwards they should use callbacks or Observers. DDD is not the only source for this concept; it's pretty universal." But what is meant by higher and lower? Martin explains that the Dependency Inversion Principle essentially means " that high level policy should not depend on low level detail. Yet the layering principle says that high level layers should depend upon low level layers-----------------johnsmith