I never really focused much on the Green concepts. People are being made aware on the environmental impacts with plastics, batteries, hazardous material usage. But I didnt really look into any of this and contribute to the Green movement.
As a new year resolution, I am planning to increase my understanding on the Green effect and take an active role in spreading the news.
How does batteries or Lithium cells affect the environment ?
It appears batteries release magnesium and zinc into the landfills which can effect the aquatic life. So use the local recycle centers to recyle the batteries. You should not mix these with the regular garbage.
Tuesday, January 10, 2012
Where to use a Builder pattern
The big difference between Builder pattern and Abstract factory pattern is that the builder pattern doesnt immediately return a complete product in a single call.
The Director uses various building blocks of the builder and builds the product. The director is responsible to call the builds of the components.
A good doc on this can be found in the below link.
http://en.wikipedia.org/wiki/Builder_pattern
The builder pattern can be used where the complete product cannot be built at one shot. For example consider a FeedBuilder which builds feed of a specific data. The raw data records is transformed into a flat file. The raw data records are added into the FeedBuilder as data is processed. Finally when all the data is added into the FeedBuilder, the Feed reference is obtained from the FeedBuilder by the Director.
The Director uses various building blocks of the builder and builds the product. The director is responsible to call the builds of the components.
A good doc on this can be found in the below link.
http://en.wikipedia.org/wiki/Builder_pattern
The builder pattern can be used where the complete product cannot be built at one shot. For example consider a FeedBuilder which builds feed of a specific data. The raw data records is transformed into a flat file. The raw data records are added into the FeedBuilder as data is processed. Finally when all the data is added into the FeedBuilder, the Feed reference is obtained from the FeedBuilder by the Director.
Subscribe to:
Posts (Atom)