What is the name of the design pattern used in method chaining in jQuery? [closed]

荒凉一梦 提交于 2020-02-07 06:10:09

问题


I want to know what is the name of the design pattern behind method chaining in jQuery?


回答1:


According to this post https://softwareengineering.stackexchange.com/questions/137999/what-is-the-pattern-name-for-using-method-chaining-to-build-an-object, it's called a Fluent Interface.

I see many articles referring to it simply as method chaining also (which seems more descriptive) and also the Chaining Pattern. It seems the more you search, the more different names you can find, though there are many references to the term "fluent interface".



来源:https://stackoverflow.com/questions/28955571/what-is-the-name-of-the-design-pattern-used-in-method-chaining-in-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!