Modules
- 9 minutes to read
XAF modules are similar to standard Class Library projects. The difference is that each module project contains a class that inherits ModuleBase. The presence of such a class allows the XAF core code to distinguish modules from regular .NET assemblies.
XAF-specific classes declared within modules are collected automatically (using reflection) and utilized in automatic UI generation. For instance, if you declare a Controller descendant within a module, an XAF application will create it in each Frame. This allows you to implement custom code to be executed when the Controller is activated (see Controllers).
#Create a Custom Module
You are not limited to three modules per solution. Generally, you may implement one custom feature per module. You can also reuse custom modules in other XAF applications. To create a new module, follow the steps below.
Right-click the application solution’s root node and select Add | New Project… in the invoked context menu.
- In the Add New Project dialog, select the DevExpress v24.1 XAF Template Gallery template and click Next.
- Specify the new module’s name and click Create.
- In the next window, click Run Wizard.
Choose the Reusable Module Library option in the Solution Wizard and click Finish.
Choose the ORM library.
Tip
For additional information on how to choose an ORM that suits your needs, refer to the following topic: Why We Recommend EF Core over XPO for New Development.
Add a reference to the newly added module to the existing module or application project as described in the Ways to Register a Module topic.
You can also convert an existing Class Library into a module by defining a ModuleBase class descendant in it. For this, take the Module.cs (Module.vb) file from an existing module as a prototype. Rename the class and set the correct namespace.
Important
- Inheritance from modules is not recommended. The Module
Base class descendants should be sealed (NotInheritable in VB).
#Modules Shipped With XAF
One of the XAF concepts is to use modules (class libraries containing a ModuleBase descendant) to introduce additional Controllers, Actions, List Editors, View Items, Application Model nodes and properties. A module can be considered a ready-to-use package for a certain feature that can be easily enabled when creating an XAF application in the Solution Wizard. In an existing application, additional modules can be added using Application Builders (for .NET) and Toolbox in the Module Designer or Application Designer (for all .NET versions). Topics in this section contain detailed information on each built-in XAF module, module components and ways to use and customize them.
The Audit Trail module is intended to supply information on changes that are being made to the application’s data. You can retrieve information on the kind of change (object is created, changed, etc.), who made this change, with what object, the previous and new property values, and so much more. A change is registered between two sequential events that save the object to a data storage.
Supported platforms: ASP.
| |
Exposes UI settings (class images, List View column arrangements, and Detail View layouts) for built-in business objects from the Business Class Library.
Supported platforms: ASP.
| |
Introduces List Editors that allow you to visualize data using the Win
Supported platforms: ASP.
| |
Allows end users to quickly create similar business objects by copying an existing object and changing the required property values. For this purpose, this module has the Clone
Supported platforms: ASP.
| |
Allows you to configure a user interface dynamically. UI customizations are performed on the basis of predefined business rules for control color highlighting, changing availability and visibility, font style, etc. In addition, you can define or modify these rules at runtime without recompiling your application.
Supported platforms: ASP.
| |
Integrates DevExpress Dashboard controls into XAF applications. Allows users to create dashboards at runtime and persist them in the application database.
Supported platforms: ASP.
| |
Supplies Property Editors and Controllers that allow users to attach files to business objects using properties of the file data type.
Supported platforms: ASP.
| |
Introduces the support of Key Performance Indicators (KPI) - quantitative measurements of dynamic business processes. For instance, an important performance indicator for a trading company might be daily sales, and for a team of developers it might be the number of active bugs in their product. For better visualization, KPI value ranges can be split into a “green zone” (everything is OK), a “yellow zone” (warning), and a “red zone” (things are problematic). When KPI are based on a time range, they can be useful to compare values of different periods (for instance, the current month versus the previous month). If a deeper analysis (drilldown) is required, then the objects from which an indicator was calculated can be listed.
Supported platforms: Windows Forms, ASP.
| |
Introduces List and Property Editors intended to display business objects on a map.
Supported platforms: ASP.
| |
Supports implementation of a multi-tenant or Saa
Supported platforms: ASP.
| |
Displays reminders for scheduler appointments or any custom business object in Windows Forms and ASP.
Supported platforms: ASP.
| |
The Office Module integrates the following DevExpress controls:
Supported platforms: ASP.
| |
Allows users to analyze application data using pivot grid and chart controls in Windows Forms and ASP.
Supported platforms: ASP.
| |
Introduces List Editors that allow you to analyze data using the Pivot
Supported platforms: ASP.
| |
Integrates the DevExpress Reporting components into XAF applications. Creates a user interface for designing, viewing, and printing reports. Both user-defined and built-in reports are represented by business objects that are stored with other persistent objects in the application database.
Supported platforms: ASP.
| |
Introduces List Editors that integrate the Blazor Scheduler, Win
Supported platforms: ASP.
| |
Supplies a script recorder that records the actions you perform on a UI and saves them to an Easy
Supported platforms: Windows Forms, ASP.
| |
Supplies a user interface for state transition management for business objects that have certain states (for example, the
Supported platforms: ASP.
| |
Supplies List Editors that integrate Win
Supported platforms: ASP.
| |
Allows you to validate user input based on business rules declared in code, at design time, or at runtime.
Supported platforms: ASP.
| |
Allows you to keep several predefined variants of a View layout in the Application Model and includes an option to switch between these variants at runtime.
Supported platforms: ASP.
| |
Integrates Windows Workflow Foundation (WF) 4.
Supported platforms: Windows Forms, ASP. |
Tip
Certain features (marked with an asterisk (*) above) require custom-tailored solutions with DevExpress UI components. We demonstrated many of these solutions in our Outlook Inspired Demo. For more information, refer to the following topic: Integrate Custom UI Components.
To get more ready-to-use modules, see XAF Community Extensions.
#System Module
Any XAF application includes a System Module. This module cannot be disabled, since it supplies a certain basic functionality required in all applications. The System Module enables the following functionality: