An open API service indexing awesome lists of open source software.

https://github.com/codesmell/fluent-builder


https://github.com/codesmell/fluent-builder

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

          

# fluent-builder

Was mentoring some new developers at work and we discussed various ways to create objects in Java.
This project showcased how to move from a standard getter / setter approach to a constructor with parameters.
From there we looked at making a fluent API and then added the builder pattern.

Some blog entries
* [Fluent Object Creation](https://theagilejedi.wordpress.com/2016/10/10/fluent-object-creation/
"Fluent Object Creation") takes a look at the code smells associated with a long parameter list in a constructor and adds a fluent API to a POJO
* [Nested Fluent Builders with Java 8](https://theagilejedi.wordpress.com/2016/10/21/nested-fluent-builders-with-java-8/
"Nested Fluent Builders with Java 8") adds the builder pattern to our POJO. Then explores using Java 8 lamdas to support a nested fluent builder.