May 4, 2016 5:10 pm
It has become difficult for me to manually maintain the Smart Office Mashups of my customer – there are about 50 files, 1,000 controls, and 10,000 lines of XAML – so I am developing a software verification tool that does automatic quality control for me.
I defined a set of predicate rules, and I use XPath to validate the Mashup against those rules. I am using Python for now because of its expressiveness and interactivity, but I will port it to JScript.NET or C# soon to benefit from the Smart Office API.
As a sample rule, I want all the <m3:ListPanel> controls to have the property IsListHeaderVisible=”True” such that users have the ability to expand the list header and change the sorting order, view, and apply filters. If one of the list panels does not have that property I want to know about it and correct it. Note this is my own preference, and other developers may have the opposite preference.
Here is the property in Mashup Designer:

The following XPath expression will return the list panels not validating the rule:
//m3:ListPanel[not(@IsListHeaderVisible="True")]
Here is a Python code to validate that rule:
import os
import glob
import lxml.etree as etree
for f in glob.glob(os.path.join(r'C:\RentalCounterMashup', '*.xaml')):
tree = etree.parse(f)
r = tree.xpath('//m3:ListPanel[not(@IsListHeaderVisible="True")]', namespaces={'m3': 'clr-namespace:MForms.Mashup;assembly=MForms'})
for element in r:
print(f, element.attrib['Name'])
The result is the following, a list of XAML filenames and <m3:ListPanel> names that fail the rule:

In my example, out of 63 list panels, 46 had the property, and 17 were missing the property, that’s 27% of list panels not passing the quality control. In other words, I was able to quickly identify a third of the list panels to correct.
I have many more ideas to implement, for example:
That’s it!
Let me know in the comments below if you have other rules to control the quality of Mashups.
Please click Like, share this post with your colleagues, click Follow to subscribe, come write the next blog post with us, and send some love to the other M3 blogs as well. This is a volunteer-based community, and your participation keeps the community alive and growing. Thank you.
Posted by thibaudatwork
Categories: Infor Smart Office Mashups
Tags: M3, Mashup, Smart Office, Tools
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.
[…] Mashup quality control May 4, 2016 […]
LikeLike
By Mashup quality control #2 – M3 ideas on May 5, 2016 at 5:53 pm
[…] Mashup quality control May 4, 2016 […]
LikeLike
By Mashup quality control #5 – M3 ideas on May 18, 2016 at 6:24 pm
[…] Mashup quality control #1 May 4, 2016 […]
LikeLike
By Mashup quality control #6 – M3 ideas on May 24, 2016 at 5:23 pm
[…] Mashup quality control #1 May 4, 2016 […]
LikeLike
By Mashup quality control #4 – M3 ideas on May 31, 2016 at 8:01 pm
[…] Mashup quality control #1 May 4, 2016 […]
LikeLike
By Mashup quality control #3 – M3 ideas on May 31, 2016 at 8:02 pm
[…] Mashup quality control #1 – <m3:ListPanel IsListHeaderVisible=”True”> […]
LikeLike
By Mashup quality control #7 – M3 ideas on November 1, 2016 at 12:43 am
[…] Mashup quality control #1 […]
LikeLike
By Site map – M3 ideas on May 9, 2017 at 12:26 pm