Business Components

Xafari Framework business components offer additional options for DevExpress XAF applications development and are included in Xafari Business subscription

Below is the list of the main business components. You can find the complete list in the documentation.

Object Status

Object Status business component shows if the object is ready for usage. There are the following statuses:

  • Draft – the object is being edited.
  • Published – the object has been edited, it can be used.
  • Archive – the object is obsolete.

When objects with status are displayed, the List View shows the following Actions:

  • Show draft – activate/deactivate the display of draft objects.
  • Show archive – activate/deactivate the display of obsolete objects.
  • Status – choose another status.

Detail View also contains Actions that allow changing the Status. Object Status is implemented for XPO and DC objects.

Windows Forms:
Object status windows forms

ASP.Net:

object_status_2

To start working with Object Status, please refer to the documentation.

Hierarchical Data

IHierarchyNode is an alternative to ITreeNode. ITreeNode is a very abstract description of hierarchical data and does not take into account the specifics of the hierarchy implementation. Therefore, it can operate efficiently only with small hierarchical data volume (less than 1000 objects).

IHierarchyNode is specially designed to process parent-child relationship with maximum efficiency. It allows implementing several hierarchies and switching to the representation of hierarchical data on List View. There is also an option to manage the removal strategy of subordinate (children) nodes. The following removal methods may be defined:

  • delete the object and all references to the object; as a result, all child elements of the object become root elements.
  • all child elements move up by one position in the hierarchy and end up in the parent's position when the node is deleted.
  • deleting the object and all of its child objects.

There are special List Editors that display the data implemented with IHierarchiNode: ASPxXafariTreeListEditor, ASPxHierarchyNodeListEditor, ASPxExplorerListEditor, XafariTreeListEditor, WinHierarchyNodeListEditor, WinExplorerListEditor.

For more information about the Hierarchical data, please refer to the documentation.

Multiple Selection

Multiple Selection component is intended to create, edit and store the sets of selected objects and uses these sets for building effective database queries. DevExpress XAF also offers a solution to these problems, but it leads to unnecessary complication of the data model in the application due to the creation of individual persistent collections with special persistent objects.

Xafari Framework delivers a comprehensive solution with fixed database structure. It does not need to add new persistent objects. Also, this solution allows developers to create efficient queries to the database without any additional coding. Multiple Selection includes:

  • Persistent objects to store references to selected objects.
  • A special ObjectSet class to implement a set of selected objects. It allows to specify the IDs of the individual objects or to select them by criteria.
  • A special editor to work with ObjectSet. It allows to specify certain objects or to use criteria.
  • CustomFunction to construct efficient queries in the database that contain one or more filters based on sets.

Multiple Selection is implemented for MSSQL and Oracle.

For more information about the Multiple Selection, please refer to the documentation.

Xafari Security

Xafari Security Module supports all basic DevExpress XAF Security features and provides a variety of additional functions and technologies. It includes:

  • Xafari Authentication, which is a new form of user authentication. It allows the user to choose the authentication method: Windows or standard.
  • DC-based Security System implements data model according to the Domain Components technology. The data schema repeats the standard XPO model and is very popular in DC based applications. DC-based Security System interacts well with eXtensions Framework.
  • Extra Permissions. ActionPermission regulates user access to the Action execution. NavigationPermission regulates user access to Navigation Items.

Xafari Security

For more information about the Xafari Security, please refer to the documentation.

Extensions Framework

eXtensions Framework can be described as a sample for complex applications design and development. It includes rules, agreements, and recommendations on the design, as well as a library of base classes and extension methods of DevExpress XAF components.

Simple and clear data business-model.

The basic concepts are Entity and Entity Extension. The main idea of eXtensions Framework 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 inherits from Entity. eXtensions Framework solves this problem inside the Entity by adding a necessary association to the Extension.

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

There are no extra “technological” business objects.

Inheritance implies such an unpleasant consequence as the emergence of new types (business-objects) in the application. The eXtensions Framework helps get rid of such effects. While using object-oriented programming (OOP), the original goal "Extend the Entity" is achieved through the creation of a new Entity. In this case, the emerged class is a consequence of the chosen technology, so it can be called a "technological" object. eXtensions Framework clearly distinguishes between business Entities and their Extensions. An extension is only an Extension and not an Entity which is extended. Therefore, the "technological" business objects are missing in the application.

The modular strategy of extending the data model.

eXtensions Framework allows creating any required combination of modules from the available set of Extensions. In doing so, conflicts of sharing "parallel" Extensions appearing when using inheritance are completely excluded.

Extensions Framework XF

For more information about the Extensions Framework (XF), please refer to the How to Design Complex Systems post.

Logic Controllers

There is a known problem in XAF associated with the decline in application performance when using a large number of controllers. LogicControllers are a way to implement the business logic of the application that helps reduce the large number of controllers in the application without functionality gaps. The basis of this techniqe is the LogicController class. It is similar to ViewController and can be used instead of the ViewController. LogicControllers refers only to a particular type of business object and it initializes only on View for this business object. LogicControllers are not descendants from Controller, therefore View will be accompanied only by those LogicControllers that refer to the specific type.

Read more about LogicControllers in our Logic Controller post and the documentation.

Bulk Edit

Xafari platform provides the feature allowing to edit groups of objects in the List View. Such functionality is required when a property should have the same value in a number of objects. The user can select the objects and edit the property once for the entire group. A special editor, which is displayed in a Dock Panel, is used to edit the common values.

Windows Forms:

Xafari Bulk Edit

ASP.NET:

group_edit_01

For more information about the Bulk Edit, please refer to the documentation.

Business Numerators

When a new persistent object is created, the Business Numerator component allows to automatically set its properties by sequential numbering. Numerators provide the following main features:

  • The developer can set start value and step for the numerator index.
  • Ability to create templates which get their values by the numerator depending on the index.
  • Through Numeration. It can be used for sequential enumeration of objects of different types. For example, one sequence of numbers can be used for all outgoing documents, such as waybills, pay sheets, etc.
  • Possibility to reuse the numbers of deleted objects. It means that all numbers of the numerator will be used. If an object is deleted, its number does not disappear. It is used again in the next call of the numerator service.
  • Support batch processing of documents.

Numerators are implemented for XPO and DC objects.

Win:
Xafari buisness numerators

Web:
numerator_2

For more information about the Business Numerators refer to the documentation.

Index Numerator

Index Numerator is a special mechanism for sequential numbering objects in the context of their owner. Unlike Business Numerators, Index Numerators are used for Int32 properties. Index Numerator is used when there is a need to assign sequential numbers to objects in different documents, objects in hierarchy levels (figure below), etc.

Xafari Index Numerator

Index Numerator supports DevExpress XAF ModuleUpdater component, direct queries to the database, and provides an API for moving objects to different positions and automatically recalculate numbers. Read more about Index Numerator in the documentation.

Extra Categories

The Extra Categories component allows classifying the data in the list. It filters the data based on the selected referenced object. Categories are implemented as Dock Panels displaying the list of referenced objects. Categories can be activated and customized in both the Application Model and the code. Categories are implemented for Win, Web, and MVC.

For more information about the Extra Categories, please refer to the documentation.

Managed Operations

The Managed Operations module allows the end user to control the start and running of any method in the XAF application. Managed Operations displays the method execution process in a special View. The user can interrupt, suspend, or resume the process. It is possible to monitor several parallel processes. The launch of the managed operation is logged, the information can be stored in a database. Managed Operations offers various ways to implement the execution of the application method depending on the end user’s needs. The key features of the service are listed as follows:

  • Synchronous and asynchronous Managed Operations
  • Three ways to display synchronous Managed Operation: progress in percentage, infinite loop, stages.
  • Global and local Managed Operations
  • Subprocesses
  • Unique Managed Operations
  • Logging
  • Special Dock Panel to administrate and monitor

Managed Operations are implemented for Win, Web, and MVC.

Xafari Managed Operations

For more information about the Managed Operations, please refer to the documentation.

Dynamic Properties

Dynamic Properties are additional properties of the business object intended for storing and processing additional data not provided by the standard application configurations. Xafari provides base classes to implement Dynamic Properties. It should be noted that DevExpress has a component called Custom Field that has a similar functionality. However, there is a significant difference: the Dynamic Properties exist only for the object instance, so two objects of the same type may have different Dynamic Properties. To display Dynamic Properties, it is recommended to use special editors, such as VerticalGridPropertyEditor. Dynamic Properties functionality is implemented for XPO and DC objects.

Read more in the documentation.

Application Settings

Application Settings is a business component used for centralized management of complex enterprise application. Technically, it is a set of global stored variables. Application Settings Module provides the infrastructure needed to support all settings with different types (including persistent) implemented in various modules. Application Settings module provides the following main options:

  • The developer can implement separate Settings or Settings groups in a hierarchical structure.
  • An approach similar to the extension of the Application Model when implementing Settings structure.
  • Each module can contain its own Settings. After adding the module to the application, these Settings are integrated into the overall Settings system.
  • The possibility to define several layers of Setting values. The values of the subsequent layer override the previous layer. The same principle works in the layers of Application Model.
  • A separate layer of system Settings.
  • The possibility to define user Settings layer.
  • Access to Settings regulated Security System.
  • The client can convert Settings when updating the versions of the application.
  • A special API to process Settings in the code.

Application Settings are implemented for Win, Web, and MVC.

Windows Forms:

Xafari Application Settings

ASP.NET:

application_settings_2

For more information about the Application Settings, please refer to the documentation.

Data Versioning

Enterprise application data undergoes substantial changes as time passes. After the object is created, it can be changed many times or even deleted later. Meanwhile, the object can be a member of various business processes, the object's data can be used for creating reports, or it can be analyzed in other components. In connection with these processes, it can be important to have a method for observing the state of the analyzed object any time. The data version control module (also called Versioning) is intended exactly for this purpose. Data Versioning means the ability to associate the current business object state with the point in time, and the ability to access the object state (i.e. version) for the specified point in time. Version control systems, such as SVN, TFS, and others face similar tasks.

The support of business objects versioning is based on the following concepts:

  • The support of versions is only available for the business objects implemented using the Domain Components.
  • The Domain Component of the business object is used for storing versions of the business object.
  • VersionId property exposes for business objects with the version control. The property stores the same value for all versions of a business object.
  • Compulsory usage of calculated properties and VersionId property to refer to business objects with version control.

The following operations with object versions are available:

  • Save the newest version of the object (Save as new version).
  • Get the last version of the business object (Get Latest Version).
  • Get the specific version of the business object for the specified date and time.
  • View the object change history (Show history).

Set the current date for operations with versions.

Windows Forms:
Xafari Data Versioning

ASP.NET:
data_versioning_2

For more information about the Data Versioning, please refer to the documentation.

Work Places

Work Places is a flexible and effective option for configuring the UI of the XAF application according to individual user demands and requirements. One user may have several Work Places. The method of configuring user's Work Places is based on the idea of using additional layers of Application Model. Additional intermediate layer allowing to configure Work Places is introduced in Application Model. Each user of the system can have the access to multiple Work Place configurations. In their turn, all changes made by users are stored separately in the Model for each user and particular Work Place. To associate the user with an appropriate Work Place, an additional role in the security system should be created by the developer. This fictitious role is intended to access the Work Place without any extra permissions. The name of the Work Place must comply with the name of the created role. Work Places are stored in the .xafml file. If the file name complies with the Role name, then the user gets access to the Work Place. There is a special tool Xafari.Workplace.ModelEditor.exe to create and edit Work Places.

Xafari Work Places

For more information about the Work Places, please refer to the Work Places post.

Data Management (Import/Export)

Xafari Data Module provides options to import and export data to/from a XAF application. It is used in cases you need to:

  • Initially import the data into the application
  • Integrate the application with an external system
  • Update the application to a newer version (data migration), etc.

Xafari Data supports several types of data sources (Access, XML, CSV, Excel, etc.). The principle of extensibility allows implementing individual data sources.

The module describes the architecture of the solution and contains components that support all current scenarios of our customers. If this is not enough, the developer can implement its own specific components.

xafari_data_1

Read more about Xafari Data Management in the documentation.

Business Operations

Business Operations component is intended to transform the input data into the output data. Some Business Operations can perform complex calculations with subsequent changes of the business objects state, i.e. they can modify the application data. Other Business Operations work in read-only mode: they obtain the input parameters and the application data and return results. Some examples of Business Operations are:

  • the payroll process,
  • the formation of the invoice on the basis of contracts,
  • obtaining a price list,
  • MRP procedure and so on.

Each Business Operation is an integral part of the subsystem interaction interface. They also have a special mechanism to override their implementation without recompiling the code, thus they can be used as the points of the final application configuration. Business Operations are used to maintain compatibility between different versions of the subsystems. Business Operation can be executed either independently or in the context of a certain object. Context-dependent Business Operation uses the data of the business object, in the context of which they are started. Independent Business Operations work without taking any context into account.

Win:
Xafari Business Operations

Web:
business_operations_2_en

For more information about Business Operations, please refer to the documentation.

Console Application

When operating the enterprise system, there are some tasks (such as data import/export or batch report generation) supposed to be performed in an automatic or batch mode, often according to schedule. The interaction with the user in such cases is minimal or non-existent.

To perform this, we developed a lightweight console application RunCmd.exe. It requires only the modules needed to perform a specific function. Command line interface provides the way to specify commands and set parameters.

Developers can implement commands in 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 a business operation, to drop deleted objects from the database, to import and export data, and to create reports.

Xafari Console Application

For more information about the Console Application, please refer to our post An example of using command-line utility RunCmd and the documentation.

Xafari Application Support

Xafari Applications Support (XAS) is a standalone Windows application based on Xafari, which is responsible for maintaining all specifics of the system settings, configuring, and administering the customer's business application.

The use of XAS allows limiting the number of administrative functions in the business application, putting this functionality into a separate app. Such approach benefits the system requirements of the business application (it requires less memory and CPU usage) and the user interface (no administrative views and controls). Using a separate utility control for administrative processes also provides better security of the enterprise software.

Xafari Application Support

Custom Controllers are deactivated in XAS, while DevExpress XAF and Xafari System Controllers are available, so there is no possibility to modify business objects through the UI and interfere with the business logic.

Read more about XAS in the documentation.

Xafari Services

Xafari Service components implement a particular business property in the application. They are used for developing the application’s business logic, where their role is similar to the role of XAF Controllers in UI.

We advise using Xafari Service to implement functions meeting the following requirements:

  • The function is a general application property.
  • The outcome of the function should be isolated from other users until the user commits changes.
  • The outcome of the function can be rolled back with no influence on other users.
  • The function uses its own global settings and parameters that may influence other system users.
  • The function is used in batch data processing.

You can find the full list of Xafari services as well as information on how to use them in the documentation.

Utility Services

Xafari Framework offers a number of utility services simplifying work with the application. For detailed information about the services, refer to the documentation.


Xafari Object Formatter

XafariObjectFormatter helps to present certain value in the string form. The component provides and extends .NET Object Formatter class possibilities. XafariObjectFormatter has the following features:

Xafari Object Formatter

  • Suggests Collection Items and XAF Parameters Properties Navigation
  • Has the Formatted Output
  • Possibility to use DevExpress Expressions

Read more about Xafari Object Formatter in the documentation.

Services Model Service

Services Model Service maintains interactions between the Services Model and Xafari Services. The Services Model is an Application Model object that stores the parameters of all Xafari Services.

Services Model Service is used for:

  • Reading the current Model
  • Modifying the Model

It is possible to edit Service model with a help of Service Model Wrappers.

Service Spaces Manager

Service Spaces Manager is a utility control that manages the service spaces life cycle and maintains the context service activity. It supports two use cases:

  • Creating IServiceSpace for IObjectSpace or UnitOfWork.
  • Performing synchronizations between IObjectSpace or UnitOfWork objects and the service space.

Object Space Factory

Object Space Factory service component is used to create/get an IObjectSpace object guarantee execution of code within the only IObjectSpace object.

Memory Leaks Diagnostic Service

Memory Leaks Diagnostic Service is a component used to diagnose memory leaks associated with the use of ObjectSpace during application testing.

Xafari Module Updater

The DevExpress XAF ModuleUpdater updates the database when the module version changes. Xafari Module Updater is a special base class that ensures uninterrupted update process for Xafari services that require creating a separate IObjectSpace object, such as Services Model ServiceBranches Manager, and Settings Accessor.

Write US