DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

EnterpriseGuerilla > ErichGamma > ErichGammaConversations > ErikNaggum > Erlang > ExceptionHandling > Exceptions > ExecutablePseudocode > ExplorativeProgramming > Hacking > ExtensibleStylesheetLanguage > ExtremeProgramming > FastCGI > FastcgiOrModpython > Fighter > Firefox > FluentInterfacesClear Trail
Main /

Fluent Interfaces

DomainSpecificLanguages
Interfaces
OOP

fluent: objects are passed through a chain of method-invokatios:
 Car.describeAs().box().wheels(4)
e.g. mutators return this.

The API is primarily designed to be readable and to flow. The price of this fluency is more effort, both in thinking and in the API construction itself. The simple API of constructor, setter, and addition methods is much easier to write. Coming up with a nice fluent API requires a good bit of thought.

Building a fluent API like this leads to some unusual API habits. One of the most obvious ones are setters that return a value.


Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 21.06.2008 22:48 Uhr und seit 7. April 2005 572 aufgerufen.