Delphi

Developer Stories: Frits F.M. de Mul On ALGOL, Neutron Physics & His Montcarl App Suite

Frits F.M. de Mul started programming with ALGOL in 1965. He submitted his showcase entry (Montcarl Application Suite) for the Delphi 26th Showcase Challenge and we had a talk with him about his many years of programming experience. Take a look at his website for more information about the applications and software. When did you start using RAD Studio Delphi and have long have you been using it? I started with ALGOL, DELPHI’s predecessor, during my M.Sc.-project in 1965/66 on neutron physics, where I got a lot of measurement data. The University’s first computer was a Telefunken TR4 mainframe, to be fed with paper tape an (later) punch cards.  This was one of the very first computers in the country, and I had account nr. 10. For my Ph.D.-work in early 70’s I shifted to FORTRAN, which was more convenient (faster) at that time, although functions and procedures were hard to handle, and the output was cumbersome. No plotters were present in those days. In late 70’s I switched to Pascal, later Turbo Pascal, on writing a lot of (stand-alone) programs; part of those are mentioned on my site (see above). And now, with DELPHI, since I am retired, I also use TMS Web Core for web applications. What was it like building software before you had RAD Studio Delphi? ALGOL and FORTRAN were limited in possibilities and cumbersome to handle. First, I had to use punched taper tape and later punch cards. When you had to made corrections, it was possible to manually make extra holes, and even repair holes, but you had to learn and use the 8-bit codes for all characters. Then the tapes or cards had to be delivered manually to the computer building, and a few days later you got your results (provided you did not make punch-typing or syntactic errors). But frequently the computer got stalled…. Nevertheless, all that punchwork made excellent confetti! How did RAD Studio Delphi help you create your showcase application? Viewing the history, DELPHI – as successor to TURBO PASCAL – offered lots of improvements; most important of course was it built-in logic and Object Programming. Since I always make Computational-Physics programs, DELPHI offers many possibilities. I tried to use PYTHON, but I found Delphi much more attractive, due to its simple but adequate logical structure and lack of superfluidal options. For instance, the PYTHON world has gone much too far in incorporating a lot of options for arrays. These look nice at first sight, but normally programmers will use a limited set of convenient options only, and the rest is discarded. With DELPHI you can easily make all those options offered by other platforms yourself, in case you need those. What made RAD Studio Delphi stand out from other options? As mentioned above, DELPHI remains THE most logical language, with great backward compatibility. There are many built-in options, but no superfluidal ones. Its syntax has a complete WYSIWYG structure. This is a great advantage compared with C++ or PYTHON, which at first sight look handy, but you have to learn what is behind a lot of statements. Therefore my wish to developers: keep it simple and staightforward! What made you happiest about working with RAD Studio Delphi? The most happy – I think – is working with Forms, and […]

Read More

Managing Delphi Expressions via a Bindings List component

After looking to binding expressions and how they can link to components, let’s move to the component aimed for managing binding expressions. In recent blog posts I covered Delphi’s RTL core expression engine and components binding. Now we can make an additional step and look into a key component for the entire bindings architecture, called BindingsList. A binding list is a collection of different types of bindings expressions, managed in the designers. In other words, the expressions and component bindings I defined in source code in the last blog post, can be fully defined in the designers (and wizards) of the BindingsList component. Just drop a component of this type to a form plus a few visual components (in my example two edits, a spin edit and a progress bar — see image below). The BindingsList component has a designer which allows to define a collection of bindings. Each binding can be picked using one of the many available options (way too many to explore in this article and primarily focused on data source and data field bindings). The two basic options I’m going to use here are TBindExpression and TBindExprItems. After you select one of those bindings, let’s say a TBindExpression, you need to interact with two different design surfaces to work on the expression: on one side you can configure the expression properties in the Object Inspector, like the SourceComponent and the ControlComponent (the term use to refer to the target control) and the related expressions; on the other by double clicking on the expression in the BindingList editor you can open us a special expression designer, which in turn has additional items editors and viewers: In the image above, you can see that I connected the expression to a source and target control, but I still haven’t defined an expression. This can be as simple as a single property name or a more complex combination of values and expressions and can be configured in the Object Inspector expressions properties for the binding or on the special designer displayed above. The designer also offers the option to evaluate and inspect different expressions. Going back to the expressions, we can simply use Value and Position for the Spin Edit and the Progress Bar, respectively. Notice the binding expression has a direction (by default, source to control) that can be reversed or can also be bi-directional. I’ve used a bidirectional expression for the two edit boxes, so that typing in any of them copies the content to the other. In this second example, I’ve used a TBindExprItems binding (but a regular expression would have been enough). This is a more complex binding, in which you specify source and control (as above) but define a collection of clear and format expressions, which can involve multiple properties of the controls. In this example, the mapping is Text to Text (bidirectional) as you can see below: With all of this, the only Delphi code that’s needed in the application is a call to re-evaluate the bindings when the value of the source changes. This is easily done by handling the OnChange events of the various controls and triggering a general update of the bindings for the current control (the Sender): TBindings.Notify(Sender, ”); TBindings.Notify(Sender, ”); This is the very simple application in action: Now you might be wondering where all of this configuration settings end up… but […]

Read More

Websockets WebRTC In Real-Time – Do You Know How To Do It?

Web is basically operational using HTTP requests and responses. In this mechanism, the client always initiates the connection. There is a timeout period after which the server discards the connection. Once discarded, the client must initiate a new connection. This is OK with normal web applications but for real time communication this is not enough. A system called HTTP long polling was developed to try and overcome this problem. With this implementation, the server keeps the connection open until new data arrives. This is used in GMail chat. But in this case, server resources are blocked through the connection. What are WebSockets? Websockets solve the above problem by allowing the server and client to send messages at any time. With Websockets the communication begins a HTTP request and then upgrades to connection to Websockets using the TCP protocol connection for communication. What is WebRTC? Unlike Websockets, WebRTC doesn’t relay data through a server. It sends data between browsers or devices. It supports sending and receiving video, audio and generic data. It’s a real-time communication method. It’s a part of the HTML5 specification which is supported by most modern web-browsers. How do I find easy to use WebRTC components for Delphi? ESEGECE offers an easy to use component set for Websockets and all of its other protocols including WebRTC. You can get these components from this link: https://www.esegece.com/websockets/download How do I setup a WebRTC server using SGC components? You can easily setup a WebRTC server using these components. Step 1: Add a new “TsgcWebSocketServer” component and open bindings. Add new binding and set the server IP and the port (For Eg: IP: 127.0.0.1 / Port: 80). Step 2: Add a new “TsgcWSPServer_WebRTC” and set the server as the “TsgcWebSocketServer” component we added earlier. Step 3: Activate the “TsgcWebSocketServer” server component and you have a WebRTC server. Now you can open your web-browser, then open the server IP, and there you should find your WebRTC client. Where can I find Delphi Websockets demos? The ESEGECE Delphi WebSockets Components come with many demo applications for different protocols including the WebRTC. Inside the demo folder you can find the “WebRTC_Protocol” the which is a WebRTC implemented video chat demo application. Also you can access their web demos from this link: https://www.esegece.com:2053/webrtc The fun isn’t all reserved for Delphi developers – ESEGECE Websocket components are also available for RAD Studio C++ Builder. Why not download a copy of RAD Studio and try the websocket demos for yourself?

Read More

Impressive Basketball Chalk Visualization: Powered By Delphi

Embarcadero’s users understand the scalability and stability of C++ and Delphi programming, and depend on the decades of innovation those languages bring to development. Ninety of the Fortune 100 and an active community of more than three million users worldwide have relied on Embarcadero’s award-winning products over the past 30 years. Icons by Icons8.com. © 2020 EMBARCADERO INC. ALL RIGHTS RESERVED

Read More

Is .NET Really Dead? What Is The Best Alternative?

.NET is one of the most popular frameworks for building powerful desktop and web applications. But it hasn’t received any new update since 2019. Is the framework REALLY dead? Should you look for alternative solutions for developing applications in 2021? In this post, you will find all the details. What is .NET framework? .NET is a full-stack platform for building and running server-side applications on Windows. It is compatible with different languages, including C#, F#, and Visual Basic. You can use it to create desktop, web, mobile, and IoT applications. Is .NET framework really dead? Back in 2019, Microsoft announced that the .NET 4.8 would be the last release of .NET framework. Also, the company declared that the successor of .NET Core 3.0 would be known as .NET 5.0. In other words, .NET Core would replace the .NET framework. Eventually, .NET 5.0 was rolled out in November 2020. With .NET 5.0, Microsoft aims to transform the .NET and .NET Core into a new cross-platform framework. However, there are some drawbacks. The developers have been using ASP.NET Web Forms for years to build dynamic web UIs. It is no longer supported on .NET 5.0. Instead, you will have to use Blazor. Even Windows Communication Foundation (WCF), the traditional communication framework for Windows, is deprecated. So, you will be forced to use alternative solutions, like gRPC or CoreWCF. Overall, Microsoft is unifying .NET and .NET Core frameworks by making drastic changes. So, you can no longer use the key features like the way you do with the original full-stack platform. In this sense, the .NET framework is dead. Microsoft’s controversial move on .NET framework had infuriated a large number of developers around the world. They feel that there is a significant gap between release and stability in the products of the software development giant. One of the Y Combinator users, known as @TheRealDunkirk, vividly described the issue: My problem with these kinds of Microsoft technology evangelism articles/videos is that it always seems like Microsoft has juuuust gotten their new hotness to work, and is telling the world that it’s awesome, and ready for production. Then you go to implement it, and as soon as you leave the perfect world of their demo, it all falls apart, and THEN you find out the docs were written for the beta version, and no longer apply, so you’re left guessing at the right invocation signature for the method you need. What is the best alternative to .NET framework? There are different alternatives to .NET framework, including Node.js, Django and Laravel. However, the best one is Delphi. Unlike .NET framework, it is providing new releases and support for more than 26 years continuously. Why Delphi is the best alternative to .NET framework? Safe Future: Delphi has been evolving since 1995. It is being updated constantly. There is no possibility of seeing it abandoned anytime soon. .NET Compatibility: Delphi supports a compiler and a base class for .NET framework. So, you can build native .NET applications with the same class library and IDE. High Performance: Delphi is super-fast. Similar to .NET framework, it is well suited for graphics and math-intensive application development. GUI Designing Made Easy:  Delphi supports a powerful GUI designer, which makes the process of creating amazing interfaces pretty straightforward Well Documented: Delphi supports comprehensive […]

Read More

Developer Stories: Bruce McKibben And The Excellent Macaos

Bruce McKibben has begun programming in 1997. His software (Macaos Enterprise) was one of the showcase entries for the Delphi 26th Showcase Challenge and we interviewed him to get more of his insights on working with Delphi. Go to the Macaos Enterprise website and learn more about the software. When did you start using RAD Studio/Delphi and have long have you been using it? The original MACAOS application, the predecessor to Macaos Enterprise, was begun with Delphi 3 in 1997. I have been involved in the project since 2002, Delphi 6. The system uses a middle-tier built in Kylix/RemObjects, for which a RAD Server replacement is under development. What was it like building software before you had RAD Studio Delphi? Personally, I have developed or maintained software using more than a dozen different languages (over a span of 40+ years). With the exception of Delphi and Visual Basic, they were all mostly suitable for console or batch type processing. Delphi brings nearly unlimited processing functionality and flexible, modern UI design together in an intuitive development environment. Prior to using Delphi, I didn’t have the tools to think in terms of building apps with the user experience in focus. How did RAD Studio Delphi help you create your showcase application? Macaos Enterprise is the fourth generation of this functionality. The second generation version basically hit the wall, and we nearly concluded that Delphi was not up to doing the job. (The third generation was built as a Delphi UI wrapper around an MSVC++ motor, which we later abandoned.) That led to a total rebuild of our internal data structures and our graphics engine — making use of newer technologies that had come into the toolset by then. Looking forward, it appears that Delphi provides more than we are likely to need for the forseeable future. The long-awaited release of the Delphi Linux compiler has allowed us to finally start developing a replacement for our stable, but aging, middle-tier which was developed with Kylix 3. What made RAD Studio Delphi stand out from other options? There are several things. Pascal is a much more readable – and thereby self-commenting – language than C-based languages. The Delphi forms designer paradigm is a very efficient UI-design methodology. The availability of 3rd-party components is a huge plus. The somewhat recent addition of mobile platforms opens up new possibilities which we have yet to fully explore. What made you happiest about working with RAD Studio Delphi? I think perhaps it is the event driven program model which makes it easy to expand the application incrementally. I like that I can try out things without needing to build everything before I can run it. What have you been able to achieve through using RAD Studio Delphi to create your showcase application? Our goal has been to make it easy to get an electronics development project from development to production. There are powerful electronics design (CAD) tools out there, and manufacturers have powerful editors and CAM tools at their end. But there is a gap between these two which we aim to fill with intuitive, task-oriented functionality. Our system is widely used in Scandinavia (the home markets of our manufacturing partners), but we believe that other markets can also benefit from these tools. What are some future plans for […]

Read More

Competitive BQGolf Viewer: Golf Management On Your Phone

Embarcadero’s users understand the scalability and stability of C++ and Delphi programming, and depend on the decades of innovation those languages bring to development. Ninety of the Fortune 100 and an active community of more than three million users worldwide have relied on Embarcadero’s award-winning products over the past 30 years. Icons by Icons8.com. © 2020 EMBARCADERO INC. ALL RIGHTS RESERVED

Read More

MQTT: How Do I Write An App To Communicate With IOT Devices?

When we combine MQTT with Delphi we can easily write apps which will communicate with IOT devices. Follow along with us now as Bruno Mileto tells us how to do it. IoT – the unseen world Internet of Things, or IoT, is a concept that defines the connection between physical objects with the user and the internet. It makes use of intelligent sensors, in addition to software, used in the collect and transmit data to the network, allowing the control of different devices. IoT devices communicate using IoT protocols that are a set of rules that determines how data is sent. IoT protocols ensure that information from one device or sensor is read and understood by another device, a gateway and a service. MQTT stands for Message Queuing Telemetry Transport and it is a simple and easy implement, IoT protocol. It is a message protocol with support for asynchronous communication between the parts. It makes a light application, ideal for remote communication between devices where the amount of data communicated is highly limited, and, in networks whose bandwidth for communication is restricted and of high latency. The MQTT protocol defines two types of entities: a message broker and numerous clients. The broker is a server that receives all messages from clients and then routes those messages to the relevant target clients. A client is anything that can interact with the broker and receive messages. A customer can be an IoT sensor in the field or an application in a data center. The client connects to the broker. He can subscribe to any message “topic” at the broker. The client publishes the messages to a topic, sending the message and topic to the broker. The broker then forwards the message to all customers who subscribe to that topic. A Delphi MQTT Client Application To create a Delphi MQTT client application, we are going to need a Delphi MQTT component. We can use the Delphi WebSocket components from eSeGeCe. The download and installation process, is detailed here. First drop the two main components to a form, the TsgcWebSocketClient, and the TsgcWSPClient_MQTT. In the TsgcWebSocketClient component, go to properties, and in Authentication/Session/Enabled, change it to True. In Options/Parameters add ‘/ws’, in the host, add www.esegece.com, and in Port, change it to 15675. There are a lot of servers that act like a broker, so you can use them to test, like: broker.hivemq.com test.mosca.io iot.eclipse.org mqtt.simpleml.com But here, we will stick with the broker found at www.esegece.com Setting up the MQTT connection In the TsgcWSPClient_MQTT component, go to properties, and in Authentication/Enabled, change it to True. In Client, choose the TsgcWebSocketClient component and in HeartBeat/Interval, change it to 5. To complete the Delphi MQTT Client Application, you will need at least: Three buttons: two to subscribe and unsubscribe to a topic, and one to publish a message. Two TEdit, to inform the topic to subscribe and the message to publish. A way to inform the quality of service. We do this in a TComboBox component Quality of service levels The Quality of Service (QoS) level is an agreement between the sender of a message and the receiver of a message that defines the guarantee of delivery for a specific message. There are 3 QoS levels in MQTT: At most once (0) (mtqsAtMostOnce) At least […]

Read More

Showcase: Interactive Roman Numbers Kids Mobile App

I’m old enough to remember the days when movies used to have have copyright messages where the years were listed out in a series of letters. I like to think it added to the magic of the big screen movie experience to see things like MCMLXXVI underneath that roaring lion or a huge gong being banged to signal the start of a trip into the cinematic wonderland. A few years later our school was still teaching us to read the Roman Numerals as they were known. A fading art now along with Morse Code and darning holes in socks. Roman Numbers Mobile App “Roman Numbers” is a mobile app produced by Spanish developer Demontriz programacion which tries to keep the lost art of reading numerals alive. It introduces this two thousand year-old numbering system to the computer-savvy younger generation of the 21st Century. Written using RAD Studio Delphi using the cross-platform FireMonkey FMX platform to make excellent use of the user’s mobile devices it’s a great way to make learning fun. A mobile app to convert Roman numerals to decimal and back again The app converts Arabic numbers to Roman numbers and is especially aimed at children. They can type any number between 1 and 999999 and the app will show the equivalent roman number. You can also type in any Roman number between 1 and 999 and check its decimal value. So, do you know what DCCCLXXXVIII is in the based 10 decimal system? Website Roman Numbers Google Play Roman Numbers Screenshot Gallery Do you have a great idea for an educational app? Why not use the power of RAD Studio Delphi to bring it to life?

Read More

Low Code App Wizard for Delphi

Low code app development is increasingly popular today, and for good reason: it speaks to the demand for software paired with the difficulty of creating it. In many ways, Delphi led the low code revolution: RAD, where you build software by connecting components in a visual designer, is low code. The key with many low code solutions is extensibility: low code which cannot be extended to a traditionally coded app has a hard upper limit of functionality. If you’re a technology adviser, you do not want to recommend something which will limit your client or company. The best development solutions that target low code provide an avenue to grow and extend. In this too, Delphi excels. Until recently in Delphi you still had to create a new project and create the forms or screens yourself – no matter how little code you may have to write to get powerful functionality when you did. This is something we’ve now addressed with an addon to 10.4.2. In GetIt for 10.4.2 and later is a Low Code App Wizard for FireMonkey, our technology for cross-platform applications. Once installed, the New Items dialog lets you run a wizard which will create a Delphi FireMonkey app for you. It is a fully functional cross-platform application, which already contains basic functionality that every mobile app will need — you can run and use the app as is — and hooks to build more, plus demonstrates application development best practices with a very clean extensible design to add more screens with low code, plus a set of tests to ensure your app remains high quality as you customise it. Basic setup: Choose your app’s name, where to save it, and if you want a database. Choose your app’s screens. If you selected to add a database on the previous page, you can also add a Data screen Two screenshots of the Low Code Wizard The app that Delphi builds for you is configurable through the wizard, but you can choose any set of the following: User accounts: sign up, sign in, and a profile screen, with hooks for your own authentication Settings screen (where you can change the app theme (light or dark), plus some example settings you can reuse or extend) Contacts screen Terms of Use, About, and Privacy policy screens, easily configurable for your own data A database layer: using Interbase, store data in your app An example new screen you can use as a template or example for adding new functionality In other words, it generates the framework of an already working, useful application which you can extend using Delphi’s RAD (or low code) visual application design. The generated wizard, showing the hamburger menu The Settings screen, here showing the Theme setting plus some other example working settings Two screenshots of the generated low code app, here running on Windows (great for quick development, since you don’t need to deploy to a device or emulator to test.) Install the Low Code App Wizard through GetIt today, and use Delphi, one of the most productive development environments, providing you rapid development through visual design yet remaining fully extensible as your business needs grow. And join us on Thursday 10th June for a webinar demonstrating the low code wizard and how to quickly build powerful apps […]

Read More