1. The idea
1.1 Graphical representation of a program
1.2 A flat view ?
1.3 A dead end
1.4 Cheating ?
1.4.1 Adding functionality
1.4.2 Object orientation
1.4.3 Fiddling with function pointers
1.5 Context oriented programming
1.5.1 Sharing information within a level
1.5.2 Calling a function from a lower level
1.5.3 Definition of a level or a tree
2. Building blocks
3. Reusing modules in different context
Top Up
Prec

1.4.2 Object orientation

Next

This is a nice solution, powerful and flexible, yet a little expensive to use. Do not get me wrong here. OO (Object Orientation) is important (And I am using it every day and will continue).

The question with OO is not "May I express this solution using OO ?". Sure you can. The question is "Is this efficient ?". We are not talking about runtime efficiency. Oversimplifying one can say that if using OO to solve a given problem, we need more line to sub-class a generic class than the class itself, we are not winning.

Sub-classing introduce a lot of back and forth in the code. We have to create a new classes and defines various member functions and so on. Then in our application (lower in the source code if the new class is small), we use the new class instead of the generic one.

OO has been very successful in project with lots of little variations like widget sets for example. It is also very useful to make some components much more easier to use: You create the object, call various methods and destroy the object when you are done and you do not care about all the initialisation details.

When you move to the left of the graph, resuable OO framework are more difficult to express.

Top Up
Prec

Next
One big HTML document