Straightforward Application Configuration
The Traditional Approach
Requires a centralized configuration store to persist end-user settings and customize the application's look and behavior.
Most business applications need a way to store user settings like the width of grid columns, user filters and individual form layouts. You will often be asked to provide different view variants of the same data and provide separate settings for administrators versus end-users. You'll also need to provide an easy-to-use interface to manage all these settings at runtime. Though most controls provide methods to save and restore their layout, delivering all these unique requirements across multiple platforms requires lots of time and lots of code.
The XAF Advantage
An extensible multi layered Application Model that defines your application structure and associated behaviors with support for runtime end-user customization.
Application Model - a configuration store, allows developers, administrators and end-users to customize the application independently. Its format is neutral and allows you to perform platform-independent customizations. Moreover, an easy-to-use visual designer is included for both design time and runtime modification. As you will discover once you ship an XAF application, this feature helps reduce project maintenance costs, because you can outsource a big portion of configuration related responsibilities to admins, without the need to redeploy the project as a whole.
Application Configuration - How it Works
All the information that XAF uses to build user interfaces comes from the Application Model. For instance, when the framework creates a grid editor that displays a list of Contact objects, information for each column's visibility, location, caption and other settings are taken from the Application Model. When you run an application project (WinForms or ASP.NET), the Application Model is created and then used to create UI elements. The Application Model provides information on business classes, Controllers, Actions, Property Editors and other elements that provide or influence application functionality.
All the information loaded in the Application Model is represented as metadata - data defined in a neutral format that can be adapted to any target platform. As such, the Application Model represents one the mechanisms to enable UI-independent code to be used.
Initially, Application Model information is collected from code. You can customize and extend this information within your own XAF modules code. The resulting Application Model can be customized at design time via the Model Editor. The changes made at design time are saved to definition files. You can produce these files in any project in your application. For instance, you can make UI-specific changes by customizing the Model in appropriate UI-specific projects. Moreover, an application's administrator can invoke the Model Editor and make required changes as well. As a result, when the application runs, all the changes saved to definition files are applied to the Application Model in a specific order. The changes made by end-user can also be saved to a separate definition file. This file is read last when the application executes. The multi-layer structure of the Application Model allows a developer, application administrator and end-user to customize the application independently.
The Model Editor is a tool that runs directly inside Visual Studio or at runtime as a separate window, and allows you to edit model information.