Open Menu

Synergex Blog

Let’s get Physical – at DevPartner 2017!

By Richard Morris, Posted on March 8, 2017 at 8:38 am

The DevPartner 2017 conference is rapidly approaching and so I thought I’d follow on from Steve’s recent blog about the conference and what a content packed agenda we have this year. As usual we have the hugely successful customer demonstrations – always great to see how developer are making the most from Synergy today. There are guest speakers taking about testing your software – and I thought if it compiled it was tested, so I’ll be glued to that one. We also have a student Physiotherapist guest speaker – not your usual topic for a Synergy software conference I must agree!

Way back in 1981 a certain blond bombshell by the name of Olivia Newton-John hit our screens in tight pink leggings telling us all to “get physical”. For many around my age she was the pin-up of our times. I’m sure I can recite all the lyrics today! Although we won’t be seeing Miss Newton-John at the conference (sorry) we will be “getting physical”!

As part of an undergraduate degree I’ve developed an interactive mobile app:

Exercise compliance is one of the most important parts in patient rehabilitation, and yet it is given minimal consideration. The Chartered Society of Physiotherapists (CSP) detail that the first step in rehabilitating a patient back to their pre-injury function lies with their Physiotherapist’s ability to educate and motivate their patient through a clear and concise home exercise program. Patients can regularly expect to receive a printed sheet of generic exercises laden with hand-written amendments which look to tailor the exercises to the patient’s needs. Given that more than 70% of adults in the U.K. own a smartphone, there has never been a better time to take the technological leap and focus of connecting with and engaging patients much more remotely. That’s where Physio My Way comes in.”

And so Physio My Way was born. Written entirely in Synergy .Net it’s a true mobile application that is designed to educate patients to perform the correct exercises and monitor their compliance with the exercise schedules defines by their therapist. In-app options include the ability to review the various assigned exercises and stream videos that show just how they should be performed. Guidance is provided through spoken instructions and monitoring patient compliance is recorded using the devices accelerometer.

Movement patterns and screen activity can provide a clear and detailed account of every single repetition that a patient completes. Their Physiotherapist will have secure access to all of their patients’ data through their own personal log in. Specifically, this means that all exercise progressions or regressions will now be based on objective outcome markers, rather than a patient’s subjective recollection of their exercise completion. This gives superior reliability of patient feedback and is based on key Physiotherapy findings such as severity, intensity and frequency of pain and rate of perceived exertion at every interval.”

Our guest student Physiotherapist , Ashley, will be presenting an interesting session on his design and the theory behind the Physio My Way app and the results from his studies – did it improve people’s compliance with their prescribed exercise plan? And I’ll be dissecting the technologies used to develop and deploy data in the cloud and the app to Google Play Store and the Apple App Store:

At the post conference workshop on 12th May I’ll be building, from the ground up, a cross-device mobile application through lecture and demonstration. The session will target both Android and iPhone devices. Using the latest Synergy tools, Xamarin forms and Visual Studio.  We will initially build and deploy a simple cloud based server. From here we will build a client connection module to communicate to our server and also implement the required code to manage Synergy device licensing. Next we will layer on the UI – XAML based cross device compliant forms. We’ll include some cool Xamarin components and finally build and deploy to both iPhone and Android. It’s a not-to-be-missed day if you are interested in expanding your Synergy applications capabilities onto the mobile device platforms.

Make sure to sign up and bring your exercise gear as we “get physical” at DevPartner 2017!

Drilling for Data

By Richard Morris, Posted on April 20, 2016 at 5:44 am

One cool aspect of a Synergy UI Toolkit program has been list processing. When we introduced the concept of a list load method to populate the list as items were required was a huge step towards decoupling the program logic from the user interface. Because of this separation of concerns it’s actually very easy using the Symphony Framework to load a modern WPF data grid using an existing UI Toolkit list load method.

Our starting point has to be the UI, and that’s being rewritten in XAML. XAML allows data binding between class properties and the column elements of a data grid. We exposes our Synergy data by use of a Symphony Data Object. These data object classes represent your repository based data structures. The fields within your structures are exposed as the properties that the data grid will data-bind to.

Once we have the data grid defined we need to define the hooks between the collection of data we are going to expose to the data grid and the host programs list load method. First we call a generic method that will allow us to signal the required list loading requirements back to the host program. This snippet is going to call a generic method that will then raise the event back to the host:


We are passing the load method name and then various parameters that define the actual data we are going to load and any additional list load method data. Now we can raise the load method request to the host DBL program:


In the host DBL program we need to handle the event so we register an event handler:


The following code snippet dispatches the load request to the existing UI Toolkit load method. There are two formats to the request depending if the list has associated list method data:


So now we need to change the load method. If you have coded your list load method according to the standards laid out in the UI Toolkit manual there should only be a single line of code to change:


The DoingTK test is a flag we have set to indicate if the program is running with the traditional UI Toolkit or our new WPF UI.

We shall be drilling down into the ability to handle list loading during the DevPartner 2016 pre-conference workshop as we all migrate an existing UI Toolkit program to a modern WPF user interface.

STOP! Validation Alert

By Richard Morris, Posted on April 12, 2016 at 12:00 pm

It’s the tried and trusted way to get the users attention. At the slighting hint of an issue with their data entry you put up a big dialog box complete with warning icons and meaningful information.


We’ve all done it, and many programs we write today may still do it. Writing code using the Synergy UI Toolkit its common practice to write a change method to perform field level validation. When the user has changed the data and left the field – either by tabbing to the next or clicking the “save my soul” button – the change method executes and validates the entry. It is here were we stop the user in their tracks. How dare they give us invalid data – don’t they know what they should have entered? It’s an ever so regimented approach. The user must acknowledge their mistake by politely pressing the “OK” button before we allow them to continue. Users are usually not OK with this interruption to their daily schedule so there must be a nicer way to say “hey there, this data is not quite as I need it, fancy taking a look before we try to commit it to the database and get firm with you and tell you how bad you are doing at data entry?”

When migrating to a new Windows Presentation Foundation UI we can do things a little different and guide the user through the process of entering the correct data we need to complete a form or window. We will still use the same change method validation logic however as there is no reason to change what we know works.

When using the Symphony Framework you create Symphony Data Objects – these classes represent your repository based data structures. The fields within your structures are exposed as properties that the UI will data-bind to. These data objects are a little bit cleverer that just a collection of properties. Based on the attributes in the repository it knows what fields have change methods associated with them. Because of this the data object can raise an event that we can listen for – an event that says “this field needs validation by means of this named change method”. Here is a snippet of code registering the event handler:


The event handler simply raises the required “change method” event back to the host DBL program;


Back in the DBL program we can now listen for the change method events. Here is the event handler being registered:


Remember, we are now back in the host DBL code so we can now dispatch to the actual change methods registered against the field. This is a code snippet and not the complete event handler code:


We are calling into the original change method and passing through the required structure data and method data. Inside the change method we will have code that validate the entry and then, as this snippet shows, we can perform the error reporting:


If the code is running as a UI Toolkit program the normal message box dialog is used to display the message. However, when running with the new WPF UI the code provides the required error information against the field. No message boxes are displayed. To the user they will see:


The edit control background is coloured to indicate an issue with the data and the tooltip gives full details of the problem. When the user has entered valid data, the field reverts back to the standard renditions:


We shall be exploring the ability to handle field change method processing during the DevPartner 2016 pre-conference workshop as we all migrate an existing UI Toolkit program to a modern WPF user interface.


What’s on the menu today?

By Richard Morris, Posted on April 6, 2016 at 5:51 am

Menu processing is a fundamental requirement in any UI Toolkit program. Without menu columns and entries your program would not function. You also signal menu events from toolbars, and buttons placed on windows and lists. Once a menu entry of any sort is fired, even if it’s signalled from within the DBL code, there is usually a using statement that dispatches to the required segment of logic. When configuring a new Windows Presentation Foundation UI this technique is still valid.

The Symphony Framework UI Toolkit assists the developer to bridge the connection between the DBL host program and the commands associated with menu bars, toolbar, and buttons – basically any WPF control that can bind to a command, and that includes selecting an item within a data grid!

Before we head into how the Symphony Framework UI Toolkit helps let’s first look at some simple UI Toolkit script and code snippets. Firstly we can create menu entries in scripts:


Here we have a menu column called “mfile” with an entry called “f_new”. The important element is the entry name “f_new” as this is the menu signal name that is used within the DBL code. You can create toolbars in code that will signal a menu event, for example:


Here we have the same menu event name of “f_new” being signalled when the toolbar button is selected. We can also add buttons to tab containers;


Windows and lists can also have buttons added to them both in scrip and in code;

m4 m5

If we need to enable or disable the “f_new” capability within the UI Toolkit application we need to do this for all instances, for example;


The Symphony Framework UI Toolkit removes the verbosity of this structure of programming while retaining the same logical concept. Using the Symphony.UIToolkit.Menu.MenuController class allows you to create a command;


Now we have the command we can bind it to any WPF control that accepts a command binding. So for a menu;


We can utilise the same command on, for example, an Infragistics ribbon control;


Using a regular tool bar;


And of course as a regular button on an input form or data grid view;


In the host DBL code we can now simplify the control of the commands. By enabling the single command it changes the executable status of the all UI controls that it is bound to;


When the command is executed the toolkit menu entry is signalled to the host program. We need to define an event handler;


This is a code snippet and not the complete event handler code:


This code is setting up the required menu entry name and then calling into the host DBL code to process the menu select. In the host program we need to ensure that we dispatch to the menu processing code segment. In this example the original toolkit code was processing an input form. We continue to process the input window using the i_input() routine if the toolkit is still the active environment. If we are running using the new WPF UI then we simple process the menu event;


We shall be covering menu, toolbar and command processing during the DevPartner 2016 pre-conference workshop as we all migrate an existing UI Toolkit program to a modern WPF user interface.


Microsoft Make Xamarin Tools Free

By Steve Ives, Posted on March 31, 2016 at 8:49 am

One of the big news items from today’s Keynote at the Microsoft Build conference is that the Xamarin tools, which allow .NET developers to create fully native apps for the iOS, Android and Windows Universal platforms with a single code base, will in future be bundled for free with Visual Studio. Microsoft purchased Xamarin in February 2016 and since then a lot of developers have been waiting with baited breath to find out what would change, and now we know. Exciting news if you want to develop mobile applications.

Covers? Better than the original?

By Richard Morris, Posted on March 21, 2016 at 9:51 am

I’m sometimes sceptical when somebody covers a song I know and love as I’m worried that their version may not bring with it the true spirit of the original track. If it’s not done right it just won’t be pleasing to the ear, and music should always invoke passion. When customers ask us to demonstrate how to put a new User Interface over an existing program I’m always conscious that our “cover” needs to retain the proven logic of the original program while offering the user a new and pleasing, easy to use and navigate, user experience.

In recent weeks I’ve been developing the Symphony UI Toolkit, which as the name suggests, helps you to migrate your Traditional Synergy UI Toolkit programs to a modern Windows Presentation Foundation (WPF) based UI. This new member to the Symphony ensemble provides a number of simple techniques for connecting between the WPF UI and the existing “event” driven DBL code.

One recent engagement where I utilise the whole Symphony Framework, including the new Symphony UI Toolkit, was to add a modern UI to an existing UI Toolkit program. The basic solution was to write the new UI in Synergy .NET using XAML for the UI components. Then host this in the existing Toolkit program using the DOTNET API. We started off with:


The program presented a list of items from which the user could select from. Other than the slightly dated look and feel the main problem with the application was that the user was restricted to seeing only the information on a single tab page at a time. The brief for the new UI was simple – make the pages dock-able.

Utilizing a number of core features within the Infragistics UI control set I was able to retain all the logic from the original program and bring a fresh new UI to the user:


Now as the user navigated the main list of items, while the docked panels display the relevant information. The grid provided the required filtering and grouping capabilities and selecting an item changed the fields on the input panels to edit mode so changes and additions could be made.

The Microsoft styled ribbon control replaced the traditional menu columns and button toolbar. Additional options were made available within an Outlook style navigation bar – which can be hidden with a single click.

The original program code was modified in a way that we can swap between running the traditional UI Toolkit UI and the new WPF UI by changing a single setting in the synergy.ini configuration file:


Although targeting the UI Toolkit the steps involved in migrating to a new WPF UI with the Symphony Framework will work just as well with almost any style of DBL program, and you can try it for yourself at DevPartner 2016. Join me in the recording studio for the Monday pre-conference workshop where together we’ll make a great new cover version of an old Toolkit program. The day will start relaxed as you write code to handle menu, toolbar and button commands. Then we’ll up the tempo and you’ll code event handlers to execute list load methods. Then we’ll jazz things up a little handling change methods and field validation. By the end of the day we’ll have a number 1 hit on our laptops.

Investing in the look and feel of your applications doesn’t matter…or does it?

By William Mooney, Posted on October 7, 2015 at 10:29 am

synergex-blog-image2Years ago I used to say to our direct corporate end-user customers, “You’re lucky. It doesn’t matter what your application(s) looks like because you’re not selling to compete for new business—all that matters is that it works well and meets your business needs.” End-users plugged merrily along, content to focus on functionality and substance, often in the form of a green-screen front end. In fact, many of those customers claimed that a character-based/green-screen application was much more efficient than using a “cumbersome mouse”—especially when it came to data entry. In the 90’s when Windows, GUI, and the like came on the scene our Independent Software Vendors (ISVs) had a different story—to be competitive, the ISVs suddenly had to worry about both how well their applications functioned AND how they looked. People and companies didn’t want to buy applications that weren’t shiny and new with a great user interface (UI)—even if a sophisticated UI didn’t always correlate with a sophisticated application under the hood. It became a game of how flashy can you make it as opposed to how well does it function.

Fast-forward a few years, and now everyone has to play on the same field—ISVs and corporate end-users. In today’s world, even corporate end-users need to make the move to modernization. If they don’t, the next generation of decision makers will. And when that happens, it’s likely the existing, time-proven solution that has been customized and fine-tuned over the past 30+ years, the one that makes the business unique and competitive, the one that has solved—and continues to solve—everyday business issues, will not survive. Yep, this new generation of decision makers will judge the book by its cover and determine the value of the application based on the way it looks and not what it does. It makes sense, because this new generation grew up knowing only great-looking applications—applications that are generally simpler and more discrete in functionality than complete, integrated solutions that touch every part of the organization but appear less shiny and sophisticated.

So, the bottom line is that if your application doesn’t look great, it will be perceived as less than great, and when that new decision maker comes in—it may be too late to save what you’ve spent so many years perfecting. Needless to say, I strongly recommend that all customers invest in modernizing their application(s) with a great looking UI and UX (user experience). As Billy Hollis affirmed at the recent Synergy DevPartner Conference, UX is equally as important. It’s not just the look and feel, but also the experience of the user that’s critical. It’s important to emphasize here too that a great UI/UX design and a high-performing/highly productive solution are not mutually exclusive. Having a well-designed GUI based application can only add to the functionality and power of your solution. So even if you feel your character-based solution is really the best one for your business, it’s rare for the look and feel to be overlooked in favor of substance. I can’t stress enough the importance of making this investment.

A significant benefit of having a Synergy-based application is that you can separate the UI from the logic and data. This means you can use future UIs without sacrificing the years of investment you have put into your business application. While the look and feel is what everyone sees, in reality the business logic is the true value. And once these two are separated, you can extend the life of your application(s) indefinitely, taking advantage of the ever evolving UI trends that come along. Although it may take some effort initially to separate the UI from the back-end, this is the course of least resistance and investment, and it will offer the largest and longest return.

At Synergex, our main focus is to develop solutions to help you advance and leverage your investment to take advantage of the latest modern technologies. In fact, with our recent release of Synergy DBL, we are venturing into the Universal Windows Platform (UWP), the latest UI experience. And while none of us can be certain what UI trends will be popular 10 years from now, just as none of us back in the ‘80s could have imagined what today’s UI would look like, I’m confident that we will be able to help you leverage your back-end and take advantage of whatever the future holds.


Subscribe to the RSS Feed!

Recent Posts Categories Tag Cloud Archives