Refers to a practice of coding object-oriented APIs with the aim of improving readability of the interface, normally implemented using method chaining.
10
votes
6answers
2k views
Fluent interface and polymorphism for building a scene with shapes
I would like to improve the interfaces of some polymorphic classes going from positional to named parameters and I came up with the fluent interface.
The following is the most clean, compact and ...
8
votes
1answer
728 views
Fluent interface for manipulating employee records
I wanted to try experimenting with fluent interface design in the C programming language. That's why I wanted to ask you, Dear Code Review users, comments on the way I have implement this simple ...
7
votes
2answers
297 views
Fluent Interface for a XmlQueryBuilder
In this answer I suggested using a fluent interface "builder" to replace all the hard-coded, repetitive and quite error-prone inline XML string concatenations.
This code might need a bit of tweaking ...
6
votes
1answer
1k views
Fluent Repository/QueryBuilder
I've been toying around making my repositories a bit more fluent for a while. I was ending up with crazy long method names when I had to query on multiple conditions. So I've been working on a way to ...
5
votes
2answers
81 views
Fluent API for creating random integer arrays in Java
Now I have this fluent API for creating random integer arrays. I can say that I want an array of particular length, having a particular minimum/maximum values and using a particular (or default) ...
5
votes
1answer
58 views
Attempting a fluent API for creating random int arrays
I have attempted doing a fluent API for creating random int arrays, and the following is what I came up with:
fluent_arrays.h:
...
3
votes
1answer
44 views
Css builder and parser
As part of a larger project I've created recently a simple CssBuilder and CssParser. It's composed of three classes and can ...
1
vote
1answer
98 views
RPG Character with fluent interface
(Follow-up on RPG Character Builder)
This implements a fluent interface for RPG game characters. Is this a valid implementation?
There are 3 characters: Paladin, ...