![](https://www.synergex.com/wp-content/uploads/2024/06/van-diest-cs-logo.png)
Agricultural Supply Leader Reaps Win by Modernizing Applications with Harmony Core
When Bob Van Diest started Van Diest Supply Company back in 1956, it was as a sideline to his grain and livestock farming business in Webster City, Iowa. He provided his business and his neighbors’ with high-quality agricultural fertilizers, at a savings. Everybody won.
Today, Van Diest Supply Company is a leader in the manufacturing and distribution of a wide array of crop protection products that help agriculture achieve peak performance. The family-run company serves a broad swath of “neighbors” across the US Midwest, with 600+ team members operating from 54 buildings on approximately 270 acres in Webster City and 19 outlying distribution centers serving customers in a 19-state area.
Van Diest has smartly invested in information technology over the years, including a home-grown ERP system that manages its business operations. The core applications were written in Synergy DBL, a robust business language at the heart of Synergex’s Synergy/DE product suite. In 2012, the company successfully migrated the ERP application from OpenVMS to Windows (keeping the character-based UI), with help from Synergex’s Professional Services Group (PSG).
Timely, accurate, and safe delivery of its agricultural products is job #1 at Van Diest. The chemicals are packaged into refillable containers for shipment to or pickup by customers. In 2014, again with help from PSG, Van Diest added two applications to automate tracking of its containers: a Windows Mobile 3.5 app that ran on Motorola MC65 handhelds/ barcode scanners and an ASP.NET browser app running on Windows. The browser app had the same functionality as the scanner app, as well as other features such as help pages, reports, and various maintenance and management functions.
Fine-tuned to the growing business, these container tracking applications have served the company well over the years. However, in 2022, new regulatory requirements from the Department of Transportation (DOT) needed to be incorporated. In addition, the company had new internal requirements, creating a need for expanded data entry and process tracking.
Challenge
The browser app (written in Visual Basic using Web Forms with DevExpress controls) and the mobile app used a collection of ASP.NET web services on an IIS server. These web services used Synergy xfServerPlus to access the Synergy business logic and data needed for container tracking.
![](https://www.synergex.com/wp-content/uploads/2024/06/VanDiest_Diagram_1@2x.png)
The new DOT inspection requirements added more items and processes that Van Diest now had to track. Already being tracked were location, contents, when and where containers were received by customers, expected arrival time, date of last cleaning, problems or need to be taken out of service, and so on. Scanning to record identifying information was added, as workers must visually inspect each container and check boxes on a long list of items (e.g., observed cracks or wear) displayed on their handhelds before each container can be filled, shipped, or released to the customer.
Well-functioning mobile devices are essential to the container tracking process, and the old MC65 scanners were of particular concern. Many had been failing, and neither the devices nor their operating systems were supported anymore. Updating them was possible but difficult, as it would require using hard-to-find Microsoft technologies such as Visual Studio 2008 running on Windows 7 or earlier. Ideally, Van Diest needed to reduce or eliminate its reliance on old, unsupported technologies.
Goals
Faced with these challenges, Van Diest decided to replace the MC65 scanners with Zebra Android-10-based mobile devices, which feature barcode reading and had been used successfully elsewhere in the company. Van Diest again looked to Synergex PSG for assistance. Together they created a project to update the container tracking applications with the following goals:
- Write a new scanner application for the Android mobile devices
- Evolve the container tracking software to add the new inspection requirements
- Streamline the middleware connecting the client apps to the back-end Synergy logic and data
- Modernize the application environment for easier extensibility in the future, without a major “rip-and-replace” or digital transformation effort
"Synergex has been creative, enthusiastic, and highly responsive in helping us evolve our critical applications. Our customers’ businesses depend on our timely and safe delivery of products. Easily modernized application development will take us and our customers into the future."
Jake Van Diest, President & CEO
Solution
Before proposing a recommended approach to the new Android application, Synergex PSG did a due-diligence deep dive to identify the best option for .NET-friendly Visual Studio development.
The two finalists were the third-party Uno Platform and Microsoft’s recently announced .NET MAUI. Both are open source, and they enable developers to create a single code base that can target multiple platforms. They both use the C# programming language and XAML for UI markup. While both offered roughly equivalent platform coverage (including Windows and iOS) and the ability to build a modern replacement for the application, .NET MAUI best fit the bill.
Using .NET MAUI, developers can create a mobile application for multiple target platforms with a single Visual Studio project. (Uno would have required additional projects for each target platform.) Further, .NET MAUI suggested better stability and easier adoption, resulting in a shallower learning curve and more efficient development for PSG and Van Diest’s small in-house developer team. Van Diest’s new application can easily be set up to be multi-platform, if and when desired.
![](https://www.synergex.com/wp-content/uploads/2024/06/VanDiest_Diagram_2@2x-1024x402.png)
Next, PSG re-examined the server-side middleware connecting the Windows Mobile application on the scanner to the Synergy routines on the application server (two layers in this case). The xfServerPlus application server is used to expose the Synergy logic and data. And the ASP.NET web services are used to connect the Windows Mobile app to the xfServerPlus methods.
To streamline and modernize the application, PSG turned to Harmony Core, an open-source software framework that enables developers to easily build and expose RESTful web services based on the company’s current application code and data. RESTful web services are the industry-standard way to integrate applications today. An application exposes a service. Another application interacts with it via HTTP messages.
The ASP.NET web services driving the Windows Mobile application (which were based on the verbose and outdated XML-based SOAP protocol) and the xfServerPlus application server were both replaced by an industry-standard RESTful web services API built using Harmony Core. Creating the new web service was relatively easy. PSG built it automatically using code generation based on the existing xfServerPlus environment. The new API exposed the same routines exposed by xfServerPlus.
Because Harmony Core was designed to integrate existing xfServerPlus environments very easily, building out the RESTful web services API was accomplished very quickly early in the project.
Outcome
Modern Scanner Application and Simplified Middleware
Written in C#, the new .NET MAUI scanner application uses a design pattern called MVVM, or model-view-view-model. This pattern structures software using separation of concerns: it separates UI code from business logic from database access and so on. Thus, Van Diest can continually improve and simplify the user interface.
Stripping out the extra xfServerPlus middle layer resulted in a simplified system architecture and improved performance for the scanner app.
With Harmony Core and its new .NET MAUI application, Van Diest was able to closely replicate the functionality of its current mobile scanner application, and in record time. From there, it will be easy to take advantage of the increased screen real estate and touch experiences available on their modern Android device.
During the development process, the code was protected by being checked into a private GitHub repository. This repository was later transferred to be under Van Diest control on GitHub.com.
To simplify deployment of the new Android application, PSG recommended using a “sideloading” mechanism that allows the app to be directly downloaded and installed on the scanner devices—no need to place the application in an app store like Google Play. A script publishes the Android application to a single “APK” (Android package) hosted on the Harmony Core web server. From there, it can be easily downloaded and installed. This same mechanism can also be used to distribute application updates to devices.
And… an Updated Web Application with a Future
The browser and MAUI versions of the container tracking application contain the same core functionality.
However, the browser application today also incorporates additional functions, many of which would be difficult to implement in a mobile application because of the large amounts of data to be downloaded and presented. These include 11 new reports with complex sorting and filtering capabilities, admin/management pages, and 20 scanner help pages for familiarizing new users. This was in addition to the required changes in inspection procedures.
The work required on the browser application was minimal for this project. It involved simply updating the web application, stripping out the xfNetLink code (xfNetlink is the client to xfServerPlus), adding the HTTP calls to call the new Harmony Core web service, and then adding the pages for the new inspection workflows.
Both client applications use a shared library of HTTP calls to interact with the Harmony Core web service. (Talk about simplicity.)
![](https://www.synergex.com/wp-content/uploads/2024/06/van-diest-cs-image.png)
Meanwhile, the web application (with its enhanced focus on management) can drill into additional information about the containers, defaulting to the user’s location. Authorized users can add and edit containers and other key data. They can group information by capacity, product, product within capacity, location history, and so on. Because Van Diest (wisely) chose to code every operation, the company broadly enables filter and drill into the data, whether it’s for running daily operations, executing its intensive 30-month mandated inspections, or creating bullet-proof audit trails.
Both of the above applications went live in record time, in the head office and other locations, moving smoothly from development to testing. Testing continues to ensure successful operation at headquarters, inside the company’s many DCs, and across the high level of activity.
What’s Next
With Harmony Core, Van Diest took an important step toward application modernization. It modified its container tracking system to add the latest new inspection functions required by the DOT. Accommodating future DOT requirements—or new, internal process changes or requirements—will be much easier.
Moreover, the company built a new RESTful services API based on the Harmony Core framework that incorporates the existing container tracking business logic and data—a process that could be easily replicated for other applications. The .NET MAUI mobile application can be easily deployed to iOS and macOS platforms, should the company want to extend the application to iPhones, iPads, and Mac systems.
Van Diest’s IT team is armed and ready for whatever its growing business throws at it.