如何理解模块化?

发布于 2024-09-29 06:47:50 字数 40 浏览 4 评论 0原文

我想知道您如何理解软件中的模块化,尤其是 Web 开发中的模块化?

I'd like to know how you understand modularization in software, especially in web development?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北音执念 2024-10-06 06:47:50

来自模块化

模块化是一个通用的系统概念,通常定义为描述系统组件可以分离和重新组合的程度的连续体。1既指组件之间耦合的紧密程度,也指系统架构的“规则”允许(或禁止)组件混合和匹配的程度。

在模块化编程中,模块化是指软件包各部分的划分和相互关系。

简而言之,它是关于设计或查看由组件或模块组成的系统。就是这样。

请注意,该术语并不意味着系统被设计为模块的组合,也不意味着应该努力最小化模块化以制作单个紧密耦合的软件。

尽管如此,在实践中,当人们谈论软件模块化时,通常会建议尝试将系统拆分为许多松散互连的模块(松耦合原则)。这通常有助于实现可重用性,并限制一个模块中所做的更改超出其边界的传播,并对其他模块产生重大影响。

From Modularity:

Modularity is a general systems concept, typically defined as a continuum describing the degree to which a system’s components may be separated and recombined.1 It refers to both the tightness of coupling between components, and the degree to which the “rules” of the system architecture enable (or prohibit) the mixing and matching of components.

In modular programming, modularity refers to the compartmentalization and inter-relation of the parts of a software package.

In a nutshell, it's about designing or seeing a system as composed of components or modules. That's it.

Notice that the term does not suggest a system be designed as a composition of modules, nor does it imply it should be strived to minimize modularization to make a single tightly-coupled piece of software.

Still, in practice, when one is talking about modularization in software, one is usually suggesting to attempt to split the system into many loosely interconnected modules (the Loose coupling principle). This often helps to achieve reusability and to limit propagation of changes done in one module over its borders and have significant impact on the other modules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文