Another great post today in our Enterprise Article competition from Alberto Fornés. Alberto tells us the story of how the power of RAD Studio with Delphi app builder software is enabling the tracking of your apple from the farm to your home. No, not THAT Apple. 🤪 In fact Alberto would like to emphasize that the produce tracked in this juicy story is most often cases of oranges.
Table of Contents
How did you become a Delphi programmer?
Hello, the choice of Delphi as a programming language occurred many years ago, although by studies (I studied agricultural engineering) I have always liked computing, I remember my first lines with Spectrum (ZX Sinclair 48, 48k).
Later I subscribed to a weekly programming collectible and there for several weeks they handed out Delphi CDs (version 1 or 2 I seem to remember), I was quickly hooked on that language and how fast and efficient it was to build applications. Later I was acquiring knowledge to dedicate myself professionally to programming, and always in all the jobs I have done, the constant (with few exceptions) has been Delphi, of which I have been using most versions.
What do you use Delphi for?
The program to which I have dedicated the most time in our company MESURASOFT, is a program to manage fruit and vegetable warehouses (KeepTrack is the name of the product).
What was the first version of Delphi you used for enterprise development?
The first installation we used Delphi 7 with an Access database, that system did not last long, and we quickly upgraded to a client-server database using Firebird, based on Interbase.
What sort of equipment did you use?
In those years we used some PALM PDAs. I remember that we made programs with 12k memory size! Despite this the equipment did its job well. We also did the programming of these PDAs with a program (Pocket Studio? if I remember correctly), which also used Pascal as language. The DLL that the synchronization program needed to communicate with the PDA and read the data, was programmed also in Delphi.
How did you track the warehouse inventory using Delphi?
In those years, the work of tracking fruit pallets was done with barcodes, but people began to talk about RFID, so we decided to make our own system, designing a piece of plastic in which we put an RFID tag inside at the entrance of pallets fruits to the warehouse.
The information was marked on the chip, and we could follow their movements through readers and antennas. The software that collected the readings from the antennas worked as a Windows service and was programmed in Delphi. This program was also in charge of giving warnings to a sound and light pilot with serial port communication when some tag was read. That system, with few modifications, is still in use today.
What did the system do?
The system covered all facets of the warehouse, register entries, movement of fruit storage, applied treatments, etc. It was used by more and more workers on warehouse, and the system responded without problems. In these warehouses, the labelling is changing frequently by type of client, destination, product, so we developed a component in Delphi to design labels and include it in the program itself, so users can design the labels according to their needs, and they can link the data on the label with the data on the order.
That was one of the features that I liked the most about Delphi, not only do you have many components to choose from, but you also have the possibility to develop your own components and expand the possibilities of development, and to organize your program well. It is often difficult to decide which components to use, there are so many to choose from! I always recommend having the source code, sometimes a change is needed. In this way we were able to print on industrial printers, not only from PCs, but also from mobile devices, which sent print orders via Wi-Fi.
What other enterprise problems did you solve using Delphi?
Another need that we need to cover was to collect the weight of the fruit trucks upon arrival at the warehouse, and (of course¡), we developed it with Delphi, collecting the readings through the serial port. Then each pallet was identified with the RFID tag and its weight was recorded. A similar job is done on ready-made pallets.
To improve the worker’s experience and make their work easier, we develop specific programs for each job. In some cases we needed to use touch screens, for this we adapted some forms of input with fingers and information display. With the number of components that Delphi has, this was not a problem. It is worth mentioning among the components used, one that we have used in numerous screens: TVirtualStringTree and TVirtualDrawTree, two fantastic open source components, which give a good and fluid appearance.
The programs worked fine when each new version of Windows appeared: 95, XP, 7, etc. That’s another thing I like about Delphi, the little upgrading work they need when OS changes. The same thing happened with newer versions of Delphi, very few code changes need to be made for the build to be successful.
I understand your apps had to work with ASP.NET, is that right?
Those who are dedicated to developing programs know that they need to continually improve and add new features. Some companies asked us for the possibility of carrying out quality controls from a web browser, so that they could be filled out from a PC, tablet or smartphone. At first the controls were created by us, with fixed data, but soon we saw the need for the user to be able to create them himself, because they changed frequently.
To do this, we set up a system where the control structure was defined from a Delphi program, and a web server (IIS with ASP.NET) was in charge of delivering the dynamically created html pages. Through this web system we also offered the possibility of viewing the warehouse stock in a browser, so it was possible to know what products were in each storage point.
What specific techniques or tools did you use?
We always sought to solve the challenges with Delphi, and the appearance of the open-source library Delphi MVC Framework allowed us to create a Windows service that delivered the dynamic quality control pages, we implement user validation using JWT. The library also offers the possibility of generating a log, which is always interesting to detect errors and see the activity. This library is based on WebBroker, which was present in Delphi for many years, but the use of the MVC framework helps to organize the program structure better and with great results and implement more modern software architecture. Later we added the possibility of seeing the changes in the stock and movements of the fruit in real time, we also did it through this same service, when there are changes, the change information is sent to the web clients connected through websockets.
What other components did you use in your enterprise projects?
Within the Delphi application, we use the previously mentioned TVirtualDrawTree component to display the quality control design form to the user, it does the job very well, it is very flexible in its use. The controls are displayed in the program with the
For quite some time, we changed the old PALM devices for PDAs programmed with Windows Mobile (.NET with C#) connected directly to the database server, this, contrary to what it might seem, gave us some problems, which disappeared when we changed the way we access the database and we connect through a REST server, which is also within the service developed with the Delphi MVC framework.
Another functionality added to the service is the reading sent by bar code readers, in this case the communication is by TCP/IP and for this we use the TIdTCPClient component of the Indy library. With this, we can not only receive reading information, but we can also send confirmation or other data to the reader’s display.
If I had to mention other components or libraries to work with Delphi, I would cite two: FastReport, which allows you to design any type of report, with barcodes, graphs with TChart, PDF export, and HTML component library that allows us to visualize html help to the users of the program and has great possibilities to make good GUI screens.
I have also tested its use in a personal program, thought to elaborate software documentation – https://www.ticdoc.info – is currently only in Spanish, but I hope to update to other languages as well. In that program I also use TMS Diagram Studio that let me to include a diagram editor, and TSynEdit open-source component to include a code editor, this program is free and can be downloaded.
What tool are you using for projects right now?
Finally, to add that when we need to improve the visual aspect of the program through styles and new controls, we migrated from Delphi 7 to Delphi 10.3 Rio. It was amazing how few changes were necessary for the program to compile. This is one of the many reasons why I would recommend using Delphi, for me it is unrivaled for developing desktop programs in Windows, we have solved any need.
This article was submitted as part of our Enterprise Article Showcase. If you have a success story to tell about a project which makes use of RAD Studio with Delphi or C++ Builder, or any of our other great enterprise products please get in touch, you could be featured too and win a prize! Read all about it here: Enterprise Article Showcase
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition