1. Introduction

1.1 What is Application Configuration Data?

As a developer you deal with application configuration data all of the time.  Common examples of this are INI files, XML files, .NET configuration files (aka “.config”), the Windows registry, and command line (argv) arguments.  The advantages of configuration files are that they load quickly, do not take up a lot of space, and are easy to edit. 

1.2 The Problem

Attempts to create configuration file access schemes do not satisfy the needs of either programmers or end-users.  To give a real life scenario I worked for an organization that configured their original programs using the Windows registry API (Application Programming Interface).  Later on they developed their own ASP configuration class.  At about the same time another group developed an API that fetched the data from a database.   Then when ASP.NET came along they started to use Web.config.  In a matter of several years the number of configuration data sources grew from one to four!  Needless to say getting configuration data often became a grueling task.  Here are the three major areas where configuration management can be improved:

1.3 Introducing Nini

Nini is an uncommonly powerful .NET configuration library designed to help build highly configurable applications quickly. Nini provides a solution that attempts to eliminate the above problems. It provides a large feature set that gives you functionality that you will use in every phase of your project, from concept to mature product.  This is accomplished through a simple, yet flexible, API that provides an abstraction over the underlying configuration sources.  It solves all of the problems that I described above.  We’ll see how this is done in the examples below.