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

  • 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.

主站蜘蛛池模板: 开远市| 肇东市| 祁连县| 简阳市| 饶平县| 玉田县| 湘潭县| 原阳县| 蓝田县| 新安县| 双牌县| 岚皋县| 长岭县| 汽车| 乌鲁木齐市| 天等县| 宁陵县| 永福县| 香河县| 台州市| 平度市| 固安县| 安达市| 海兴县| 无极县| 德江县| 崇州市| 上蔡县| 九江县| 金坛市| 密山市| 诸暨市| 泰来县| 邯郸县| 名山县| 徐闻县| 东乡县| 民权县| 永顺县| 关岭| 陆川县|