Finding their way to a new UI
How a Synergex customer works towards modernizing the UI of their cell-based Synergy application
For more than 25 years, Turnkey Computer Systems, LLC has been a major supplier of software to the cattle-feeding industry. They take pride in their innovative and ongoing development of multi-user database applications accessible via remote, web, and wireless network connections. Their main management and accounting database and the core of their feedyard software applications is the Feedyard Accounting & Management System. It deftly handles all cattle inventory activity, serves as the source for all commodity activity, and provides for charge entry, billing, performance analysis, projections, historical analysis, and an extensive flexible reporting function.
Turnkey’s core software applications are developed in Synergex’s Synergy DBL language, with a significant portion of the user interfaces implemented via UI Toolkit, Synergex’s user interface design tool for character-based systems. In recent years, they have developed several ancillary applications, primarily using Microsoft technologies such as .NET. These applications were implemented using a mixture of the Visual Basic and C# programming languages. Some of these applications interfaced with the core Synergy applications via Synergex technologies such as xfODBC and xfServerPlus. Others didn’t interface directly with the core Synergy applications and stored their data in relational databases.
Turnkey felt that the primarily character-based user interface of their core Synergy applications was becoming a cause for concern. While existing customers were satisfied with the current applications running on their Linux systems, it was becoming more difficult to win new business, especially as key competitors already had Windows-based offerings with more modern user interfaces.
Steve Ives, a Sr. Consultant of the Synergex Professional Services Group (PSG), visited the company to help them evaluate their options and figure out how to leverage their existing applications for the future. The primary goal was to replace the existing character-based applications with new applications that had a modern graphical user interface but that employed the logic from the current applications wherever possible. A secondary goal was to develop these new applications in a way that minimized their upkeep, which is usually accomplished by clearly separating the user interface code from the code that implements business logic and database access.
To facilitate the re-use of existing business logic and database access code and to retain compatibility with current customers’ systems and data, the most logical choice was to use Synergy DBL to implement the core business logic and data of any new applications. In addition, client/server technology would be required, to allow the new graphical client applications to be supported by business logic and data residing on existing customer systems.
Steve helped Turnkey decide what technology should be used to implement new user interfaces and what middleware should be used to allow new client applications to interact with server systems.
Modernizing the User Interface
When considering development options for new business applications with a graphical user interface, the Windows platform was the obvious choice. Turnkey’s existing developer expertise in Microsoft .NET made the .NET development environment another logical selection. Based on their needs and current proficiency, two user interface alternatives were seriously considered:
- Web application built in HTML5
- Windows Presentation Foundation (WPF)
While web applications offer several advantages, including the fact that they can be accessed from any web browser and that there is essentially no footprint or requirement for installation on client systems, in this case, the disadvantages (connectivity and local device interaction restrictions, browser inconsistencies, and a less rich user experience) outweighed the advantages.
The team agreed that the most appropriate user interface technology for Turnkey to use to build their next generation of core software applications was WPF. Within the .NET Framework, WPF is currently the primary technology for implementing graphical user interfaces in Windows desktop applications. It can also be used to implement modern looking applications that conform to what most consider the cutting edge for software applications.
In WPF development the user interface is defined using an extremely flexible XML language named Extensible Application Markup Language (XAML). It is very easy to apply varying styles to XAML controls to define how the controls behave as well as how they look. As a result, the basic controls provided with Visual Studio are much more capable of producing advanced look, feel, and behavior, often making it unnecessary to resort to using controls from third-party vendors.
WPF was designed to allow developers to easily separate UI code from business logic and database access code, and this is often achieved by following development practices defined by the Model-View-ViewModel (MVVM) design pattern. Several development frameworks are available to help developers implement MVVM applications, including the open source Symphony Framework from Synergex Professional Services Group. Symphony Framework was specifically designed to help Synergy developers build modern WPF applications on top of existing Synergy application code and data.
In any case, the combination of WPF and MVVM will provide Turnkey with a powerful and productive environment that actively encourages the clear separation of UI code from the rest of the application. This technology actually makes it feasible to remove the user interface and replace it with some new UI technology at some point in the future.
Implementing the Middleware to Support the New UI
After agreeing on a UI technology, the next important task was to select a middleware technology. As previously mentioned, the new solution needed to be a client/server application, and there were several ways that a new client application could communicate with the code and data residing on the server system. Although Synergy/DE xfServerPlus was a viable option, a web service was selected as the best choice to meet Turnkey’s needs.
As its name suggests, a web service provides a mechanism for integrating client and server applications via the web (or more accurately using web technologies such as HTTP) or some other wide area network. In fact, web services are specifically designed to work well over wide area networks, where bandwidth may be limited in some cases.
Web services are extremely flexible; they often communicate via industry standard transports such as HTTP or HTTPS and often use standard messaging protocols such as XML or JSON. This means that once a web service has been implemented, it is typically very easy to interact with that service from almost any type of software application developed in almost any programming language.
Given that the development team would be using the .NET Framework and Visual Studio, the logical choice was to use Windows Communication Foundation (WCF). WCF is an extensive framework for implementing a wide variety of web services solutions. Traditional web services communicate via HTTP and use XML-based “SOAP” messaging. WCF can do this, but it also offers many other options for communication and messaging protocols, encryption options, authentication schemes, etc. WCF represents the current state of the art in web services development.
The team chose to implement WCF services by using Synergy .NET in Visual Studio. The methods that they will soon begin developing will access the Synergy data directly (if the data is located on the Windows server hosting the service) or via xfServer (if the data resides on a different system, such as an existing customer’s Linux system). The most important advantage to taking this approach is that the development and debugging environment available in Visual Studio is significantly advanced.
WCF services can be hosted in any managed .NET application, in a process known as self-hosting. One common way to host WCF services is to self-host in a Windows service application. The service can be configured to start automatically during system boot and stop automatically during system shutdown, and it is also easy to manually start and stop as required.
However, since the majority of Turnkey’s customers only had a Linux server, a method of deploying those services on non-Windows platforms is also needed. Mono is an open source implementation of the Microsoft .NET Framework that is supported on several different operating systems, including various UNIX and Linux platforms, Mac OS X, iOS platforms, and Android. The current versions of Mono implement .NET Framework 4.0 almost completely, with one major exception: WPF. This means that Mono can’t be used to deploy WPF UI applications, but Mono does include an implementation of WCF.
Synergex has developed a version of the Synergy .NET runtime environment to operate on the Mono version of the .NET Framework. This will allow most Synergy .NET code (with the exception of code using WPF) to be deployed on the various platforms that Mono supports. Synergex currently supports Mono on Android and iOS, and provides experimental support on Linux.
Turnkey can use this combination of products to deploy Synergy .NET WCF services, using the Mono Framework, on their customers’ Linux systems—these WCF services will be the same services that Turnkey develops in Visual Studio for use on Windows.
Conclusion and Update
Turnkey began the development of their new contemporary user interface and middleware using Windows Presentation Foundation, Model-View-ViewModel design pattern, and Windows Communication Foundation as described above. They are now building on those efforts and shifting their UI path to use Microsoft’s Universal Windows apps platform.
The technology to modernize the look and feel of Synergy applications is here. Turnkey is on their way. If you’re interested in updating your own applications, please contact your Synergy/DE account manager to discuss your options.