Search This Blog

Tuesday, November 21, 2017

Security - How to add OAuth2 authentication to a WinForms app

This is another example of how flexible the security module and our framework are. My colleague Michael has recently published an example on how to use the Microsoft, Google, Facebook or any compatible authentication provider within an XAF WinForms app:

This implementation is based on public community resources like StackOverFlow, so research the links in code comments for more details.

If you are looking for an ASP.NET example, do not miss the article we published earlier:
How to: Use Google, Facebook and Microsoft accounts in ASP.NET XAF applications (OAuth2 authentication demo)

Your feedback is needed!
Originally, we were not going to make a WinForms counterpart, because there were only a couple of requests for it + the whole scenario looked rare for desktop apps.
What is your own experience with it? Have you ever had such integration requests from your end-users? What providers do they need to cover most? Please let us know.

Monday, November 20, 2017

Another example of how Logify helps us improve quality and reflections on how it can help you even more

You might recall my previous post on how DevExpress Logify is used to deliver crash reports in demos, runtime and design time tools for many DevExpress products and technologies.
I wanted to share another real story and discuss an idea, which may improve your user experience as well.

06/28/2017 we published v17.1.4 with these changes.
07/03/2017 (5 days later), we received the first Logify report about the "Unable to cast object of type 'DevExpress.ExpressApp.Win.Layout.XafLayoutControlGroup' to type 'DevExpress.XtraLayout.LayoutControlItem'" error, because our manual and automatic tests did not cover one scenario where the new code stopped working.
07/07/2017, we fixed our code and provided intermediate builds with the fix.
Since that fix, we published 17.1.5, 17.1.6, 17.1.7, 17.1.8 updates, but I still see the same reports in Logify from users sitting on the old v17.1.4 and v16.2.8 with that already fixed bug. For instance, one of our users had this crash 17 days ago, because he is still using that v17.1.4 from 06/28/2017:

Now the improvement idea to discuss with you.

Beware of the PhoneGap's Camera and Geolocation plugins version update

I wanted to warn early adopters of the XAF Mobile UI of the recent change in due to the updated version of two main plugins that may stop your camera or geolocation functionality on real devices:

Check this thread for a temporary workaround until we release new minor versions with the required changes. We apologize for all the inconvenience here, because we must have been sticking to a fixed version instead of the latest one when building the application package.

Wednesday, November 15, 2017

Database maintenance recommendations for applications created or used with XPO or XAF

We have published a KB article that may help you protect the end application's data and keep the system reliable, fast and running smoothly as time goes on, application data grows and other factors are involved during the application's use in production: Danon

I hope you find this information helpful.

See Also:
How to measure and improve the application's performance

Monday, November 6, 2017

ASPxGridListEditor - How to customize the column chooser of the Web ListView's grid control

I wanted to promote the article that shows how to  increase the ASPxGridView's customization window size, because last week there were two requests for this + I searched around a dozen tickets in both XAF and ASPxGridView knowledge bases on the same subject. 

Previously, it was possible for developers to hard code the required width and height for this window.
Around v17.1, the ASPxGridView team created the AllowResize option (based on feedback from XAF users mostly) so that end-users could resize this dialog as they wish at runtime.

Currently, the AllowResize option is set to False by default, because the ASPxGridView team is afraid of breaking existing customer projects.

EDIT: The ASPxGridView has implemented AllowResize = True in v17.2 RTM by default.

I am looking forward to hearing from you on whether you or your end-users ever had problems with this so that our both teams can take this into account regarding future product updates. Thanks.

Wednesday, October 25, 2017

Beware of the situation when a signed assembly with a business type used in the dashboard changes its version

I wanted to inform our Dashboard module users about a situation, which we missed originally:
DashboardObjectDataSource serializer fails to load a data source type when signed assemblies with a changed version are used

As you understand, it may occur only when target business types used in XML dashboard definitions with ObjectDataSource are from signed assemblies and the assembly version changes, e.g. when you deliver a new app version to the client:

    <ObjectDataSource ComponentName="dashboardObjectDataSource1">
      <Name>Object Data Source 1</Name>
      <DataSource Type="YourNamespace.YourObjectType, YourAssemblyName, Version=17.1.6498.1953, Culture=neutral, PublicKeyToken=YourPublicKeyToken" />

Currently, we recommend XAF application developers try a couple of solutions described in that thread, but they are not final solutions. We are currently reviewing them from the security point of view to make sure that the app won't be broken by passing another non-signed dll. For now, this does not seem to be the case, because business type information is obtained using the ReflectionHelper API from the already loaded assemblies, which are protected by the default .NET mechanisms. We just want to double-check or see if there are more suitable options. Ideally, I wish this to be working transparently for an application developer without the need to resolve any assemblies or types manually.

Your feedback is needed!

Have you experienced this behavior in your Dashboard apps? How do you currently cope with it? If there are existing solutions, share their details and also elaborate on their costs. Your feedback is greatly appreciated.

Thursday, October 19, 2017

How to group validation rules by a business type in Model Editor

If you want the same UI as in the screenshot below:

implement a few code lines in YourSolutionName.Module/Module.cs file, as follows:

using DevExpress.ExpressApp.ModelEditor;
using DevExpress.ExpressApp.Validation;
using DevExpress.ExpressApp.Model;

namespace MainDemo.Module {
    public sealed partial class MainDemoModule : ModuleBase {
        public MainDemoModule() {
            typeof(IModelValidationRules), node => DefaultGroupPathCalculator("TargetType.Name", node));
        public string[] DefaultGroupPathCalculator(string propertyName, IModelNode modelNode) {
            string groupName = "";
            object propertyValue = ModelEditorGroupingHelper.Instance.GetPropertyValue(propertyName, modelNode);
            if(propertyValue != null) {
                groupName = propertyValue.ToString();
            return ModelEditorGroupingHelper.Instance.SplitGroupPath(groupName, modelNode);

This is just one example of the Model Editor nodes grouping customizations that you can achieve with the ModelEditorGroupingHelper  API.

I remember our loyal customer Mario Blataric doing magic using this helper for his specific project needs (multi-level grouping of Actions by Controllers and their namespaces/functional blocks). If you have similar needs in your project, feel free to contact our support team so we can help you make your life easier.