jQuery中方法链中使用的设计模式的名称是什么? [英] What is the name of the design pattern used in method chaining in jQuery?

查看:342
本文介绍了jQuery中方法链中使用的设计模式的名称是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道jQuery中方法链接背后的设计模式的名称是什么?

解决方案

根据这篇文章 https:// softengineering.stackexchange.com/questions/137999/what-is-the-pattern-name-for-using-method-chaining-to-build-an-object ,它被称为 Fluent Interface



我看到很多文章只是简单地指向方法链接(似乎更具描述性),还有链接图案即可。看起来你搜索得越多,你可以找到更多不同的名字,尽管有很多关于流畅的界面这个词的引用。


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

解决方案

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

这篇关于jQuery中方法链中使用的设计模式的名称是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆