What's New x06 | Xafari Framework

What’s New x06

Entity Factory

Entity Factory can be described as a model of the design and development of complex applications. It includes rules, agreements and recommendations on the design, as well as a library of base classes and extension methods of XAF components.

The basic concepts are Entity and Entity Extension. The main idea of Entity Factory is the way of adding new fields to application Entities. The classical approach to this problem in object-oriented programming (OOP) is inheritance, i.e. Extension inherit from Entity. Entity Factory solves this problem by association: add to Entity association to the Extension.

The use of Domain Components allows you to include the whole Extension in the Entity object without any additional constructions.

Inheritance implies such an unpleasant consequence, as the emergence of new types (business-objects) in application. Using Entity Factory allows you to get rid of such effects.

While using object-oriented programming (OOP), the original purpose "Extend the Entity" is achieved through the creation of a "new Entity". In this sense, the new class is a consequence of using the chosen technology, so it can be called "technological".

Entity Factory clearly distinguishes between business Entities and their Extensions. . Extension is only an Extension and not an Entity which was extended. Therefore, the "technological" business objects are missing in the application.

Entity Factory allows you to create any combination of the available set of Extensions that may be required to the client. In doing so, conflicts of sharing "parallel" Extensions that appear when using inheritance are ultimately excluded.

Console Application

When operating the enterprise system there are a number of tasks such as data import (or export) or batch report generation, which must be performed in an automatic, batch mode, perhaps according to schedule. Interaction with the user in such cases is minimal or non-existent.

To solve this class of problems Xafari presents lightweight console application RunCmd.exe. It requires only those modules that is required to solve the given problem. Command line interface provides a way to specify commands and set parameters.

Developers implements commands within the XAF module. To support the console command infrastructure in the module, the developer must inherit from special classes and implement certain interfaces of the Xafari.Commands namespace (in Xafari.dll).

Xafari framework supplies ready to use commands to start Business Operation, to drop deleted objects from database, to import and export data, to create report.

Visual Studio Templates

Xafari templates gallery intended for quick and flexible development of custom applications.


Xafari Audit module allows to log all changes to the data, call Actions and Business Operations facts. Compared with the DevExpress.AuditTrail module, Xafari Audit has a flexible configuration and, more importantly, has a higher performance and stability of massive changes of objects (more than 1000 objects in the transaction).

XafariAudit logs the following events:

  • Delete, create and modify objects, its fields and collections.
  • Execute of Business Operations (context-dependent and context-agnostic), rollback of Business Operations
  • Execute of Actions (context-dependent and context-agnostic)
  • Create Reports
  • Logon and logoff

The first version of the module performs audit at the database level using triggers.

It provides high performance on large amounts of data and transactions.


Branches intended to partially isolate data from various organizational structures. Using of this module allows you to transparently automate the holding type company. Data isolation with using Branches module provides following features:

User can to receive the consolidated statements for the corporation as a whole and group and filter data in the context of branches.

Administrator can effectively control the access permissions to information. All information stored in a single database. Each branch has full access to their own data. Access to data of other branches are regulated in accordance with the rules and permissions. Unauthorized access to information from branches excluded.

Message Queue

Message Queue binds independent application to the remote service, it enables them to work together. Applications can generate various types of messages for various services, services handled the message and returns a result to the application. This scheme allows you to transfer responsibility for the business logic from the application to the service, it reduces the time and resources consumed by the application.

All messages are stored in the same database, which works with the application. Messages differs by type. Messages are processed asynchronously on the server side.

Xafari Server

This component is used for queue monitoring and distributing messages to specified handlers. Xafari Server works async like Xaf application. During operation, it selects required messages, blocks and sends them to corresponding handlers.

Xafari Server has own security provider, which provides an environment for message processing and async interaction with database via connection pool.

Xafari Server can work parallel with main application in own thread. It can use a local queue to store messages or keep them on server. When local queue is used, all messages will deleted after closing main application. When server is used, all messages will be stored on it.

Xafari Reports

Xafari Reports is a new reporting system for the XAF applications, it expands XAF reports functionality. Xafari Reports system allows to create reports based on the several business objects with complex data structure and many calculated properties. Xafari Reports supports a sets of parameters, you can store this sets and reuse it later. The developer can implement an arbitrary algorithm to generate a report.

Xafari Reports allow to define multiple reports representations (printed reports, graphs, pivot table, upload a file, and so on.). The decision in what form obtain the report, takes the user.


In the case of application development for various platforms (Web, Win, Console, etc.), XAF technology creates some inconvenience when designing modules. Typically, the basis of the application is a specific set of platform-independent modules. This set of modules is the same for all platforms,it will expand by certain platform-specific libraries and settings in each platform-dependent module. In the case of standard XAF application, all the basic modules and settings need to add and initialize in each platform-dependent module.

AppModule allocates platform independent libraries and settings in a separate module. Now when designing platform-dependent module is enough to add customized AppModule, rather than duplicate the entire set of core libraries and settings.


XAF supports applications development based on Win and Web platforms. In addition to them Xafari provides ability to create XAF application based on ASP.NET MVC technology. Xafari x07 includes Code Preview version with limitations on the possibilities in comparison with Web-platform.

In general, the concept of building an application is stored and is based on the similarity of Web-platform. Principles of implementation XAF application has not changed. Thus was implemented a completely new mechanism for the generation of html-code, based on the principles of ASP.NET MVC.

There are results of the first comparative benchmarks between standard Web and MVC applications: MVC-application runs 30 percent faster.

To see examples of the MVC-applications refer to the Demos page.

Task List

This module provides opportunity for creating list of task for participant and for their execution. The main requirement when creating the module is comfortable work with list of task for end-user, for this purpose we created intuitive and lightweight forms adapted for different goals.

This module is designed to meet needs of applied projects, i.e. it is fairly universal and flexible for deciding the most of applied tasks, for this also has special API. Docflow module works with use Task List module since x06 version.