What is a fluent interface? I can\'t find a good definition of this, but all I get are long code examples in a language I am not very familiar with (e.g. C++).
Also, wha
A fluent interface is an API that allows you to write code that reads more or less like normal English. For example:
Find.All.Questions(Where.IsAnswered == true);
Method-chaining is usually used as part of the implementation, but there is more to it than that. To quote Fowler:
I've also noticed a common misconception - many people seem to equate fluent interfaces with Method Chaining. Certainly chaining is a common technique to use with fluent interfaces, but true fluency is much more than that.
It is also often called an internal DSL, since the syntax resembles that of a DSL, but it is implemented inside the host language instead of being processed by a parser.