Configuration, J2EE Tongtian Tower's Chaotic Source

zhaozj2021-02-08  322

The way the Java application gets configuring information can be described as taunt, the arrangement of the configuration file is not a case, and everyone may have its own habitual practice of reading / writing configuration information. "If the application architecture is Babji Tower, the configuration is to let Babel Tower project in a chaotic 'language'."

------------

IF Architecture Were to Be The Tower of Babel, Configuration Is Its Language

Satya Komatineni

(November 25, 2003 7:37 AM PT)

»

Permalink

As the story goes God devised multiple languages ​​so that men can not build sturctures that span to the heavens. In our small world of programming architectures the men and women of the world are quite busy (with out much help from any Overseer) constructing a Confusion of their own. The name of this confusion is called "configuration".

The larger and more complex an architecture is the simpler its constituents need be. That means the key for complex programs are pluggable parts or pluggable functionality at run time. Almost like a self-evolving system. The key to accomplishing such a composition is configuration. WE Seem to Invent For Every Configuration NEED A DIFFERENT Configuration API.

Sometimes configuration is read from properties files. Some times from XML files. Sometimes from System.properties. Sometimes passed in as a properties object. Sometimes read from multiple config files. Sometimes libraries use a different confgiuration than applications.

SUCH DIVERSITY OF Configurations Exists Because It is fairly easy to read configuration at run time. So it is left to the individual programs and company.

But I am realizing more and more that it is the configuration that holds an architecture together. When there all the parts and containers use the same understanding of a configuration then it is lot more easier to integrate parts from varieties of sources and manage them well. The key to this understanding is to arrive at a unified abstraction for configuration that is based on the "structure" of the data rather than the form. This insight is as important as knowing the difference between XML and an InfoSet.Once the configuration is perceived as a hierarchical set of data nodes that are not tied to implementation, then it offers a great flexibility to know that every component and part in an application can use the simplest of the APIs to realize their configuration needs. Having an interface to configuration is very Important As All The Components of An Application, Including The Container CAN Use The Same API.

You might parallel this to a windows Registry. It is subtly diffrent from a windows Registry. Befor going there let me say the only good thing this common I can say about windows Registry. Registry allowed "COM" components to succeed and florish. With out understanding it would have been difficult to accomplish to interoperate. Now the problem with Registry is not because it is one big blog, but because it is not an interface. Had that been an interface, application would have been able to pick and choose where to Keep Their OWN Configuration WITHOUT INTERFERING WITH The REST. The Second Improvement is this interface Needs to beall.

Some of these Aspects Are Discussed in Greater Detail At The Following Article At The Following O'Reilly Link

A Simplified Configuration Service

转载请注明原文地址:https://www.9cbs.com/read-726.html

New Post(0)