next up previous index
Next: Window system Up: Miscellaneous Previous: Reflection   Index

Application hooks

In app.cecil:

abstract object generic_app;
The generic_app object is a place to put all default behavior that can be customized by individual applications.

concrete object app isa generic_app;
The app object can be referred to in libraries to get access to application-specific behavior.

Library code should add default behavior to generic_app, but send messages to app to access it.

Individual applications can then add objects *in between* app and generic_app, using extend declarations to add inheritance links. E.g.

concrete object my_app isa generic_app;
extend app isa my_app;
... lots of application-specific methods and fields specialized on my_app,
    in some cases overriding the default implementations on generic_app;

Less nicely, they could add methods directly on app itself, if they know that no later app will want to reuse this code but override some of it.


next up previous index
Next: Window system Up: Miscellaneous Previous: Reflection   Index

The Cecil project