What's the difference between Architectural Patterns and Architectural Styles?

前端 未结 12 1620
被撕碎了的回忆
被撕碎了的回忆 2021-01-30 04:16

In Software Architecture - Foundations, Theory and Practice, I can find definitions for both. The problem is that I don\'t get what each one of them means in plain Engl

相关标签:
12条回答
  • 2021-01-30 04:39

    Architectural design patterns are more domain specific where are architectural styles are more generic and usable in wide range of applications. Because of this architectural patterns requires more domain knowledge.

    0 讨论(0)
  • 2021-01-30 04:42

    Frankly, I have always considered both these terms to be synonymous! And layman (relatively speaking) literature definitely treats them as such. Refer MSDN or Wikipedia

    However, your question intrigued me a bit so I did a bit more digging and frankly...I couldn't find much except for a reference to A Practical Guide to Enterprise Architecture (The Coad Series), from which i quote:

    An architectural style (Base et al. 1997) and an architectural pattern (Buschmann et al. 1996) are essentially synonymous.

    Based on some more googling, this is what I think might be one possible way to differentiate the two:

    • An architectural style is a conceptual way of how the system will be created / will work.
    • An architectural pattern describes a solution for implementing a style at the level of subsystems or modules and their relationships.

    How an architectural pattern will differ from a Design pattern i.e. Adapter, observer is basically by the level of Granularity at which they are applied (I know this isn't part of the question but it's related, I think...)

    0 讨论(0)
  • 2021-01-30 04:46

    An Architectural Pattern is a way of solving a recurring architectural problem. MVC, for instance, solves the problem of separating the UI from the model. Sensor-Controller-Actuator, is a pattern that will help you with the problem of actuating in face of several input senses.

    An Architectural Style, on the other hand, is just a name given to a recurrent architectural design. Contrary to a pattern, it doesn't exist to "solve" a problem.

    Pipe&filter doesn't solve any specific problem, it's just a way of organizing your code. Client/server, Main program & subroutine and Abstract Data Types / OO, the same.

    Also, a single architecture can contain several architectural styles, and each architectural style can make use of several architectural patterns.

    0 讨论(0)
  • 2021-01-30 04:52

    In very simple words:

    • An architectural style

      Is a concept, theory (and how it's implemented it is up to you). It can also apply to outside of the software world.

      In example: REST (Representational State Transfer) is an architectural style built on certain principles using the current “Web” fundamentals.

    • An architectural patterns

      Describes a solution at the software system (or module) level. In other words how it interacts each other e.g. view with model, and model with controller.

    • A design patterns

      Is a solution at the core level, it talks about classes, functions and how actually the logic flows.

    0 讨论(0)
  • 2021-01-30 04:55

    For Architectural Patterns think specific ways to style your code as described by the GoF like; Adapter, Strategy, Builder, Mediator, etc

    For Architectural Style think overall system; I.E., using MVC for presentation, DDD to model the business layer, WCF (if you're into .NET) for Interop, SOA for integration, etc.

    0 讨论(0)
  • 2021-01-30 04:55

    Architecture pattern: context + problem -> solution

    Architecture style: solution part of architecture pattern

    So architecture style is analogous to the solution part of the architecture pattern. It's often used in books dealing with architecture documentation where the focus is on the solution and not how the context and problem came about.

    0 讨论(0)
提交回复
热议问题