Skip to content

Commit 5300f2d

Browse files
committed
Blog: Update post.
1 parent ea3a375 commit 5300f2d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

book/programming-javascript-applications/chapter-4/401-classical-inheritance-is-obsolete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ These problems are summed up nicely by Joe Armstrong in "Coders at Work", by Pet
8383
8484
Inheritance works beautifully for a short time, but eventually the app architecture becomes arthritic. When you've built up your entire app on a foundation of classical inheritance, the dependencies on ancestors run so deep that even reusing or changing trivial amounts of code can turn into a gigantic refactor. Deep inheritance trees are brittle, inflexible, and difficult to extend.
8585

86-
在短时间内,继承会工作得很完美,但最终,应用的架构会变得僵硬迟缓。当你已经在一个类继承体系上建立起你的整个应用之后,由于祖先类的依赖关系是如此之深,以致于重用或改变一些细节末节的代码都将导致一场大规格的重构。深度继承树是脆弱的、不灵活的、难于扩展的。
86+
在短时间内,继承会工作得很完美,但最终,应用的架构会变得僵硬迟缓。当你已经在一个类继承体系上建立起你的整个应用之后,由于祖先类的依赖关系是如此之深,以致于重用或改变一些细枝末节的代码都将导致一场大规格的重构。深度继承树是脆弱的、不灵活的、难于扩展的。
8787

8888
More often than not, what you wind up with in a mature classical OO application is a range of possible ancestors to inherit from, all with slightly different but often similar configurations. Figuring out which to use is not straightforward, and you soon have a haphazard collection of similar objects with unexpectedly divergent properties. Around this time, people start throwing around the word "rewrite" as if it's an easier undertaking than refactoring the current mess.
8989

book/programming-javascript-applications/chapter-5/508-building-client-side-code-with-commonjs-npm-grunt-and-browserify.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ module.exports = function(grunt) {
406406
append: [],
407407
hook: function () {
408408
// bundle is passed in as first param
409+
// 打包文件会作为第一个参数传进来。
409410
}
410411
}
411412
}

0 commit comments

Comments
 (0)