Java8设计模式最佳实战-设计模式概述(第四天学习记录)

Explaining enterprise patterns
解释企业模式
Over time, technology has evolved and new tools have emerged and helped to change
随着时间的推移,技术不断发展,新的工具也出现了,并有助于改变
some areas. Seeing the potential of these technologies, organizations increasingly began to
一些地区。看到这些技术的潜力,组织越来越多地开始
use and invest in these tools to automate their processes and optimize their costs. These
使用并投资于这些工具来自动化流程并优化成本。这些
tools then began to be referred to as enterprise software.
工具随后开始被称为企业软件。

Enterprise software is a type of software widely used in organizations, companies, or
软件是企业或组织中广泛使用的一种软件类型
governments that provide a service to make their processes better and optimize the cost
政府提供服务以改进流程并优化成本的
and efficiency. Over time, the complexity of this software increased as they began to
以及效率。随着时间的推移,这个软件的复杂性随着他们开始
provide a lot of services. As different services demanded more communication, scalability
提供很多服务。由于不同的服务需要更多的通信、可伸缩性
became increasingly important. With this, some problems surfaced.
变得越来越重要。由此,一些问题浮出水面。
Enterprise patterns is a set of solutions for common problems that appear in enterprise
企业模式是针对企业中出现的常见问题的一组解决方案
software as a result of the complexity of enterprise environments. Many enterprise patterns
软件是企业环境复杂性的结果。许多企业模式
are based on GoF patterns and differ only in the way in which we implement them. On Java
是基于GoF模式的,只是我们实现它们的方式不同。在Java上
EE, enterprise patterns are divided into three groups: presentation patterns, business
企业模式分为三类:表示模式、业务模式
patterns, and integration patterns. These patterns act on the presentation tier, business tier,
模式和集成模式。这些模式作用于表示层、业务层,
and integration patterns, and we’ll cover their details in Chapter 2, Presentation Patterns,
以及集成模式,我们将在第2章“表示模式”中详细介绍它们,
which covers presentation patterns, Chapter 3, Business Patterns, which covers business
其中包括表示模式,第3章,业务模式,其中包括业务
patterns, and Chapter 4, Integration Patterns, which covers integration patterns.
模式,第4章,集成模式,包括集成模式。
Enterprise patterns are very important for professionals who create software, because bad
企业模式对于创建软件的专业人员非常重要,因为
practices in the creation of software could inflate the cost and risks involved in the projects.
软件开发的实践可能会增加项目的成本和风险。
Because of the complexity of the enterprise software, an error could propagate along the
由于企业软件的复杂性,错误可能会沿着
time and environment, making the enterprise environment unsustainable
时间和环境,使企业环境难以为继

Defining the difference between design
定义设计之间的差异
patterns and enterprise patterns
模式与企业模式
Comparing design patterns with enterprise patterns is not an easy task, because some
比较设计模式和企业模式不是一件容易的事,因为
behaviors are similar. Design patterns were the first subject that arrived, and this was
行为相似。设计模式是第一个出现的主题,这是
covered in Design Patterns: Elements of Reusable Object-Oriented Software, written by Erich
涵盖了设计模式:可重用面向对象软件的元素,由Erich编写
Gamma, Richard Helm, Ralph Johnson and John Vlissides. These design patterns were also
伽马,理查德·赫尔姆,拉尔夫·约翰逊和约翰·弗利塞德斯。这些设计模式也是
the base to other patterns. Enterprise patterns became necessities that design patterns
其他模式的基础。企业模式成为设计模式的必要条件
cannot resolve. This is because the design patterns describe solutions for of classes and
无法解决。这是因为设计模式描述了of类和
objects relationships, but the enterprise environments have other necessities such as
对象关系,但企业环境有其他必要性,如
integrations between systems and software relations. However, enterprise patterns use
系统和软件关系之间的集成。然而,企业模式使用
some design patterns to solve problems.
一些解决问题的设计模式。
The principal difference between design patterns and enterprise patterns is the aim; design
设计模式和企业模式的主要区别在于目的;设计
patterns aim to organize and optimize the object-oriented design, and enterprise patterns
模式旨在组织和优化面向对象的设计和企业模式
focus on improving the use of Java EE tools as well as making communications between
重点改进javaee工具的使用,以及在
Java EE components better. Design patterns are focused on object-oriented and class and
javaee组件更好。设计模式侧重于面向对象和类
object relations, whereas enterprise patterns are focused on communication between Java
对象关系,而企业模式则侧重于Java之间的通信
EE components
EE组件

The use of design patterns makes it possible to reuse algorithms and also makes the design
设计模式的使用使重用算法成为可能,也使设计成为可能
flexible; enterprise design patterns promote an abstraction of the complexity of Java EE
灵活;企业设计模式促进了对javaee复杂性的抽象
tools and make it easier for the architecture to make changes.
工具,使架构更容易进行更改。
Because of the complexity of architecture, the minimal use of enterprise patterns tends to be
由于体系结构的复杂性,企业模式的最小使用往往是
worse than the minimal use of design patterns. This is because, with the lack of use of
比最小限度地使用设计模式更糟糕。这是因为
enterprise patterns, the professional will always work with Java EE’s complexity, increasing
企业模式下,专业人士总是会随着javaee的复杂性而不断增加
the probability of error.
错误的概率。
Some implementations of Java EE patterns are already present in Java EE tools, and this
javaee模式的一些实现已经存在于javaee工具中,并且
makes them easy to use. In the next chapters, we will describe some of these patterns and
易于使用。在接下来的章节中,我们将描述其中的一些模式和
their implementation using Java EE tools and see how these patterns will favor the design
他们的实现使用javaee工具,看看这些模式将如何有利于设计
and architecture of your project
以及你的项目架构

Summary
摘要
In this chapter, we introduced you to design patterns, explaining the GoF design patterns
在本章中,我们向您介绍了设计模式,解释了GoF设计模式
and their catalog. We covered the basic design patterns of the Java world with a brief
以及他们的目录。我们简要介绍了Java世界的基本设计模式
introduction to Singleton, Abstract Factory, Facade, Iterator, and Proxy. As well as this, we
介绍Singleton、抽象工厂、Facade、Iterator和Proxy。除了这个,我们
looked at enterprise patterns and the difference between them and design patterns.
研究了企业模式及其与设计模式的区别。
In the next chapter, we will explain presentation patterns, including their concepts and
在下一章中,我们将解释表示模式,包括它们的概念和
implementation. We will also demonstrate the concepts of presentation patterns and how
实施。我们还将演示表示模式的概念以及如何
they help us to write better software. We will then show examples of the implementation of
它们帮助我们编写更好的软件。然后我们将展示
presentation patterns, using real-world problems as an example
表示模式,以实际问题为例

猜你喜欢

转载自blog.csdn.net/Coder_Boy_/article/details/110377062
今日推荐