• 应用程序架构指南 第一部分 第一章 应用程序架构基础[选译]


    Fundamental concepts of software architecture

    软件架构基本概念 

    Software architecture is often described as the organization or structure of a system, while the system represents a collection of components that accomplish a specific function or set of functions. In other words, architecture is focused on organizing components to support specific functionality. This organization of functionality is often referred to as grouping components into “areas of concern.” 

    软件架构通常被描述为组织或系统的结构,而系统是一个完成特定功能或功能集合的组件集合。换句话说,架构的重点是组织组件以支持特定功能。这种功能的组织被称为将组件分组以纳入到关注领域。 

    Why Do We Need Architecture?

    为什么我们需要架构? 

    Like any other complex structure, software must be built on a solid foundation. Failing to consider key scenarios, failing to design for common problems, or failing to appreciate the long-term consequences of key decisions can put your application at risk. Modern tools and platforms help to simplify the tasks of building applications, but they do not replace the requirement to design your application based on your specific scenarios. The risks exposed by poor architecture include software that is unstable, is unable to support business requirements, or could even prevent the application from working when deployed into a production environment.  

    像任何其他复杂的结构一样,软件必须建立在坚实的基础。没有考虑关键情景,没有为共同的问题做设计,或没有充分意识到关键决定带来的长期后果,都可以使你的应用程序处于危险之中。现代的工具和平台有助于简化应用程序的构建任务,但它们并没有取代根据您的具体情况设计应用程序的需求。拙劣的架构暴露的风险包括软件是不稳定的,不能支持业务需求,或者部署到生产环境时,应用程序甚至可能无法工作。 

    Consider the following high-level concerns when thinking about software architecture:

    构思软件架构时,考虑下面的高层次的关注:

    >How will the application be deployed into production?

    >应用程序会怎样部署到生产环境?

    >How will the users be using the application?

    >用户将如何使用该应用程序?

    >What are the quality attribute requirements, such as security, performance, concurrency, internationalization, and configuration?

    >质量属性要求是什么,例如安全性,性能,并发性,国际化和配置?

    >What are the architectural trends that might impact your application now or after it has been deployed? 

    >架构的趋势是什么,是现在还是部署后,可能影响应用程序? 

    The Goals of Architecture

    架构的目标 

    Application architecture seeks to build a bridge between business requirements and technical requirements by understanding use cases, and then finding ways to implement those use cases in the software. The goal of architecture is to identify the requirements that impact the structure of the application. Good architecture reduces the business risks associated with building a technical solution. A good design is sufficiently flexible to be able to handle the natural drift that will occur over time in hardware and software technology, as well as in user scenarios and requirements. An architect must consider the overall impact of design decisions, the inherent tradeoffs between quality attributes (such as performance and security), and the tradeoffs required to address user, system, and business requirements.  

    应用程序架构寻求在业务需求和技术需求之间构建一个梁,通过理解用例,然后想方设法在软件中实现这些用例。架构的目标是确定影响应用程序结构的需求。良好的架构通过构建一个技术解决方案降低业务风险。优秀的设计具有足够的灵活性,以便能够处理,随着时间的流逝,将发生在硬件和软件技术,以及用户场景和需求上的自然的变化。架构师必须考虑设计决策,质量属性之间的内在权衡(如性能和安全性),以及需要讨论用户,系统和业务需求的权衡的全部影响。 

    Keep in mind that the architecture should:

    记住,架构应该:

    >Expose the structure of the system but hide the implementation details.

     >暴露系统的结构,但隐藏实现的细节。

     >Realize all of the use-case scenarios.

     >实现所有的用例场景。

     >Try to address the concerns of various stakeholders.

     >尝试解决各种各样的利益相关者的关注问题。

     >Handle both functional and quality requirements.

     >既处理功能需求,也处理质量需求。 

    Approach to Architecture

    架构方法 

    There are key decisions that must be addressed with any architecture, regardless of your architectural approach. At a minimum, you must determine the type of application that you are building, the architectural styles that will be used, and how you will handle cross-cutting concerns. Throughout this guide, we use an architectural baseline for framing out the different areas that must be addressed in your architecture. The architectural baseline is shown in the following diagram. 

    有任何架构必须解决的关键决策,不管架构方法。至少,你必须确定您正在构建的应用程序类型,将要使用的架构风格,以及你将如何处理横切关注点(cross-cutting concerns)。本指南中,我们为框架使用了架构基准,通过必须在架构中处理的不同领域。架构基准显示在下面的图表。 

    In addition to the architectural baseline, you can use the following approach to help define your architecture. The first step is to identify the type of application you plan to build. Next, you must understand how the application will be deployed. Once you know what type of application you are building and how it will be deployed, you can start to drill down into the architecture to identify styles and technologies that you will use. Finally, you must consider how quality attributes and cross-cutting concerns will be incorporated into the design of your system. 

    除了架构基准之外,可以使用下面的方法来帮助确定您的体系结构。第一步是确定你计划构建的应用程序类型。接下来,您必须了解应用程序将被怎样部署。一旦你知道您正在构建的应用程序是什么类型,和如何部署,你可以开始往下考虑架构,以便确定您将使用的风格和技术。最后,你必须考虑如何将质量属性和横切关注点(cross-cutting concerns)纳入您的系统设计。 

    Cross-cutting concerns represent key areas of your design that are not related to a specific layer in your application. For example, you might want to cache data in the presentation layer, the business layer, and the data access layer. The key cross-cutting concerns: Authentication, Authorization, Caching, Communication, Exception management, Instrumentation and logging. 

    横切关注点表示设计中的关键领域,它不关联于应用程序中某一个具体的层。例如,您可能希望在表示层,业务层和数据访问层缓存数据。关键的横切关注点: 认证,授权,缓存,通信,异常管理,检测和日志。 

    Designing Your Architecture

    设计架构

    Consider the following questions as you create an architectural design with agility in mind:

    创建一个灵活的架构设计,考虑以下问题:

    >What are the foundational parts of the architecture that represent the greatest risk if you get them wrong?

     >什么是架构的基础部分,如果它们出错了,就代表着最大的风险?

    >What are the parts of the architecture that are most likely to change, or whose design you can delay until later with little impact?

     >架构的哪部分,最有可能发生变化,或哪部分的设计,可以推迟到后来有很小的影响再处理?

     >What are your key assumptions, and how will you test them?

     >什么是您的主要假设,以及你将如何测试它们?

    >What conditions may require you to refactor the design?

     >哪些条件可能需要你重构设计? 

    Key Architecture Principles

    关键架构原则 

    Consider the following key principles when designing your architecture:

    设计架构时,考虑以下主要原则:

    >Build to change over build to last. Wherever possible, design your application so that it can change over time to address new requirements and challenges.

     >持续改变。只要有可能,设计应用程序使它可以随时间发生改变以处理新的需求和挑战。

     >Model to analyze and reduce risk. Use threat models to understand risks and vulnerabilities. Use design tools and modeling systems such as Unified Modeling Language (UML) where appropriate.

     >分析模型并减少风险。使用威胁模型来理解风险和脆弱点。在适当情况下,使用设计工具和建模系统,如统一建模语言(UML)。

    >Models and views are a communication and collaboration tool. Efficient communication of design principles and design changes is critical to good architecture. Use models and other visualizations to communicate your design efficiently and to enable rapid communication of changes to the design.

     >模型和视图是沟通和协作工具。设计原则和设计变更的有效的沟通对好架构是至关重要的。使用模型和其他可视化的工具有效的沟通设计,使设计变更快速沟通。

    >Identify key engineering decisions. Use the architecture frame in this guide to understand the key engineering decisions and the areas where mistakes are most often made. Invest in getting these key decisions right the first time so that the design is more flexible and less likely to be broken by changes.

     >确定关键工程决策.使用本指南中的架构框架,理解关键工程决策和最常出现错误的领域。在第一时间获得这些关键决策,使该设计更为灵活,并不太可能被变化破坏。

  • 相关阅读:
    1.4(java学习笔记) 面向对象内存分析
    1.3(java学习笔记)构造方法及重载
    1.2(java学习笔记)类与对象
    1.1(java学习笔记) 面向过程与面向对象
    STM32F0库函数初始化系列:GPIO配置
    STM32F4库函数初始化系列:PWM输出
    STM32F4库函数初始化系列:DMA串口接收
    STM32F4库函数初始化系列:三重ADC——DMA
    STM32F1库函数初始化系列:DMA—ADC采集
    STM32F4库函数初始化系列:串口DMA接收
  • 原文地址:https://www.cnblogs.com/jacktang/p/1597129.html
Copyright © 2020-2023  润新知