DevExpress XAF is a framework for .NET and Visual Studio developers who wants to create Office-like LOB apps for desktop, web and mobile faster and without hiring a large team.
As you probably know, it is possible to control the size of Web popup windows in code (btw, would not it be nice to control this via the application model as well?) or end-users can perform resizing themselves. Starting with 12.2, end-users will also be able to quickly maximize the popup window using the familiar interface. Let's see the attached video for more details:
In this particular case, all kudos go to our ASP.NET team, because they have improved the ASPxPopupControl component in 12.2 and my work was to just enable a single option by default and ensure that it operates correctly in XAF Web UI. I hope you are looking forward to the 12.2 release!
If you are not using our functional testing framework - EasyTest yet (if you fall into this category, do not feel bad as you are not alone - our stats (example) show that you are still in the majority:-) ), then this is a good chance to start!
I would like to talk about an internal *AutoTest command that we use to test XAF Code Examples during the initial testing phase internally (before running example-specific tests). This command checks all the navigation items in your app and ensures that list and detail forms can be opened without errors. Not much, but at least it allows you ensure the minimal possible quality of your application before delivering it to the client. Of course, if you wish more, you can choose from dozens of other built-in EasyTest commands or even implement a custom EasyTest command with blackjack and ..., you know:-)
BTW, creating a custom EasyTest command is not that difficult at it appears, expecially taking into account the detailed tutorial and the availability of the full source code of the built-in EasyTest commands: %ProgramFiles%\DXperience 12.1\Sources\DevExpress.ExpressApp.Modules\DevExpress.ExpressApp.EasyTest.WinAdapter\ %ProgramFiles%\DXperience 12.1\Sources\DevExpress.ExpressApp.Modules\DevExpress.ExpressApp.EasyTest.WebAdapter\
Well, returning to simple things, this is how to use the command I was talking about: #Timeout 10 #DropDB SimpleProjectManager #Application SimpleProjectManagerWin ;#Application SimpleProjectManagerWeb *AutoTest
You can past this stuff (correct app names first, of course!) into the <YourSolutionName>.Module\FunctionalTests\Sample.ets file (it comes with the default XAF solution template) and then right click to choose the Run command in the menu (see this help article for more details).
And here is the result it produces:
As I mentioned in the beginning, this command is internal and unofficial. We also have not tested it under all scenarios supported by XAF. That said, we may not be able to fix issues with it in a reasonable time frame, so please use it at your own risk, and feel free to modify and test it further to better meet your business requirements.risk. Or better implement normal functional tests for each required screen in your app using the wonderful EasyTest Script Reference.
Some of you will probably be interested in knowing that the BO Designer will have a few usability improvements in version 12.2. I have summarized what I have recently implemented to the designer in this short video:
If you are using Domain Components (DC), you may be already aware of the fact that XAF generates real business entities from registered DC interfaces at runtime. If you have a code that checks types of the current object (e.g., you want to do something only if the current object is of YourBusinessEntityType), you should take this important fact into account, otherwise it may lead to an error, which is quite easy to diagnose, though. A good example of this can be found in this Support Center ticket (which actually forced me to blog about this):
usingDevExpress.ExpressApp.DC; usingDevExpress.ExpressApp.Xpo; ... private void checkType_Execute(object sender, SimpleActionExecuteEventArgs e) { foreach (object current in View.SelectedObjects) { /* This is wrong, because real types are generated at runtime based on registered DCs. if (current.GetType() == typeof(DomainComponent1)) */ //The next three variants are good to go. //if (typeof(DomainComponent1).IsAssignableFrom(current.GetType())) //if (current.GetType() == ((IDCEntityStore)XafTypesInfo.PersistentEntityStore).GetGeneratedEntityType(typeof(DomainComponent1))) if (current.GetType() == XpoTypesInfoHelper.GetXpoTypeInfoSource().GetGeneratedEntityType(typeof(DomainComponent1))) DoSomethingUseful(); } } ...
As you can see, DC provides you with a method that returns the generated runtime type. Also, the type of the generated entity supports or implements DC interfaces used to form this entity, so you can use the System.Type.IsAssignableFrom method here. I hope you find this information helpful.