Component-based software engineering

I am a big supporter of Component-based software engineering.

When everything is a component you can remove any of its components without any problem and the application continues working but without that component. It is always a very good idea to componentize your application to clean the code and make it easier to read and modify.

In GLib you must always make your objects throw signals instead of calling other objects methods. This way you can remove any other object and have you component still working.

Using the GObject system of GLib is quite easy and efficient to make components encapsulated and reusable.
In Java you have Observer/Observable and OSGi.

No comments: