Java Clean Code Tutorial #3 - Builder Design Pattern Example

Publicado el: 25 enero 2017
en el canal de: Philip Starritt
50,261
783

Episode 3 of the free Java Clean Code Training Series.

So what is the builder pattern and why is it needed?
The Gang of Four Builder pattern is an object creation software design pattern.

It solves many problems and challenges such as the never-ending constructor parameter anti-pattern.

Benefits of the java builder pattern:
No need to pass Null objects into the constructor.
You don’t need to guess or try to work out which constructor parameter maps to a certain object’s field. Error prone!
Easily made into an Immutable class. You can now share the object safely between threads or in a multi-threaded environment as you don’t need to worry about mutation of variable state.
Provides control over object construction steps and provides meaningful semantic method names.
Increases the use-ability, maintainability and readability of code when creating objects.

Software is written once and read hundreds of times. So let’s make our fellow developers life easier.

Why clean code?
Simple. Clean code allows us to confidently make changes and deliver more features quickly to our customers.

Don’t forget to subscribe for your regular dose of Java Tutorials!
STOP THE ROT.

Till episode 4,

Philip


En esta página del sitio puede ver el video en línea Java Clean Code Tutorial #3 - Builder Design Pattern Example de Duración hora minuto segunda en buena calidad , que subió el usuario Philip Starritt 25 enero 2017, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 50,261 veces y le gustó 783 a los espectadores. Disfruta viendo!