Consider this mock-up of a software stack designed with layered architecture in mind :

Basic example of a layered-structured software stack.

Every application layer is decoupled through API calls, but a memory handling library is used throughout. All layers need to copy, allocate or somehow affect memory.

Is this bad use of the layered architecture pattern, or is it one of its pitfall ? On one hand, trying to force the pattern upon the library calls, perhaps by adding memory handling wrappers to every application layers, would create a lot of boilerplate code. On the other hand, letting layers, through library calls, create arbitrary entry points into different layers seems to contradict the very rationale behind layered architecture.

  • 1
    off to the side... Apr 28, 2014 at 19:28
  • sorry to be that guy, but I think you mean "platform" in the diagram Apr 28, 2014 at 20:28

1 Answer 1


Layered Architecture speaks to the flow of business-related data between layers. It has nothing to say about utility libraries; every layer can potentially access a given utility library, just like you have done.

  • 1
    Very true. Otherwise, where would a language's standard library (STL, JFC, etc) fit in? Are only certain layers allowed to use strings? That would be ludicrous.
    – user22815
    Apr 28, 2014 at 19:46
  • Agree. altought, its common that Utility Libraries are more applied to inner layers.
    – umlcat
    Oct 27, 2014 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.