Previous: Object Classes
Up: Object Classes
Next: Basic Terms
Previous Page: Object Classes
Next Page: Basic Terms

Why Object Oriented programming?

The concept of objects containing data is used in High Energy Physics for many years. Programs use banks to keep results of some calculations, the data are stored in histograms, ntuples, etc. Object oriented programming moves this technique one step further. Not only we keep data in named objects. We also make sure that the information about the operations on objects and even the instructions on how to fill the object with data is kept in the object's definition.

Traditionally - whether we used objects to keep data or not - the processing bewteen the raw data and the final result consisted of a series of sequential steps - each of them - like a filter - converting data from one form into another, often combining results from several earlier steps. As the experiments get larger, the collaborations get larger, the number of people who independently contribute to the final analysis gets larger - this process is becoming very complicated. Each step of the processing chain is dependent on other steps and very few of us have expert knowledge of details of more than a few of the steps. The result is that - as users of the software - we are often facing the situation where it is difficult to get the objects we want because they depend on other objects which require extra programs - which in turn depend on something else... and so on.

Object oriented programming goes some way to get this problem under control. By allowing objects to contain more information about themselves and providing a system capable of using this information - we should achieve the situation where the user will be able to request an object he/she wants - without worrying what other objects may be necessary in order to satisfy the request - and what other programs need to run.

Additional advantages of Object Oriented Programming are not less important in practice. The number of systems used to keep data is very large. We are faced all the time with a need to write interfaces between the systems. Object Oriented Programming provides a natural way of making such interfaces and making them transparent to the user. The object of class 'A' will then behave like any other object, although - behind the scene the interface 'A' has been called in order to convert the object from/to it's original form.

More obvious feature of Object Oriented Programs is the fact that the objects may have very different contents and structure and the operations on these very different objects may be handled in a simple and elegant way (for instance - displaying a histogram is a very different action from displaying a track - but sending a DISPLAY message to these two objects should produce the effect expected by the user)



Previous: Object Classes
Up: Object Classes
Next: Basic Terms
Previous Page: Object Classes
Next Page: Basic Terms

wwwd@na49
Fri Nov 4 23:36:02 MET 1994