Creating a shared configuration

When we look at module design considerations in Chapter 19, Module and Package Design, we'll see how a module conforms to the Singleton design pattern. This means that we can import a module only once, and the single instance is shared.

Because of this, it's often necessary to define a configuration in a distinct module and import it. This allows separate modules to share a common configuration. Each module will import the shared configuration module; the configuration module will locate the configuration file(s) and create the actual configuration objects.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset