Monday, August 4, 2008

Module-Oriented development


One of the most important aspects of the development process is the flexibility. Most developers think, that flexibility is also affects to the core of the process, but that also affects the UI of the application.
There are situations, which in some parts (modules) of the application UI stop responding, and all the other UI elements stop responding because of that.
This is just an example, when we need module-oriented development as the main idea for whole the development process.
Let's start from a simple example. So we have a UI application. First of all we can define virtual blocks of UI, each of which should represent a module. For example, let's suppose we should have a search part and toolbar part on the GUI. But our application should not contain all that stuff in it. Each part should be represented by a module. So we should have a Search Module, and a Toolbar Module. Each module should be represented by a separete assembly.
And our application should have a configuration file (xml), where it should keep paths for all installed modules. When it should start, it should just go through the records in the config file. For each module it should give a GUI container, where each module muust be drawn.
During the initialization the application should initialize all the modules first and then start. Using this approach should give us ability to connect different parts of our GUI to different assemlyies. So if for exampl we have not some assemly, it should just not load. This also gives the main application ability to control all the modules work, by giving them appropriate security rules.
Also we should be able to unload the modules, which work bad, during runtime and be error - free.
To gain this, we must define an interface, which should be implemented by each Module. The application should work only with the interface for modules.

The module-oriented development applies not only to GUI applications, but to any type of applications, which cann be represented as multi-module structure.
Post a Comment