THE NEED FOR CONFIGURATION

A very simple application performs a well-defined task that changes minimally over time. You may not need to configure such an application for different circumstances.

More complex applications, however, must be configured to meet different conditions. For example, the application might display different data for different kinds of users (such as data-entry clerks, supervisors, managers, and developers). Similarly, you might configure an application for various levels of support. You might have different configurations for trial, basic, professional, and enterprise versions.

The application may also need to save state information between sessions. It might remember the types of forms that were last running, their positions, and their contents. The next time the program runs, it can restore those forms so the user can get back to work as quickly as possible.

The .NET Framework provides many tools for storing and using application configuration and resource information. This chapter describes some of these tools. It starts by describing the My namespace that was invented to make these tools easier to find. It then tells how an application can use environment variables, the registry, configuration files, resource files, and the Application object to save and restore configuration information.

This chapter does not explain how to work with disk files more directly. Databases, XML files, text files, and other disk files are generally intended for storage of larger amounts of data, rather than simple configuration and resource information. Those topics are described more thoroughly in Chapters 19, “Database Controls and Objects,” and 30, “Filesystem Objects.”

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

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