CSC/ECE 517 Fall 2009/wiki3 ksm 6: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 3: Line 3:
='''Introduction'''=
='''Introduction'''=


A programmer, at the time of designing, usually is concerned about their behavior. But other aspects such as the availability of a particular object at the time when it is required also need to be considered. The rules of creation should be followed. Sometimes, the developers intermix the management of object creation with object instantiation. Using same code for object creation as well as object instantiation, can lead to complexity of code. It has to keep a track of object creation, construction parameters, as well as the use of those objects after creation. This leads to several consequences such as reducing coupling as well as selection of an instantiation scheme early. To address these issues, Factories are used which help to keep the objects cohesive, testable and decoupled. The design becomes flexible and the problem can be split into chunks of manageable pieces.


='''Overview'''=
='''Overview'''=

Revision as of 07:16, 15 November 2009

The Factory Design Pattern And Its Application

Introduction

A programmer, at the time of designing, usually is concerned about their behavior. But other aspects such as the availability of a particular object at the time when it is required also need to be considered. The rules of creation should be followed. Sometimes, the developers intermix the management of object creation with object instantiation. Using same code for object creation as well as object instantiation, can lead to complexity of code. It has to keep a track of object creation, construction parameters, as well as the use of those objects after creation. This leads to several consequences such as reducing coupling as well as selection of an instantiation scheme early. To address these issues, Factories are used which help to keep the objects cohesive, testable and decoupled. The design becomes flexible and the problem can be split into chunks of manageable pieces.

Overview

Features

Uses

Links

Factory method design pattern wikipedia

Advantages of Factory method

http://gsraj.tripod.com/design/creational/factory/factory.html