Blogs

Gary's Blog

XAF – New KPI Functionality Coming (coming in V2010 Vol 2)

     

Key Performance Indicators, or KPIs, are loved by businesses, which means XAF has to love them because our target market is developers working in teams who have been side tracked to build “that little app” for accounts; and we know, the faster you can get that done, the faster you can get back to your “proper” day job. So it’s great news then, that as of Vol 2, XAF will ship with a KPI module!

So what are KPIs? Well, these are quantitative measurements of dynamic business processes. For instance, an important performance indicator for a trading company is daily sales, for a developer team – the number of active bugs in their product, etc.  For better visualization, KPI value ranges can be split to a “green zone” (everything is OK), “yellow zone” (warning), and “red zone” (things are bad). When the KPI is based on a time range, it can be useful to compare values of different periods (for instance, the current month against the previous one). If a deeper analysis (drilldown) is required, then the objects an indicator was calculated from can be listed.

It’s probably easier if I just show you:

When the KPI module is used in an XAF application, the “KPI” navigation group with the “Definition” and “Scorecard” navigation items is available:

KPI_01

Under the “Definition” item, a new KPI definition, represented by the KpiDefinition persistent object, can be created.

KPI_02

The KpiDefinition object’s properties are described below:
• Name – the KPI’s name.
• TargetObjectType  – the type of object KPI is designed for.
• Criteria – criteria used to filter a set of objects to analyze. In KPI criteria, two extra parameters for DateTime properties can be used – RangeStart and RangeEnd. These parameters represent a measurement range specified by the Range property.
• Direction – “High is better”/”Low is better” enumeration value, specifying how to treat deviation from a previous measurement result.
• Expression – aggregation function used to evaluate KPI – Sum, Count, Avg, etc.
• Range – the period to analyze.
• Compare – the Boolean flag, which indicates if the KPI current values should be compared to previous values calculated using the RangeToCompare period.
• RangeToCompare – the past period compared with Range.
• MeasurementFrequency – the time span between measurements.
• GreenZone , RedZone – specifies KPI value ranges used for visualization.

In the Preview  tab, the current KPI value and a collection of objects, used to calculate KPI, are available.
The best place to view the KPI results is the dashboard. Here, we will take a look at the Scorecards. A Scorecard is an object, exposing a collection of KPIs. Under the Scorecard navigation item, the Scorecards with linked KPIs can be created.

KPI_03

A drill-down list view can be invoked by double-clicking a KPI. It is a list of objects that were used to calculate the KPI result. This list view can be analyzed by grouping and sorting data, or by using our new features – ChartListEditor or PivotGridListEditor, representing this collection as a Chart or a PivotGrid:

KPI_04

To visualize KPIs on the scorecard or dashboard, the KpiInstance objects are used. KpiInstance is separated from the KpiDefinition. The KpiInstance object holds and manages KPI measurement history, retrieves Current and Previous values from the KPI history cache, creates a data source for sparkline and chart editors, and is responsible for cleaning outdated values from the cache. A KpiInstance object is created by a KpiDefinition object in its AfterConstruction method.
The ShowChart Action provides the capability to view KPI results as a chart:

KPI_05

The chart is customizable via the Chart Wizard, and can be printed – just like charts created with the PivotChart module.
The ability to visualize KPIs via the Gauges is currently in development.

That’s all for this post, ‘til next time, happy XAFing! :-)

Published Aug 10 2010, 01:49 PM by Gary Short (DevExpress)
Filed under: ,
Technorati tags: v2010.2, XAF
Bookmark and Share

Comments

 

Garry Lowther said:

Is there a chance is normal winForms developers can get our hands on this technology as a component for inclusion in our non-XAF projects?

August 10, 2010 9:10 AM
 

Michael Thuma said:

This is cool ...

August 10, 2010 10:44 AM
 

Dennis (DevExpress Support) said:

Hi Garry,

Please check my answer in the previous blog:

community.devexpress.com/.../xaf-new-dashboard-functionality-coming-v2010-vol-2.aspx

August 10, 2010 11:11 AM
 

heather said:

This is really a great move for XAF...really looking forward to trying this out.

August 10, 2010 1:39 PM
 

Saif Khan said:

Nice work! I like the sparkline. I've ben using flash to accomplish that in my winform apps.

XAF...WPF...WTF!...what hppen to WINFORMS?...come on winform team show us something!

August 10, 2010 3:42 PM
 

Felipe R Machado said:

Does it works too on the ASP.NET target? There are a couple of important modules that only work on the Windows target... I would really hate to see another Windows only module.

August 10, 2010 4:26 PM
 

Dennis (DevExpress Support) said:

Hi Felipe,

Thanks for your interest! Sure, it works on the Web.

Here is a small screenshot from the XAF FeatureCenter demo:

downloads.devexpress.com/.../screenshot.png

Also, please tell me which important modules lack ASP.NET support. I will be glad to see to it, to improve your experience with our framework.

August 11, 2010 1:38 PM
 

Dennis (DevExpress Support) said:

Hi Saif,

We appreciate your feedback.

There is already a corresponding suggestion in our TODO list: www.devexpress.com/issue=AS14347

Currently, I see several good ways to implement the functionality shown in the above screenshots (e.g. put sparklines into the grid) in the current version of the suite

1. Implement a custom repository item as described in the following help topics:

   documentation.devexpress.com

   documentation.devexpress.com

Actually, that's what is currently done in XAF for that feature. To be more precise, a specific SparklineRepositoryItem (inherited from the RepositoryItem class), which uses a custom SparklinePainter (inherited from the BaseEditPainter class), is implemented. In the painter, we just draw the image received after exporting the chart control to a bitmap.

2. Handle the GridView's CustomDrawCell event, to draw the same image received from the chart control or from a custom algorithm emulating sparklines;

3. Use the RepositoryItemPictureEdit for an unbound grid's column and handle the GridView's CustomUnboundColumnData event, to provide the image received the same way as in the previous point. BTW, using the same approach, you can also embed gauges in the grid's cell. As you see, the idea is quite simple - create and configure a chart or gauge control as required, and then export it to a bitmap that can be then displayed within the grid. There are a couple examples in the Code Central that demonstrate this approach:

www.devexpress.com/example=E1172

www.devexpress.com/example=E492

Hopefully, these alternatives will come in handy for your Windows Forms applications, until we provide an official implementation.

August 11, 2010 2:22 PM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.