Configurable Profile Pattern

Also Known As: Deployment descriptor, externalized configuration

Context

 You would like to be able to configure the software system based on the needs of different users.  I imparts this is a form of personalization.  Each user time may have a personalized configuration, which is initialize whenever the user logs onto the system or attempts to utilize a specific service.  Often within the context of business lines in product lines, we encounter the situation in which a large company consists of a set of subsidiaries.  Each subsidiary will have its own unique way of doing business along the same general guidelines as its parent company.  In order to develop applications software for each business line or product line, it is often necessary to rewrite portions of the application based on a particular language, currency or other internationalization characteristics.  Another type of customization or personalization, pertains to that of security.  Each user within a particular geographical location for office branch, may have a set of rules assigned to them. These rules can be encrypted an externalized as a configuration profile.  They can also be stored in encrypted form, in a database management system.

 

Yet another form of personalization is that of a configurable profile.  Each user type will have a profile of its own. For example, institutional users will have a different profile the retail users of the loan origination system.

 

In the telecommunications example, each product line such as Wireless, wireline, DSL, etc., may have a different set of initialization characteristics that define the way they conduct business by sitting parameters of workflow, defaults, reference data, Security roles, options, etc.

 

You want to be able to define a new profile for each user tied without having to make changes to an existing program.  Therefore, often a set of options are externalized in the form of a properties file.

 

In the case of deploying Enterprise JavaBeans, the deployment descriptor is defined.  This is often an XML file, which contains information about locations of files, database connections, transaction isolation and other properties.  This is a configurable profile at the level of individual software components rather than the user type.

 

Problem

 How can we provide the ability to configure different user types or component types without making intrusive changes to program code?

 

Forces

·       Defined configuration parameters internally vs. externalization of configuration parameters: other general parameters that can be identified?  Is it worth externalizing a set of configuration parameters; or the likely to be changed often to accommodate new types of users?

·       Complex configuration profile vs. simple configuration profile: should we attempted to their size a set of configuration profiles and attributes whose values will be assigned based on user type?

 Solution

Start with externalizing a set of obviously changing parameters based on user types.  As the types of users change you can add new values to the attributes.  You can also add new attribute sand combination of valid values as the need arises.

 

Therefore, externalize the personalization attributes of the user tied and create a configurable profile.  Provide access to the configurable profile so that there will be no need to make direct modifications to program: in order to accommodate new types of users.

Consequences

Now you have a configurable profile.  The flexibility inherent in the configuration is based on your assessment of the needs of future users.  Thus, the flexibility in configuration is dependent on your predictions about future variations that are likely to come about.

 

You’ll know how to manage the potential growth of the configurable profile.  The configurable profile often has a language of its own, with its own grammar.  Therefore management of the grammar may pose a challenge for users programmers.  Alternatively, if you don’t have to change the grammar a lot, for using the configurable profile is straightforward.