views:

20

answers:

1

One way to develop a large, versatile system is with the use of parameters. The user defines a large number of parameters and the system behaves accordingly.

I guess the advantage is that the system can do lots of things, according to the values of the parameters. The disadvantage is that the system becomes more vulnerable when the number of parameters increase.

Are there any other better methods?

A: 

There are many other alternatives. A quite common model is to define and implement a Domain Specific Language. This doesn't restrict the user to provide large sets of numbers. Instead he tailors the system by writing a few simple rules.

As an example of such a Domain Specific Language, many mail programs allow users to define Inbox sorting rules. The language used for such a rule is domain specific: it's specific to processing mail messages.

Another extension mechanism is the use of a plugin architecture. The main application defines a specific interface for loadable modules, and calls these modules when some specific processing is needed. As these plugin modules aren't predefined, just their interface, it becomes possible to develop new plugins even after the original program is released, even by different programmers.

MSalters

related questions