java - Building an object -


i came across rather unusual way build object of class in blog : http://marchwicki.pl/blog/2010/11/building-a-pojo-in-an-elegant-way/. way this. benefits?

i came across rather unusual way build object of class in blog : http://marchwicki.pl/blog/2010/11/building-a-pojo-in-an-elegant-way/.

this builder design pattern fluent interface.

as see article, 2 ideas complementary , used (which i've seen call "fluent builder"), so, confused same thing:

note can use builder pattern without fluent interface (e.g. builder simple setters). can use fluent interface idea in more contexts builders (e.g. improve readability of set of overloaded methods many parameters , parameter variations).

is way this?

this "fluent builder" seems highly accepted "a way this" (at least based on number of articles , blog posts i've seen proselytizing idea).

what benefits?

each idea has own distinct advantages/benefits. example, see:


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -