官术网_书友最值得收藏!

  • JavaScript:Moving to ES2015
  • Ved Antani Simon Timms Narayan Prusty
  • 243字
  • 2021-07-09 19:07:46

Summary

Design patterns have a rich and interesting history. From their origin as tools for helping to describe how to build the structures to allow people to live together, they have grown to be applicable to a number of domains.

It has now been a decade since the seminal work on applying design patterns to programming. Since then, a vast number of new patterns have been developed. Some of these patterns are general-purpose patterns such as those outlined in the GoF book, but a larger number are very specific patterns which are designed for use in a narrow domain.

JavaScript also has an interesting history and is really coming of age. With server-side JavaScript taking off and large JavaScript applications becoming common, there is a need for more diligence in building JavaScript applications. It is rare to see patterns being properly exploited in most modern JavaScript code.

Leaning on the teachings provided by design patterns to build modern JavaScript patterns gives one the best of both worlds. As Isaac Newton famously wrote:

"If I have seen further it is by standing on ye shoulders of Giants."

Patterns give us easily-accessible shoulders on which to stand.

In the next chapter we will look at some techniques for building structure into JavaScript. The inheritance system in JavaScript is unlike that of most other object-oriented languages and that provides us both opportunities and limits. We'll see how to build classes and modules in the JavaScript world.

主站蜘蛛池模板: 陆河县| 邯郸县| 新化县| 仪陇县| 昭通市| 兴隆县| 青龙| 宜君县| 弋阳县| 原阳县| 大安市| 光泽县| 邻水| 灌阳县| 耒阳市| 高平市| 吉水县| 政和县| 桂平市| 东莞市| 桃园县| 达拉特旗| 改则县| 浑源县| 庆云县| 辰溪县| 离岛区| 淄博市| 沂源县| 杭锦后旗| 东丽区| 景泰县| 景宁| 盐池县| 克什克腾旗| 弋阳县| 新沂市| 榆中县| 桐乡市| 河间市| 始兴县|