3 ms·
If you're talking about the basic Application Programming Interface, then I would say anything that implements the API using chaining or the [1] Fluent Interfac
by gitgud 7y ago
If you're talking about the basic Application Programming Interface, then I would say anything that implements the API using chaining or the [1] Fluent Interface. Examples include: LINQ, MongoDB and DOM access in HTML and JS.
createOrder()
.addItem('Apple')
.addItem('Orange')
.addItems('Tomatoe', 4)
.setHighPriority()
.sendEmail()
To me it's a beautiful way to compose complex intention from a chaining a bunch of simple commands... like unix pipes... this should be the goal of all API's...
[1] https://martinfowler.com/bliki/FluentInterface.html https://martinfowler.com/bliki/FluentInterface.html