8

I know it probably sounds like very trivial question but I couldn't find any resources on the internet.

Could you please tell me what are open and closed layered architectures and why open layered architecture is apparently more difficult to maintin? Are there any disadvantages of using closed/open layered architectures?

Artur
  • 3,284
  • 2
  • 29
  • 35
  • 1
    "What is meant by open and closed layered architectures? [closed]" please don't tell me pun not intended – RukshanJS Nov 26 '22 at 13:36

2 Answers2

14

A closed layered architecture means that any given layer (or tier) can only use the services of the next immediate layer, whereas in an open layer architecture a given layer can make use of any of the layers (or tiers) below it. Closed layer architecture promotes independence between layers by reducing dependencies.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
  • +1 from me, Robert. I didn't think of it that way. – duffymo May 24 '09 at 17:45
  • Sorry in advance for commenting on a ~ 10 year old question, but: can open and closed layers be mixed ? Or is it an XOR relationship, like either open layer architecture or closed layer architecture but not both. – clickMe Nov 07 '18 at 11:14
  • @SebNag: I would think that, once you start using other layers, by definition it's no longer a closed layer system. – Robert Harvey Nov 07 '18 at 16:06
  • To continue the trend of commenting on old posts. I believe you end up with a semi-open or semi-closed. However, that's probably still just rationalizing away the fact that it actually is just an open layer system now. If one part can break rules, whos to say the other parts can't, or which parts can't. – Damian C Aug 15 '21 at 14:30
1

Here's one of the earliest definitions of open and closed architectures from Bob Martin:

http://www.objectmentor.com/resources/articles/ocp.pdf

Open architectures, by definition, are changing. They're hard to maintain because it's difficult to see into the future when designing the API and anticipate every possible need. But if the API remains constant, and you've designed effective mechanisms for modifying by addition rather than rewriting (e.g. declarative configuration, data-driven applicatons), open architectures can be very effective.

There's nothing wrong with a closed architecture for those problems that are well known and relatively static. Open isn't always necessary. The choice has to do with the nature and rate of change.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • It’s been ten years. Is this your idea of a good contribution to this site? Let’s see how well your answers fare ten years from now. – duffymo Dec 15 '19 at 02:48