Monday, 29 October 2012

Data Centric Analysing in Object Oriented Design

As Object Oriented Design name suggested, OOD made a large step to encourage system to be built by focusing on the object itself as compared to her predecessor, Procedural Programming. Data oriented intention is important in today's world of object oriented programming. Data oriented refers to action initiated by data/ object instead of action or processes.

Why data centric programming is encouraged than common procedural programming? Due to the new development of system design and development, we realize the importance of data and the state of the data in the system data flow. Data is important to the extend that it will impact the system behavior. Any unwanted state of data may result in unwanted system behavior.

Let's look into a real life example; in an Apple Juice processing plant, apple is considered data, the plant refers to processes and the Apple Juice will be the output. In Procedural Programming, focus is hover on the processes involved in processing the fruit into the required juice. Though, less attention is given to the data. While this may well argued that, a good processes will ensure good output and efficient processing, we have missed out other bigger possibilities. 

Imagine if the apple feed into the system consist of rotten apple, what will be the quality of the produced Apple Juice? Alright, you can answer yourself. Or, what if any debris or external unwanted input comes along the way during the processing flow? Let say, a fly is drowned among the apples, or some nails are being processed along. What will be the desired output? Or will those unwanted items clog down the whole processing plant?

The above example is a simple example how we should look into problem domain in Object Oriented Design. Initial planning in OOD will always kick off with identifying objects in the problem domain, following the data and later, only by operation. By identifying our objects and data, we are open to any possibilities of action. Back to the above example, the processing plant may need apple to produce Apple Juice. The main question is, where and how to get the apple? OOD provides a wider selection of alternative for this question. You should know the reason behind.

Thus, rather than limiting our design in Procedural Programming, we should have to focus more on important segment of the system which will be the data from the objects. Rather than allowing action to process our data, we should be now focus on data to decide on processes to be executed as claimed. 

No comments:

Post a Comment