[譯] 每天一段 Spring 5 官方文件(5.1.4.RELEASE)—— Spring Framework Overview 09

Zhoust發表於2019-02-21

Spring 框架概覽

開始時間 11:03,結束時間 10:48,用時 45 mins。

3. Design Philosophy

When you learn about a framework, it’s important to know not only what it does but what principles it follows. Here are the guiding principles of the Spring Framework:

  • Provide choice at every level. Spring lets you defer design decisions as late as possible. For example, you can switch persistence providers through configuration without changing your code. The same is true for many other infrastructure concerns and integration with third-party APIs.

  • Accommodate diverse perspectives. Spring embraces flexibility and is not opinionated about how things should be done. It supports a wide range of application needs with different perspectives.

  • Maintain strong backward compatibility. Spring’s evolution has been carefully managed to force few breaking changes between versions. Spring supports a carefully chosen range of JDK versions and third-party libraries to facilitate maintenance of applications and libraries that depend on Spring.

  • Care about API design. The Spring team puts a lot of thought and time into making APIs that are intuitive and that hold up across many versions and many years.

  • Set high standards for code quality. The Spring Framework puts a strong emphasis on meaningful, current, and accurate javadoc. It is one of very few projects that can claim clean code structure with no circular dependencies between packages.

翻譯

設計原理

當你學習一門框架的時候,重要的不僅僅是學會使用,更是這個框架所遵循的原則。下面是 Spring 框架遵循的指導原則: -你提供每個級別選擇,Spring 允許你儘可能晚的決定設計方案。比如,你可以通過配置選擇持久化框架而不是改變程式碼。整合第三方 API 和其他基礎設施問題也是如此。

  • 容納不同的觀點。Spring 包容靈活性,而且不像 Spring Boot 那樣固執己見地決斷應該怎麼做。她支援廣泛應用需要的不同觀點。
  • 持續且強大的向後相容性。Spring 精心設計著發展,來阻止不同版本之間的衝突。Spring 支援多個 JDK 版本和第三方庫,以便於維護依賴於 Spring 的應用程式和庫。

詞彙

  1. Philosophy [fɪ'lɒsəfɪ] 哲學;Design Philosophy 設計原理
  2. trivial ['trɪvɪəl] 不重要的,瑣碎的
  3. innovate ['ɪnəveɪt] v. 創新
  4. infrastructure ['ɪnfrəstrʌktʃə] 基礎設施
  5. concerns [kən'sɜːn] 關心 n.
  6. Accommodate [ə'kɒmədeɪt] 容納
  7. diverse [daɪ'vɜːs; 'daɪvɜːs] 多種多樣的、不同的
  8. Maintain [meɪn'teɪn; mən'teɪn] 持續
  9. compatibility [kəm,pætɪ'bɪlɪtɪ] 相容性
  10. perspective [pə'spektɪv] 觀點

相關文章