What’s New in Xafari 15.2.9010.523
General Information
Recent Posts
- Faster analysis with OLAP, basic technical terms and how they are related to each other
- Development prospects for Ranet OLAP Technology using Artificial Intelligence
- OLAP: outdated technology or a modern trend in the development of business intelligence platforms?
- OLAP technology in BI solutions
- Xafari Framework hot price
New Major Features in x010
Breaking Changes
To learn about breaking changes in this version, please refer to the following page:
Breaking Changes in Xafari 15.2.9010.523
NEW FEATURES
Xafari.Base Namespace
The XafariValueManager class facilitates interaction with IValueManager by exposing 2 methods to get and set the object of the ValueManager.
public static TService Instance
{
get { return XafariValueManager.GetInstance<TService>("Instance"); }
}
public new static SettingsAccessor Instance
{
set { XafariValueManager.SetInstance("Instance", value); }
}
Xafari.Helpers Namespace
This method returns the CriteriaOperator instance for the specified IMemberInfo.
It is useful when there is a task to create a filter for data selection according to a specified field value.
The method takes into account the specific structure of the filter for XPWeakReference, XPWeakReferenceStruct, GuidWeakReference.
Sample:
interface Object1
{
string String1 {get;set;}
XPWeakReference Weak {get;set;}
}
var criteria = typeof(Object1).Xafari().TypeInfo().FindMember(“String1”).Xafari().GetCriteriaEqualsTo(“1”); // result – “[String1]=’1′”
var criteria2 = typeof(Object1).Xafari().TypeInfo().FindMember(“String1”).Xafari().GetCriteriaEqualsTo(null); // result – “[String1] is null”
var criteria = typeof(Object1).Xafari().TypeInfo().FindMember(“Weak”).Xafari().GetCriteriaEqualsTo(object1); // result – “[Weak.TargetType] = ? AND [Weak.TargetKey] = ?”
var criteria2 = typeof(Object1).Xafari().TypeInfo().FindMember(“Weak”).Xafari().GetCriteriaEqualsTo(null); // result – “[Weak] is null”
- Xafari.Helpers.IMemberInfoHelper
- Xafari.Helpers.IObjectSpaceHelper
- Xafari.Helpers.ITypeInfoHelper
- Xafari.Helpers.ITypesInfoHelper
- Xafari.Helpers.ObjectHelper
- Xafari.Helpers.SessionHelper
- Xafari.Helpers.TypeHelper
- Xafari.Helpers.ViewControllerHelper
- Xafari.Helpers.XafApplicationHelper
- Xafari.Helpers.XafariHelperBase
- Xafari.Helpers.XPMemberInfoHelper
They are intended to replace the usage of static extensions. To learn more, refer to the Helpers topic.
Xafari.DC Namespace
If you specify both attributes simultaneously (BackReferenceProperty and WeakList), then to calculate properties with a back reference the BackReferenceProperty attribute will be used. Modification of metadata is performed in such a way as to ensure the most effective queries when working with collections.
Xafari.Win Namespace
It is implemented for a Model Editor (Tools|Edit Model) and WorkPlace Model Editor (Tools|Edit administrator Workplace) invoked by end-users and administrators from the running Win app.
To use this feature, it is necessary to call RegisterGroupAlias(Type collectionNodeType, string groupPropertyName) method of the Xafari.Win.XafariModelEditorViewController class, its parameters are:
– the type of Application Model’s node which subnodes must be grouped;
– the string that specifies the name of the property for grouping, this property should contain the full class name (with namespace).
Grouping feature when invoking the Model Editor is provided by the Xafari.Win.WinXafariEditModelController derived from the
Xafari.BC Namespace
The code snippet below demonstrates this situation:
[AliveType(typeof(Object2))]
interface Object1 {}
interface Object2 : Object1 {}
This means that in runtime the Object2 type will be used instead of Object1 type. For instance:
Object creation:
var obj1 = objectSpace.Xafari().CreateObject();
The Object2 object will be created.
Data selection:
objectSpace.Xafari().GetObjects(criteriaForObject2);
The only those Object2 objects will be retrieved which satisfy the criteriaForObject2 restrictions.
Why is it needed
Often, the entity that declared at the design of the core system gradually acquired new fields and features. For example, inheritance hierarchy of classes means the Employee entity, but with a different set of fields. In practice, the development and deployment of enterprise systems the many base entities have been extended by one way or another. This can be done both by using classical inheritance, or by the implementation and registering the Extensions (see Xafari XF). Thus, at the stage of actual use of an entity in the application, it may be that it has a number of additional (purchased) capabilities.
Use AliveType allows utilizing these features when the application operates on the basic entity.
Xafari.BC.DC Namespace
- string UserName { get; set; }. The name of the user who owns the record. If the username is empty, it is considered that the record is shared.
- bool IsShared { get; set; }. Calculated (not persistent) property that indicates whether a record is private or shared. If set this property to true, the UserName field will be cleared (reset). If set this property to false, then the current user will be specified in the UserName field. It is assumed that the system administrator changes the value of this property. By default, the property is not displayed in visual forms. If necessary, you can customize the layout of the admin’s form to add this property.
- bool UserIsOwner { get; }. Calculated (not persistent) property which indicates whether the current user is the owner of the current record.
To select from the database all records owned by the current user, use the criteria available through a static property SharedObjectLogic.AvailableSharedObjectsFilter:
using (var objectSpace = Application.CreateObjectSpace()) {
var availableObjects = objectSpace.GetObjects(SharedObjectLogic.AvailableSharedObjectsFilter);
...
}
SharedObjectViewController automatically adds the specified filter to the criteria list of the CollectionSource. This is done for List Views of all objects that support the ISharedObject interface. To control the filter’s activity, it is possible activate/deactivate the SharedObjectViewController from the custom controller:
protected override void OnActivated()
{
base.OnActivated();
Frame.GetController().Active["Deactivated by Controller1"] = false;
}
Dock Panels
Hierarchical Data
HierarchyManager class manages a hierarchical metadata. This class is XafariService and provides effective performance when processing a large amount of data.
HierarchyInfo and HierarchyNodeTypeInfo classes provide metadata to describe hierarchies.
Now there are no restrictions on the method of implementation of hierarchical data. It is possible to define hierarchy both using attributes (previously used method) and using special methods to register hierarchies. This allows you to add hierarchical data for the previously defined non-hierarchical entity, for instance, it may be a hierarchical Extensions.
Registration is doing after initialization of the application:
application.SetupComplete += (sender, args) =
{
var hierarchy1 = XafTypesInfo.Instance.Xafari()
.RegisterHierarchy<HierarchyObject3>("Hierarchy1",
"Parent1",
nodeNameMemberPath: "Name1",
childrenMemberPath: "Children1",
fullNameMemberPath: "HierarchyFullName1",
fullPathMemberPath: "HierarchyFullPath1");
hierarchy1.DeletingMode = DeletingMode.Replacement;
}
Use XafariService to implement the HierarchyManager will significantly reduce the time of recalculation of hierarchical data. In some cases, the operating time decreased in 10 times.
Xafari Object Formatter
Xafari Services
Business Operations
This feature is implemented for the Model Editor and WorkPlace Model Editor invoked by end-users and administrators from the running Win app.
Docflow
Reports
File Report Path in Parameters topic.