XAF MOBILE CONTEXT - SUPPORTED in eXpandFramework
16 Αυγούστου 17 10:59 πμ | tolisss | 0 σχόλια   
XAF offers mobile support long time and the XAF team is constantly adding new features and modules, I guess the out of CTP mode is close enough. So its about time to support the mobile platform from our community project (eXpandFramework).

Long story short: eXpandFramework up to now only recognized two contexts (Win, Web), this will change from v17.1.5.2 where a Mobile context is introduced.

What this means for you?

At the moment there are no new mobile modules released, however you are now able to use eXpandFramework your agnostic modules that reference eXpandFramwork in the mobile platform.

p.s.: All easytests for the Win, Web platform still pass on every release, but at the moment there are no tests for the mobile. but its on schedule.

Looking forward for your feedback at http://www.expandframework.com/forum/
Sending modifer keys to client over RDP
13 Αυγούστου 17 12:25 μμ | tolisss | 0 σχόλια   
Those of you that use Remote Desktop connection you probably noticed that some key combinations like CTRL+ALT+UpArrow are not passed to the client.

I looked everywhere but I could;t locate a ready solution so in invented one with the use of AutoHotKey.

Install AutoHotKey on both machines and create a Autohotkey script (a file with ahk extension) for the host machine and enter:

*^LAlt::^AppsKey

This will replace all key strokes that use the left alt key with the Control + AppsKey(the one that opens the context menu when right click).

and for the client machine similarly to switch back you need a second script with the following command

*^AppsKey::^LAlt

I am using this workaround for a week now with no issues, hope it helps some of you.

p.s. : if you have a better way, please post in comments

enjoy!





ASP.NET Dashboard Designer - XAF integration
20 Απριλίου 16 08:41 πμ | tolisss | 0 σχόλια   

DevExpress released in v15.2.9 an ASP.NET Dashboard Designer (Online Demo). Following eXpandFramework with v15.2.9.3 releases an update to the existing integration of the dashboard suite.

Windows

In the existing windows implementation the end user can use the UI to create a DashboardDefinition, assign a few Business object types as datasources and execute the Edit Dashboard action to run the Designer.

image

Web

Similarly the end user need to perform the same actions to run the ASP.NET dashboard designer and create dashboard over the existing  Business Object domain.

image

As you can see from the images above the eXpandFramework Dashboard module utilize security and syntax highlight editors integrations. The highlight for the win platform is done with the help of DevExpress XtraRichEdit control  and for the web with the help of ACE cloud9 editor.

For those of you interested in the XtraDashboardTester solution you can find and run the related Easytests for the module. Basically the ASP.NET dashboard designer implementation uses a DashboardDesignerPropertyEditor and a DashboardDesignerController.

As always your feedback/question are welcome in our forums.

Δημοσίευση στην κατηγορία: ,
How to debug eXpandFramework
17 Ιουλίου 14 03:02 πμ | tolisss | 4 σχόλια   

In this post I will go through the process of debugging eXpandFramework for each of the distribution channel.

The sources

If you download the sources either from GitHub or our download page or our build server you need to run the buildall64.cmd file located in the root folder. The batch will generate the symbol files (pdb) and will register the assemblies in the GAC. Debugging is enabled by default since symbols and sources are in place.

The Nuget packages

eXpandFramework is distributed through Nuget and since version 14.1.4.8 and with the excellent GitHubLink project provides frictionless debug experience as long as Symbol Server support is enabled under your VS/Options/Debugging settings. The symbols are in the same package as the dll so expect the package size to be at least double in size. We will consider a better implementation if there are requests. GitHubLink patches the symbols so to request the assembly sources from the online GitHub repo so there is not need to have the sources in place.

The Binaries / The Installer

Either way you choose you will end up with a folder containing the eXpandFramework assemblies + the patched symbols. So, debugging is enabled by default and sources will be queried from the online GitHub repo as long as Symbol Server support is enabled under your VS/Options/Debugging settings

PS: In the installer case you can also find the sources under the Sources folder in your installation directory.

How confident I am with my code?
18 Ιουνίου 14 04:02 μμ | tolisss | 2 σχόλια   

With smart frameworks like XAF it is inevitable that you will create applications one would except they developed by a whole team and not from just one person. A side effect of rich/large applications is that it is impossible to determine if all parts of the application function unless you have tests.

Enter AutoTest from EasyTest

XAF comes together with EasyTest a functional testing framework. EasyTest has an undocumented command the AutoTest. In short  the AutoTest command will go through all your Navigation Items and for all related views will execute the New action if available and open/close the related detailview.

So, lets talk by example. In eXpandFramework there are 38 Demos with a large number of views, each one demonstrating certain features. By using the AutoTest command we can automate the opening of all views therefore we can expect a code coverage larger than 80%.

Following is the RunEasyTests target used in eXpandFramework build script (Xpand.build).

  <Target Name="RunEasyTests" >
    <MSBuild Projects="@(EasyProjects)" Targets="Build" Properties="Configuration=EasyTest" />
    <CallTarget Targets="EasyTestUpdateDBTimeout" />
    <Delete Files="@EasyTestLogs"/>
    <CreateItem Include="@(EasyTestReqs)" AdditionalMetadata="CopiedToDir=%(EasyTests.RelativeDir);" >
      <Output ItemName="EasyTestReqsToDelete" TaskParameter="Include"/>
    </CreateItem>
    <Copy SourceFiles="@(EasytestReqs)" DestinationFolder="%(EasyTests.RelativeDir)"/>
    <Exec ContinueOnError="true"
          WorkingDirectory="%(EasyTests.RelativeDir)"
          Command='%(EasyTests.RelativeDir)\ProcessAsUser.exe $(TestExecutorName) %(EasyTests.Filename).ets'>
      <Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
    </Exec>
    <Delete Files="%(EasyTestReqsToDelete.CopiedToDir)%(EasyTestReqsToDelete.Filename)%(EasyTestReqsToDelete.Extension)"/>
    <Error Text="Login failed" Condition="'$(ErrorCode)' == '255'" />
    <CallTarget Targets='PrintEasyTestLogs' ></CallTarget>
  </Target>


Next we will discuss in detail each line of the RunEasyTests target.



<MSBuild Projects="@(EasyProjects)" Targets="Build" Properties="Configuration=EasyTest" />



First we need to build all demos under the EasyTest configuration where the required EasyTest components are functional.



<CallTarget Targets="EasyTestUpdateDBTimeout" />



In the above line we call the EasyTestUpdateDBTimeout target that will run DBUpdater for all demos that have long operations in their ModuleUpdaters. We need to explicitly execute the DBUpdater because there is a threshold in time between each EasyTest command so the Login action may fail if moduleupdater takes more than 25sec to complete. 



<Delete Files="@EasyTestLogs"/>



This command will delete all EasyTest logs to make sure that our build script will not pick up any previous failed tests.



<Copy SourceFiles="@(EasytestReqs)" DestinationFolder="%(EasyTests.RelativeDir)"/>



This will copy a set of required files for EasyTest like the TestExecutor, XpandTestAdapters etc in the same path as the test. In the build server assemblies are not in the GAC so by putting them in the same path we minimize assembly binding errors due to version conflicts.



<Exec ContinueOnError="true"           WorkingDirectory="%(EasyTests.RelativeDir)"           Command='%(EasyTests.RelativeDir)\ProcessAsUser.exe $(TestExecutorName) %(EasyTests.Filename).ets'>





This line executes the TestExecutor for all EasyTests, It uses the ProcessAsUser.exe because the build script is actually executed from our build server service using the System Account which has no windows session therefore useful EasyTest features like screenshots are not available. In general we do not want to mess with the system account in order to make our tests run. So the ProcessAsUser reads a username and password from a registry key and by using an RDC connection (Windows Server) creates a new session and executes the tests there under the specified user security privileges. Finally because we are interested to execute all tests without failing the build to fail we set ContinueOnError to true.



<Delete Files="%(EasyTestReqsToDelete.CopiedToDir)%(EasyTestReqsToDelete.Filename)%(EasyTestReqsToDelete.Extension)"/>



This line will delete all EasyTest required files copied in previous steps



<Error Text="Login failed" Condition="'$(ErrorCode)' == '255'" />



If the ProcessAsUser returns 255 then we fail the build with the Login failed message.

<CallTarget Targets='PrintEasyTestLogs' ></CallTarget>



The PrintEasyTestLogs target will go through all EasyTest logs and for any entry with non passed Result it will fail the build with the related error message from the EasyTest xml log.



  <Target Name="PrintEasyTestLogs" >
    <MSBuild.ExtensionPack.Xml.XmlFile
      TaskAction="ReadElements" File="%(EasyTestLogs.FullPath)" Condition="'@(EasyTestLogs->Count())'!='0'"
      XPath="/Tests/Test[@Result='Warning' or @Result='Failed']" ReadChildrenToMetadata="true">
      <Output TaskParameter="Elements" ItemName="Test"/>
    </MSBuild.ExtensionPack.Xml.XmlFile>
    <Error Text="%0D%0AApplicationName: %(Test.ApplicationName)%0D%0AError: %(Test.Error)" Condition="'@(Test->Count())'!='0'"  ContinueOnError="True"></Error>
  </Target>


A big thanks this time to the AutoTest command that provided 80% code coverage for our community framework. I am sure AutoTest will be extended to provide even smarter automated tested in future versions. If you got into that trouble and have interesting ideas to share or contribute for AutoTestV2 please use our community framework forums.

DX-Nuspec files hosted on GitHub
22 Απριλίου 14 12:41 μμ | tolisss | 0 σχόλια   

DevExpress offers a great installer for their components and frameworks. But if you work in a continuous integration environment or have to deal with different versions of the components NuGet packages are the better way to deploy and version-control  dependencies. This project contains .nuspec files for  DevExpress WinForms, Web and XAF assemblies. It is not an official release and it is not supported by DevExpress.

This is the description of the DX-Nuspec files, open sourced from Sergej Derjabkin a casual community contributor! The files are available in https://github.com/derjabkin/DX-Nuspec and of course they will be distributed as a submodule from eXpandFramework v13.2.9.1.

Δημοσίευση στην κατηγορία:
A few more reasons to upgrade to v13.2
31 Δεκεμβρίου 13 07:15 πμ | tolisss | 0 σχόλια   

13.2 was a great release and many of you already upgraded your applications. For everyone else I am here to help you make that decision sooner and easier, by reminding you what our reviewers had to say, when they upgraded their apps to our latest major release.

These are real world feedback without any kind of interaction from us.

Gustavo Marzioni
Making Business Applications Easier

Gustavo is a veteran programmer (20 years+) with a great presence in our community (most active user in eXpandFramework). He posted a very complete review of all new XAF features and a few other interesting things we released with 13.2 as part of our DXperience subscription. In addition you can find a performance comparison for our new ReportsV2 module.

Mario Blataric
Dungeons of XAF and Magic 13.2

Mario reviews v13.2 and explains how XAF helps him to fight monsters in today’s modern dungeon of dev technologies and platforms. His XAF app has more than 1500 reports so he focuses on the ReportsV2 module.

Martynas Dauciunas
Devexpress 13.2 Review - why bother upgrading ? 

Martynas known from his very useful Excel Import Wizard module wrote an extensive review of all new features and problems encountered when he updated his 12.x ERP/CMMS application to v13.2.

Manuel Gunder
DevExpress 13.2 Review Part 1
DevExpress 13.2 Review Part 2
DevExpress 13.2 Review Part 3

Manuel has already contributed many solutions. This time he wrote a great review for all new XAF features. He also reviewed components not integrated with XAF like the new TaskBarAssistant and as a bonus in part 3 he wrote how to create a module that integrated this component with XAF. This module will soon be integrated into our community project eXpandFramework.

Robert Anderson
DevExpress 13.2 Review - Part 1
DevExpress 13.2 Review - Part 2

Robert is a casual blogger and community contributor. He wrote about all new 13.2 features along with a few more tricks and thoughts which cannot be found in our official posts.

Until next time,

Happy New Year to all!

Δημοσίευση στην κατηγορία:
State machine enhancements
30 Νοεμβρίου 13 03:15 μμ | tolisss | 0 σχόλια   

Yesterday, I had a few interesting suggestions from an eXpandFramework user (Sheldmandu), about a few real world State Machine enhasements. Since XAF makes development amazingly fast, today we can discuss a bit about the implementaion released with (v13.1.8.22).

The full discussion can be found at this thread.

In sort Sheldmandu suggested.

  1. Allow certain roles to bypass State machine transition validation and make transitions without any restriction in order to correct mistakes.

    This implemented by adding an extra tab in the State Machine detailview so the end user can associate it with the admin roles as illustrated in the next image.

    image
  2. Support more efficient transitions by changing directly the property value without the need of executing the ChangeStateAction

    For this a new property “EnableFilteredProperty” introduced in the State Machine attribute to make the life of our real worlds easier.

    image

Most useful suggestions Sheldmandu! Many thanks form all and keep them coming.
We also looking forward for such great suggestions from the rest of the XAF world Smile.

Until next time,

Happy XAF’ing!

Δημοσίευση στην κατηγορία:
XAF: Soft Validation (What’s New in 13.2)
28 Νοεμβρίου 13 05:50 πμ | tolisss | 0 σχόλια   

Our next major release (13.2), updates our Validation Module with more features that come with different behavior rules, such as Warnings and Information. These can be applied to your existing validation rules using code or the Model Editor.

The XAF validation module is a mature and flexible validation system, which allows you to create rules that can validate any business problem, For more information, check out the module documentation.

Suppose we have a Business Object that disallows saving a Customer if the Name property is blank. If this attempted the UI should respond with a “Everybody has a name!” message.

[DefaultClassOptions]

public class Customer : BaseObject {

    public Customer(Session session) : base(session) { }

    [RuleRequiredField("Customer_Name_Required", DefaultContexts.Save, "Everybody has a name!")]

    public string Name { get; set; }

    public string City { get; set; }

    public int Age { get; set; }

}

When an end user tries to save the Customer without a name, XAF will show the Validation Error listview and consequently abort.

image

Creating a warning rule

A common requirement for our Customer class is to warn the end user that, if possible, he/she should provide the Customer’s city. To do this, we need to mark the City property with a  RuleRequiredField. However, this time we have to set the ResultType to Warning as illustrated below.

[DefaultClassOptions]

public class Customer : BaseObject {

    public Customer(Session session) : base(session) { }

    [RuleRequiredField("Customer_Name_Required", DefaultContexts.Save, "Everybody has a name!")]

    public string Name { get; set; }

    [RuleRequiredField("Customer_City_Warning", DefaultContexts.Save, "Provide the City if possible",

        ResultType = ValidationResultType.Warning)]

    public string City { get; set; }

    public int Age { get; set; }

}

When the end user saves the Customer (in runtime) providing a Name and not a City, XAF will again show the Validation Error listview however, this time there will be an extra Ignore action.

image

If the end user executes the Close action, the object will not be saved however if he executes the Ignore action it will be saved. In both cases in the detailview there will be a warning action by the City textbox to draw the end user’s attention.

image

Creating an Information rule

XAF allows you to create validation rules even at runtime using the Model Editor. So let’s say we want to just inform the end user, if he enters a Customer Age not between 10 and 60. This means that we need to use a RuleRangeField rule as illustrated in the next two images.

image

image

When the end user saves a Customer (in runtime) with an invalid Age range, XAF will not display the Validation Error listview at all. However, it will display an Information icon to draw his/her attention to the Age property.

image

Where to see more examples?

You may explore our FeatureCenter application located in your C:\Users\Public\Documents\DXperience 13.2 Demos\eXpressApp Framework\FeatureCenter\CS folder to see a few rules in action.

What about the web?

The validation module as a platform agnostic module works similarly for the web.

image

The soft validation is in its first release (CTP), thus we look forward to your feedback as we get it ready for it’s official release. Let me know what you think.

Δημοσίευση στην κατηγορία: , , ,
eXpandFramework 13.2 beta 1 is out
24 Νοεμβρίου 13 06:49 μμ | tolisss | 0 σχόλια   

It has been almost a week since the XAF beta 1 and I hope you already tried the 13.2 bits of XAF. I am happy to announce that in our build servers you can find the 13.2 beta 1 of eXpandFramework.

I am also happy to tell you that even if eXpand has a huge code base the 13.2 migration was lighting fast. Thanks to the great job from the XAF team. So, I am pretty sure that the 13.2 migration will not affect your code bases or time either.

To get your hands in the XAF beta1 login to your account in the DevExpress site and download the release in red.

image

To get your hand in the eXpandFramework bits login to our build servers and download the latest 13.2.3.x bit.

image

p.s.: eXpandFramework as a community project is based on your feedback in order to be stable so for those of you that want to report issues and suggestions I opened a beta only forum.

image

Note: You cannot have both 13.1 and 13.2 eXpand assemblies in the GAC. It is however totally possible to work using different version as long as you reference the assemblies directly from their locations.

Partial View inheritance
18 Νοεμβρίου 13 06:13 μμ | tolisss | 0 σχόλια   

A few months ago eXpandFramework released the first version of View inheritance(see http://goo.gl/3YhTa9). In the latest version of the framework (13.1.8.12) it is possible filter the nodes that participate in the inheritance strategy.

The MergedDifference Strategy

To inherit a model view configuration from another view you can use the Model Editor and add a new record in the MergedDifferences collection as illustrated below.

image

Now the great thing is that the Strategy attribute if fully configurable from Application/Options/MergedDifferencesStrategies. By default there are three common strategies Everything, EverythingButLayout, OnlyLayout.

 

In the above image we see how the Everything strategy is defined. It contains all root nodes of both DetailView and ListView nodes.

As you might have guessed the inheritance scenarios are limited only from your imagination. For example in the next image we see the OnlyLayout strategy however what defines the layout may vary so it is possible to inherit from the GridViewOptions node by simply adding a new record in the OnlyLayout strategy (bold).

image

Are there any working examples?

Yes in eXpandFramework source code there are many examples and yes eXpandFramework eats its own food.

The LogicOperationPermissionData

From the LogicOperationPermissionData class starts a deep inheritance tree that defines the Permissions used from all Logic Module depended modules as shown in the next image.

image

Below we see the layout of the base view (LogicRuleOperationPermissionData class).

image

In the next image the next class in the inheritance tree where we note that everything is the same as the base view and we also added the AdditionalViewControls extra tab.

image

The ModelDifferenceObject

In the ModelDifference module you can find the next inheritance tree.

image

The base view.

image

Next is the Role descendant layout, where everything is the same as the base view and we also added the Roles extra tab.

image

The XpandLogonParameters

XpandLogonParameters lives in the Xpand Security module and inherits from the AuthenticationStandardLogonParameters which is an XAF class and lives in the XAF Security module.

Bellow we see the layout of the AuthenticationStandardLogonParameters inside the XAF Security module.

image

Now inside the Xpand Security module we have modified the previous layout of the AuthenticationStandardLogonParameters as in next image.

image

Next, we inherited that layout from the XpandLogonParameters class and added the extra Remember Me item as illustrated below.

image

A cross view custom Merged Strategy

In both model DetailView and ListView nodes you can find the HiddenActions node which can be used to hide actions for a view.

image

Let’s say we want to create a custom merged strategy to distribute the above list of hidden actions (Save, SaveAndClose).

Step 1: Create a View container

We first create a clone of the BaseObject_ListView, name it HiddenActions and add the actions we want to distribute in the HiddenActions collection. I chose the BaseObject_ListView because it can be inherited from all objects.

image

Step 2: Create a Merged Strategy

For this we have to set the NodePath to the HiddenActions node and the ViewType to Any so we can distribute to both DetailViews and ListViews.

image

 

Step 3: Inherit from the HiddenActions view

Go to the view that you want to inherit the HiddenActions view differences and create a MergedDifference record as the one below.

image

Step 4: Close and open again the Model Editor in order to see the inherited HiddenActions

image

Big thanks to everybody that helped making this feature so powerful and even bigger thanks to the XAF developers that work hard to create that wonderful Application Model API.

Δημοσίευση στην κατηγορία: , , , ,
XAF: Easy custom members (What’s New in 13.2)
16 Νοεμβρίου 13 03:02 πμ | tolisss | 0 σχόλια   

With our next major release (13.2), we have simplified the manner in which you are able to add custom and computed fields to existing business models. The functionality is available to both developers and end-users.

Once beta 1 is released, you can explore this new custom member functionality by exploring the FeatureCenter solution located in the C:\Users\Public\Documents\DXperience 13.2 Demos\eXpressApp Framework\FeatureCenter\CS folder.

Design time

As you know, XAF already offered the ability to create non-calculated persistent fields at design time using the Model Editor. In 13.2, we’ve extended the Application Model with an Expression attribute as illustrated in the image below.

image

When the Expression attribute has a value, XAF will create a calculated member or it will default to the creation of a persistent member. Additionally, you can create a complex expression such as the Sum of another custom field as illustrated below.

image

By design, XAF will not display these custom fields in any view since they were created manually after the Application Model was generated.

Runtime

The great thing is that in 13.2, end-users can use the runtime version of the Model Editor to create custom members and extend the business domain as discussed in the previous section.

The image below illustrates where to locate the custom member in the Windows version of our FeatureCenter (same location for the web).

image

To invoke the runtime Model Editor, end-users can execute the Edit Model action.

image

You may also want to restrict Application Model modification to certain user groups. You can do that as illustrated below.

image

Developers can restrict end-users from creating custom members at runtime by setting the static ModelMemberRequiredCalculator.AllowPersistentCustomProperties to false.

The Web Runtime

To create a custom member for the web, you can use the Standalone Model Editor and edit the Model.xafml file located in the root of the web-site.

image

Custom members are in their first release (CTP) so we look forward to your feedback as we get it ready for the official release. Let me know what you think.

Δημοσίευση στην κατηγορία: ,
Extending Easytest to support Drop & Restore for SQLite, ASA , LocalDB
13 Νοεμβρίου 13 01:20 μμ | tolisss | 0 σχόλια   

XAF includes the EasyTest functional test framework which as all DevExpress tools is an extensible beast. To learn more about EasyTest I suggest you go through our documentation. So, it was just about time to include a few projects in eXpandFramework to host custom commands and extensions contributed by our community.

Starting from next eXpandFramework version 13.1.10 in the root of our repository you will find three extra projects which contain:

  1. The FillDataTimeValue command as described in How to: Implement a Custom EasyTest Command.
  2. The custom database operations to support Drop & Restore for SQLite, ASA, LocalDB contributed by Markus Dütting!

The Drop and Restore Preprocessor Directives are already supported for Access, MSSql databases and to learn how to use them together with other commands look at EasyTest Script Reference.

Following are some notes from Markus.

  1. SQLite: just deletes the file DBSourceLocation (DropDB) or copys the file (RestoreDB) specified by Backupfilename to DBSourceLocation. Tested with System.Data.SQLite 1.0.88.0.
  2. LocalDB: uses the "DROP DATABASE" (DropDB) and "RESTORE DATABASE" (RestoreDB) command. DropDB or more exactly empty database creation doesn't correctly work with the MSSQL XPO Provider in 13.1.7 with LocalDB. It seems LocalDB's "CREATE DATABASE" command returns before the database is "connectable". Therefore only RestoreDB works, as i added code which tries to connect to the restored or new database in a loop up to 10 seconds. If you omit Backupfilename than RestoreDB creates an empty database. Tested with LocalDB v11.0 which comes with VS 2012.
  3. SAP SQL Anywhere: uses the "DROP DATABASE" (DropDB) command from the Utility Database that deletes the database file specified by DBSourceLocation and stops it before if it is running. RestoreDB does a DropDB just in case before it creates an empty database if Backupfilename is not specified, otherwise it copies the database and log file if specified by Backupfilename or restores them from the therein specified archive. After that it starts the database. Tested with SA16.

In addition, to spare our time, Markus contributed a sample config which can be found at http://goo.gl/1h4IMV.

Big thanks to Markus Dütting and we look forward for more EasyTest command and extensions from all XAFers our there. If you interested to share your own work you can find me at apostolisb at devexpress.

Δημοσίευση στην κατηγορία:
XAF: Reporting V2 (What’s New in 13.2)
08 Νοεμβρίου 13 10:33 πμ | tolisss | 0 σχόλια   

With the upcoming release of the eXpressApp Framework (version 13.2), we’re introducing a new way in which to create reports for your XAF powered application. Simply said, you’ll now be able to create your report using XtraReports within Visual Studio and effortlessly integrate them into your XAF applications.

This is an introductory post for the ReportsV2 module and I’ll describe it in more detail once we release. For now, please keep in mind that this will ship as a beta. We are looking forward to your feedback so we can continue to improve the module to meet your specific requirements.

To start using ReportV2, I’ll select it from the toolbox…

image

Because ReportsV2 integrates XtraReports at design time, you can use all the examples and documentation form our Reports Team. As you might imagine, when creating reports with this new module, you’ll be writing code and creating your own custom template within Visual Studio using your language of choice (C#, VB.Net). XAF will allow you to preview and print these new templates at runtime much like the existing Reports module. Since the design time report is a template, it is not editable at runtime, however, it is possible to clone it, make an editable copy and continue designing at runtime. In addition to native integration, ReportsV2 should make it easier for you to work with Stored Procedures, SubReports and hosting of custom components (this will be the subject of a dedicated blog post)..

To integrate XtraReports at design time, our team introduced two new components: the CollectionDataSource and the ViewDataSource. In the first beta release, you will need to add them to your toolbox manually.

image

The CollectionDataSource component

Drag and drop the component from the VS toolbox to the designer template of an XtraReport class. To create the XtraReports class, use existing XtraReports documentation. After setting up the ObjectTypeName to one of your domain objects the CollectionDataSource will load all objects properties as is.

image

The ViewDataSource component

Much like CollectionDataSource, you will need to set the ObjectTypeName property. Note that the ViewDataSource component is designed to load only required plain data properties or aggregated calculations instead of the entire object hierarchy. As a result, you will get better performance and less memory consumption when you are dealing with thousands of records and complex data models. To configure the properties or expressions that will be used as a datasource, you can use the Properties collection as illustrated below.

image

Runtime integration

To load the report you created at design time with the new module, we provide a ModuleUpdater subclass -PredefinedReportsUpdater - which can be used as shown in the snippet below.

public override IEnumerable<ModuleUpdater> GetModuleUpdaters(IObjectSpace objectSpace, Version versionFromDB) {

    ModuleUpdater updater = new DatabaseUpdate.Updater(objectSpace, versionFromDB);

    PredefinedReportsUpdater predefinedReportsUpdater = new PredefinedReportsUpdater(Application, objectSpace, versionFromDB);

    predefinedReportsUpdater.AddPredefinedReport<XtraReportOrdinary>("Inplace Report", typeof(Contact), isInplaceReport: true);

    predefinedReportsUpdater.AddPredefinedReport<XtraReportView>("Report with ViewDataSource", null);

    return new ModuleUpdater[] { updater, predefinedReportsUpdater };

}

We’ve created a specific demo for the ReportsV2 module. It is located in your C:\Users\Public\Documents\DXperience 13.2 Demos\eXpressApp Framework\ReportsV2Demo folder.

Because ReportsV2 will ship as a beta, we do not recommend its use in production code. We do want to hear your thoughts on ReportsV2 and are looking forward to incorporate your feedback…so please let us know what you think…

!

Δημοσίευση στην κατηγορία: ,
How to send mails for any business scenario without coding
29 Οκτωβρίου 13 07:46 μμ | tolisss | 0 σχόλια   

A few weeks ago, the eXpandFramework released registration support as discussed in How to manage users (register a new user, restore a password, etc.) from the logon form. While users could register, the implementation process was still incomplete it was missing email notification. Thus, this post will discuss the new EmailModule which was made available beginning version 13.1.8.2.

The module was designed following the workflow discussed in Declarative data auditing. In this post I will demonstrate how to install the module along with the registration functionality discussed in How to manage users (register a new user, restore a password, etc.) from the logon form in order to create three mail rules (

1) When new user is registered.
2) When the password is forgotten.
3) When a new customer is created.

In addition I will discuss how to restrict the EmailModue to sending emails only when a specific user role is logged in.

1) Installation

To complete installation, drag & drop the EmailModule from the toolbox into the module designer.

image

2) Enabling Registration

To use the registration process, the XpandSecurityWinModule & XpandSecurityWebModule must be installed just as we did with the EmailModule in step 1. Drag & drop these two modules from the toolbox into the module desinger. In addition, use the XpandLogonParemeters as the LogonParametersType of our authentication as illustrated in the following image.

image

The final step is to configure the model as shown below.

image

When the application starts, the logon form will have two extra actions. See below.

image

When the end user executes the top action, the XpandSecurity module will create a new view from the non-persistent RegisterUserParameters class.

image

Let’s stop here and configure the rule that will actually send an email..

4) Sending an email when a user is registered

The EmailModule will extend the Application model with an extra node

image

The first step towards sending an email is to setup the SmtpClient. See below.

image

Next we need to create an EmailContext that will instruct the EmailModule on how to locate the email template used for this type of notification.

image

Now it’s time to create the actual EmailTemplate. The EmailModule uses the Razor engine and provides an EmailTemplate persistent object for this. Thus, the code snippet inside a ModuleUpdater bellow can do the job!

image

And of course, XAF can do its usual magic in terms of the UI, allowing the end user to fully design the template at runtime in both windows and web!

image

The next stop is to create the rule that will send an email based on the template created when a new user registers. This is illustrated below.

image

and the mail is send!

5) Sending an email for a forgotten password

As you might have guessed, the process is awfully similar here. We create a different EmailTemplate persistent object for this type of a notification and then create a new model EmailTemplateContent.

image

Then we form a rule, which instead of using the RegisterUserParameters class will use the RestorePasswordParameter and the “pass forgotten Template” context.

image

6) Sending an email to all admins when a new customer is created

The procedure is pretty similar to the steps in the previous section. The difference is that in this case we will not set the CurrentObjectEmailMember attribute, since we want to send the email to all the admins and not to the customer. This is why we will need to create an EmailRecipient context as the image below illustrates.

image

After, we must create the actual rule where we will set the EmailReceipientContext attribute..

image

7) Sending emails only when a specific user role is logged in

If you already read the Declarative data auditing post you probably know that all modules that use the Logic module can create rules using three different ways.Code Attributes decorating a class, using the Application Model or using permissions as you see bellow.

image

 

image

Note that the above layout is inherited from the Logic module using the technique discussed in the Model View inheritance version post.

An alternative approach is to use the Model Application modifications discussed in this post and using the ModelDifference module apply them to a Role Model and assign that model to the roles you want. For more information on this approach, see Changing your web Model at runtime with Model Editor and no IIS reset.

Feel free to explore what I discussed in this post in the eXpand source code under Demos/Modules/Email/EmailTester.sln

As always feel free to use the eXpand forums for your feedback and questions.

Happy XAF’ing to all!

Δημοσίευση στην κατηγορία: ,
Schduler Reminders
22 Οκτωβρίου 13 06:58 πμ | tolisss | 0 σχόλια   

I am happy to announce one more contribution from the known to you Stephen Manderson the creator of Dashboard module and not only!

Installation

The reminders can be found in eXpand Scheduler module in version 13.1.7.12 and currently is available only for the windows platform (Stephen is working on the Web version as well!). So you only need to drag & drop the XpandSchedulerWindowsFormsModule into the module designer.

image

Usage

To enable reminders decorate a business object that implements IEVent with the Xpand.ExpressApp.Scheduler.Reminders.SupportsReminderAttribute. For example in the snippet we enable reminders for the TestEvent and only when the criteria match.

[SupportsReminder(Criteria = "Customer is not null")]

public class TestEvent : Event {

    public TestEvent(Session session) : base(session) {

    }

 

    // Fields...

    Customer _customer;

 

    [Association("Customer-TestEvents")]

    public Customer Customer {

        get { return _customer; }

        set { SetPropertyValue("Customer", ref _customer, value); }

    }

}

The SupportsReminderAttribute will extend your Application Model with an extra member.

image

It is also possible to use directly the model to create this extra member.

image

The end user to enable reminder for the TestEvent he has to check the enable reminder and setup an interval as shown below.

image

Then he can continue work with his XAF application and when the interval pass a reminder will popup!

image

You can test this functionality using the SchedulerTester solution found with eXpand sources unders Demos/Modules/Scheduler folder!

Thanks again to Stephen for this one and we all wait for the web version!

As always feel free to post your feedback question at eXpand forums.

Happy XAF’ing to all!

Δημοσίευση στην κατηγορία:
StateMachine - Allow hiding and disabling transition actions based on security and current object criteria
15 Οκτωβρίου 13 06:55 πμ | tolisss | 0 σχόλια   

I will provide a short discussion on how to extend XAF StateMachine module as per subject.

By design when creating a new State the it is possible to restrict the transition to that State using Criteria. For example in the below image we see that the transition to the Completed state is allowed only to Administrators.

image

When you try to make the transition to the Completed state a handled exception will be raised however our goal is to hide all transitions that criteria do not fit.

So given the above requirement we need to write a controller that will go though all data hosted in the ChangeStateAction expose an event that will provide the state from external sources.

You can explore the controller that describes this requirement at

https://github.com/expand/eXpand/blob/master/Xpand/Xpand.ExpressApp.Modules/StateMachine/Controllers/ChangeStateActionController.cs

The next step is to subscribe to RequestActiveState event of the above ChangeStateActionController and provide the Active state logic. Below is illustrated a possible implementation.

public class CriteriaActionStateController:ViewController<ObjectView> {

    private const string HideIfCriteriaDoNotFit = "HideIfCriteriaDoNotFit";

    ChangeStateActionController _changeStateActionController;

 

    protected override void OnActivated() {

        base.OnActivated();

        _changeStateActionController = Frame.GetController<ChangeStateActionController>();

        _changeStateActionController.RequestActiveState+=ChangeStateActionControllerOnRequestActiveStateAction;

    }

 

    public override void CustomizeTypesInfo(DevExpress.ExpressApp.DC.ITypesInfo typesInfo) {

        base.CustomizeTypesInfo(typesInfo);

        var typeInfo = typesInfo.FindTypeInfo(typeof (XpoState));

        typeInfo.CreateMember(HideIfCriteriaDoNotFit, typeof (bool));

    }

 

    protected override void OnDeactivated() {

        base.OnDeactivated();

        _changeStateActionController.RequestActiveState-=ChangeStateActionControllerOnRequestActiveStateAction;

    }

 

    void ChangeStateActionControllerOnRequestActiveStateAction(object sender, ChoiceActionItemArgs choiceActionItemArgs) {

        var key = typeof(CriteriaActionStateController).Name;

        choiceActionItemArgs.Active[key] = IsActive(choiceActionItemArgs.Transition);

    }

 

    bool IsActive(XpoTransition xpoTransition) {

        var hideIfCriteriaDoNotFit = xpoTransition.TargetState.GetMemberValue(HideIfCriteriaDoNotFit) as bool?;

        if (hideIfCriteriaDoNotFit.HasValue&&hideIfCriteriaDoNotFit.Value) {

            var stateMachineLogic = new StateMachineLogic(ObjectSpace);

            var ruleSetValidationResult = RuleSetValidationResult(xpoTransition, stateMachineLogic);

            return ruleSetValidationResult.State != ValidationState.Invalid;

        }

        return true;

    }

 

    [Obsolete("in 13.2 the ValidateTransition will be public")]

    RuleSetValidationResult RuleSetValidationResult(XpoTransition xpoTransition, StateMachineLogic stateMachineLogic) {

        var methodInfo = stateMachineLogic.GetType().GetMethod("ValidateTransition");

        return (RuleSetValidationResult) methodInfo.Invoke(stateMachineLogic, new[]{xpoTransition.TargetState, View.CurrentObject});

    }

}

In the above controller (also available in eXpandFramework online repo) we also see that override the CustomisedTypesInfo to create a new member that will allow the end user to decide if he wants to hide the transition or use the by design behavior.

image

As always let us know your feedback using eXpand forums or for this functionality only you can post your feedback at this issue at DevExpress Support Center.

P.S. This implementation is available with the StateMachine module of eXpandFramework 13.1.7.10 and is also possible to do the same with permissions (see http://goo.gl/T0ZinL)! Also note that is totally possible to just grab the discussed controllers and add them in your projects without the eXpandFramework.

Δημοσίευση στην κατηγορία:
The XAF training week in Germany
14 Οκτωβρίου 13 06:08 πμ | tolisss | 0 σχόλια   

Last week I had the privilege to join many of our customers at Oliver’s XAF Training Class in Germany. I wanted to take the time and share with you what happened at the event – as it was an amazing week and highly recommend it to all XAF users. 

The location

The hotel is located high in the mountains and the above an amazing landscape…a simply beautiful location.

image

The agenda

Day 1:

The organizers (Oliver and John) did a great job with course content. You can see all the XAF courseware below.

image

Day 1 started with XPO and how it works independent of XAF. Oliver is an XPO legend so the introduction was amazing and even I learned some new stuff. Oliver then took the time to describe XAF Domain Components and other data layer related subjects.

The day continued with a number of hands on labs so everyone can learn by actually doing.

To help get relaxed after a busy day of learning, we spent some time on the golf course.

image

Day 2:

The day started with instruction on editing and maintaining the model as well as standard functionality available through it. Actions, controller extensions binding business logic was also on the menu.

Oliver is an experienced instructor and did great job in this topic area as well. Like day 1, hands on labs were on day 2’s agenda.

image

The day ended with time at the spa and a great dinner.

Day 3:

This day involved learning about the built-in modules in XAF and so Oliver spoke to us about Security, Validation, Printing, Reporting, Auditing, State Machines. We covered all simple modules with a few hours of hands on labs.

To blow off steam, John and Oliver organized an evening at the mini-car race track. Many of us gave it our best shot to win….

image

Unfortunately only one person can win… Smile.

image

Day 4

With spirits high, Oliver moved onto more advanced modules like XAF’s Scheduler, KPI, WorkFlow and of course a few hours of hands on labs. He also took the time to go further into more difficult topics such as extending and working outside the XAF framework.

The class insisted so I also did a presentation on eXpandFramework where I described how you can use all that extended functionality in our community project.

Day 4’s final event involved alcohol, so I’m not going to post any pictures  here Smile.

Day 5 

Unfortunately I had a early flight on the last day and couldn’t attend however I can share the daily agenda.

• Modularizing your own functionality

• Testing

• Deployment / Update / ALM / Security Considerations

• Q&A

Way to go to John, Oliver and DevExpress for this amazing XAF training week!

Until next time, Happy XAF’ing to all!

Subscribe to XAF feed
Subscribe to community feed

Δημοσίευση στην κατηγορία: ,
How To create custom menus in DevExpress‐XAF‐Win‐Applications
09 Οκτωβρίου 13 07:51 πμ | tolisss | 0 σχόλια   

If you need to customize the default templates consider going through the instructions posted by Michael Lang in our Support center.

The issue I am talking about can be found at B234907. Just download the pdf and follow the very detailed instructions.

Big thanks to Michael! for this sharing this, let us know your questions/feedback by replying on the same issue.

Dashboard web integration module
05 Οκτωβρίου 13 06:10 μμ | tolisss | 0 σχόλια   

I am happy to announce web support for the module discussed in Dashboards in the real world – A Scotland strike! Big thanks to Stephen Manderson for this additional contribution!.

Installation
Drag & drop from the VS toolbox.

image

End Result

image

Please use eXpand forums for your feedback and questions!

p.s. : the module is released with eXpandFrameowork v13.1.7.6.

Δημοσίευση στην κατηγορία:
A Google Map module for XAF web applications
25 Σεπτεμβρίου 13 07:43 πμ | tolisss | 0 σχόλια   

XAF it’s a great platform simply because everything is pluggable and reusable! In this post I will demonstrate one more pluggable and reusable contribution – the MapView module from Sergej Derjabkin!

Scenario: We have a business object which has an Address property and we want to display them in Google maps. However we have no time to research or develop anything by ourselves.

Step1: Install the MapView module by drag & drop from the toolbox.

image

Step2: Open Application Model editor to configure from where the module will take its data. This requires that we locate the Customer in the BOModel node and simply change the attributes as illustrated below.

image

Step3: To display the Customer Addresses, the MapView module provides the MapListEditor. Simply install the MapViewWebModule and assign the list editor to the Customer_ListView.

image

Step4: Run the XAF web app and see the results in the map!

image

Bonus scenario: Display a detail view of the mapped address.

Sergej Derjabkin also contributed webmaster detail functionality which is available with XpandSystemAspNetModule so install it as in Step1 and set the MasterDetailMode attribute to ListViewAndDetailView. Youi ‘ll need to override the SupportMasterDetailMode of your WebApplication descendant and return true.

image

Simple and fast – the XAF way!

Sergej Derjabkin released his MapView module as a preview in eXpand v13.1.7.2 and asked me to get your feedback in order to develop further, so feel free to thank him personally and ask your questions or even contribute your code or ideas in eXpand forums. To see MapView module in action use the Demos/Modules/MapView/MapViewTester.sln found in eXpandFramework sources.

Subscribe to XAF feed
Subscribe to community feed

Δημοσίευση στην κατηγορία: ,
Web shortcuts supported!
22 Σεπτεμβρίου 13 05:10 μμ | tolisss | 0 σχόλια   

Using the next version 13.1.7.3 of eXpandFramework consider designing your shortcuts in a platform agnostic module because it will be possible to be used in your web apps as is!

To enable the web shortcuts you need to install the XpandSystemAspNetModule. If you want to disable them you can use the model setting you see below.

image

 

For this implementation I used the jwerty javascript library, however this library cannot detect successfully a few shortcuts used by the browser such as the Ctrl+N and the Ctrl+T. Therefore I added the CtrlNReplacement, CtrlTReplacement attributes you see in the image above. If you know a better library than jwerty that works better I can replace it at once.

Let me know your feedback in eXpand forums please

Happy XAF’ing to all!

Δημοσίευση στην κατηγορία:
How to manage users (register a new user, restore a password, etc.) from the logon form
19 Σεπτεμβρίου 13 06:45 πμ | tolisss | 0 σχόλια   

The excellent E4037 example from DevExpress Code Central is integrated with our community project (eXpandFramwork) in version 13.1.7.1.

Installation

This functionality is embedded in the XpandSecurityWinModule/XpandSecurityWebModule depending on the platform you use. All eXpand modules are in the toolbox for fast Drag & Drop installation.

image

Configuration

The configuration for this feature as excepted can be found in the XAF Application Model options node under the Registration sub node as illustrated below.

image

Attribute Enabled : Setting it to true two extra action Register and ForgotPassword will be activated in the Logon form as shown

image

image

UserModelClass: Here we can configure the type of user that will be created

EmailMember: This is a lookup of all members of UserModelClass and is only to save the email. 

RoleModelClass && RoleCriteria: Using those two attributes we can configure which roles will be assigned to the new registered user.

Hope you find it useful and you have a lot of feedback for it in eXpand forums.

p.s. : This implementation does not send registration or pass forgotten emails. I will release a new EmailModule following the workflow presented in Declarative data auditing. Do not forget that we are talking about highly extensible modules as all XAF modules are so, In the meantime it is really easy to write a controller and send the mail you like.

Forgot to mention that there is also Password Score model member attribute you can use to validate the new password against common limits like Very Weak, Weak, Strong etc.

Happy XAF’ing to all!

Δημοσίευση στην κατηγορία:
XAF community forums are OPEN!
16 Σεπτεμβρίου 13 06:25 πμ | tolisss | 0 σχόλια   

Although XAF has many communication channels like the official support center, the XAF facebook site, the eXpand forums etc. apparently there is a need for a forum dedicated only to XAF where people can discuss anything XAF related without either the XAF or the eXpand team will interfere unless explicitly requested of course.

So feel free to use this new forums I opened.

XAF Only Forums

Model View inheritance in next eXpandFramework version
30 Αυγούστου 13 02:35 μμ | tolisss | 0 σχόλια   

Right now in XAF it is possible to Clone an Application Model node by simply right click on it and choose Clone from the context menu. What will happen is that an identical node will be created. However by design, further modifications are not synchronized between mother-child nodes. I am going to demonstrate a different approach that does synchronize child nodes and you can find it in eXpandFramework 13.1.6.9 or later when using any module.

In the next image we see two Application Model views, first the MDO_DetailView -the base node- and then the RDO_DetailView which its ModelClass.Type descents from the MDO_DetailView ModelClass.Type.

image

In any Object View it is now possible to add MergeDifference items like the “Everything MDO” we see in the above picture. The Lookup datasource of the View attribute enumerates all views of the hierarchy chain of the current View.ModelClass.Type. For now, there are two Strategies (Everything and Only Layout). The merging algorithm will create a model node out of the differences of all loaded modules. For example the RDO_DetailView will have the modified/bold Layout of the MDO_DetailView layout as startup layout.

For any questions, feel free to use the eXpandFramework forums.

Happy XAF’ing to all!

Δημοσίευση στην κατηγορία: , ,
Περισσότερες Δημοσιεύσεις Επόμενη »

Search

Go

Το Ιστολόγιο

Συνδρομές