AppModule is a special module (or several modules) which purpose is to define and initialize the parameters of the XAF application.

AppModule is supposed to be included into those complex applications that include lots of modules coming from different providers. AppModule use based approach is a real benefit for experienced XAF developers.

Why AppModule?

When using a complex XAF application, it is often needed to host it in various environments: web application, win application, windows service, console app, DBUpdater.exe. In this case, it becomes extremely important to guarantee that all use cases refer to the identical configuration of the XAF application. This requirement should be fulfilled early to avoid possible fatal errors in the app and its DB.

Most common issues are listed below:

  • Unauthorized data access happens when different configurations of the XAF application have their own security system parameters.
  • Partial (with missing data) DB update appears if not all application modules are specified.
  • It may be hard to administrate the application which is already in use.

The problems mentioned above and many others can be easily avoided by configuring the application nowhere but in the AppModule. Further sections describe this concept deeper.

It worth mentioning that the AppModule use based approach is recommended but is not a must. The effective usage of this approach depends on the experience in XAF development along with deep understanding of the architecture and working principles of XAF applications.

More info on AppModule can be found in the next sections:

See also: