Through a series of step-by-step instructional tutorials, Paweł Głowacki, veteran Delphi trainer, guides you to a deeper understanding of the powerful technologies in Delphi. You will gain the solid foundation of knowledge upon which to unleash your creative genius.
The beauty of rapid application development is that you can build complex systems by assembling components. This approach to building software applications shines when applied to Delphi DataSnap programming. In a matter of minutes, you can create a multithreaded server application, capable of servicing many concurrent clients and listening on multiple communication ports simultaneously.
Series 1: DataSnap
These step-by-step tutorials are intentionally very simple, so even inexperienced Delphi programmers should be able to build projects described here and enjoy programming.
Our series continues with another DataSnap application, this time using an actual database (InterBase) The setup is very close to the original Delphi MIDAS approach with dataset providers on the server and client communicating with providers via "remote server" connection components.
In this first part, we have another multi-tier application. The server method instance has overridden constructor where its private FID is initialized with a generated GUID and "GetId" server method is implemented to be able to uniquely identify a server methods instance on the client. This way, every connected client has its own server methods instance inside the server application.
In DataSnap architecture, you can use different communication protocols like TCP/IP, HTTP or HTTPS, and you can also use transport filters to programmatically access the raw stream of bytes that are transmitted between client and the server over the wire.
In this lab, Pawel builds a simple system consisting of a server and a client application. They will be using TCP/IP as the transport protocol and ZLib as compression filter.
This is a continuation from the last episode. Pawel demonstrates practical steps for building jQuery Mobile web frontend application for displaying InterBase XE “Employees” database data from a standalone Delphi DataSnap server. The system described is based on the "Delphi WebBroker jQuery Mobile Boilerplate" project described in the previous Delphi Labs tutorial.
Pawel has uploaded the resulting application to Amazon EC2 cloud. You can find it at http://184.108.40.206:8080/. Please understand, however, that this link may not be there forever.
In this episode, Pawel implements and installs a Delphi DataSnap server, which is a Windows Service application. This scenario is very useful when your services are deployed in the cloud and new machine images are started and stopped automatically by a load balancer.
Today, Pawel shows us the use of TObject-descendant as parameter types in DataSnap server methods, a new feature in Delphi XE. Pawel will concentrate on this parameter type in this episode, if you are interested in seeing what other types are possible, please check out Jim Tierney's blog.
In Java Enterprise Edition (JEE) there is a concept of “Plain Old Java Object” for passing data between applications. Here we are going to use the same pattern for exchanging data between clients and servers written in Delphi, so it should be OK to call these parameter types: “Plain Old Delphi Objects” or “PODOs” in short.
In this bonus episode, Pawel has created a simple example of using callbacks. Both client and server are Delphi VCL Forms applications. To keep it simple, his is using TCP/IP and DBX. This tutorial covers broadcasting to a channel and notifying a specific callback.
About Our Expert Speaker
Paweł Głowacki is Senior Software Consultant and EMEA Technical Lead for Delphi, RAD Studio and All-Access for Embarcadero Technologies. Previously, Paweł spent over 7 years working as a senior consultant and trainer within Borland Education Services and CodeGear. As well as working with Embarcadero customers across the region, he also represents Embarcadero internationally as a conference and seminar speaker
For more information, check out Paweł's technical blog
About RAD Studio
Embarcadero RAD Studio is a comprehensive application development suite and the fastest way to visually build GUI-intensive, data-driven applications for Windows, Mac, .NET, mobile and Web. RAD Studio includes Delphi®, C++Builder®, Delphi Prism, and HTML5 Builder - enabling developers to deliver applications up to 5x faster across multiple devices and platforms.