Skip to Content
精通模块化JavaScript
book

精通模块化JavaScript

by Nicolás Bevacqua
April 2020
Intermediate to advanced
177 pages
1h 45m
Chinese
Publishing House of Electronics Industry
Content preview from 精通模块化JavaScript
19
2
模块化原则
模块化可以解决复杂性问题,但我们所讨论的复杂性究竟是什么意思呢?
复杂性
complexity
)是一个含义丰富的术语,用于描述微妙的主题。
复杂
complex
)是什么意思?在字典里,复杂是指某物“由许多相互关联的部
分组成”,但这并不是我们在编程中谈到复杂性时所指的问题。一个程序可
能有成百上千个文件,但仍然被认为是相对简单的
1
下面这两个来自同一本字典的定义,可能在程序设计的背景下更具启发性
y
“(复杂)表现为非常庞杂或需要仔细组装的部件、单元等。”
y
“头绪多且杂乱到难以理解或处理。”
第一个定义表明,当程序的各个部分以复杂的方式组织时,程序就会变得
复杂 ;各部分之间的相互联系就会成为一个痛点。其原因可能在于接口盘
根错节或缺少文档,而这正是我们在本书中要解决的复杂性问题的一个方
面。
1
 字典中对
complex
定义的更多细节可能有助于阐明这个主题,请参见
dictionary
网站上关于
complex
的解释。
20
2
模块化原则
我们可以把第二个定义解释成复杂性的另一面。组件可能非常复杂,以至
于很难理解、调试或扩展它们的实现。本书的大部分内容都在讲如何平衡
和避免这方面的复杂性。
从广义上讲,当某个东西难以掌握或难以完全理解时,它就是复杂的。根
据该定义,一个常规程序中的任何部分都可能是复杂的: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

数据驱动力:企业数据分析实战

数据驱动力:企业数据分析实战

Carl Anderson

Publisher Resources

ISBN: 9787121387074