Category Archives: General

For stuff I forget to categorise! Doh!

Developing from home

Working from home – webinar replay

As software developers, on the whole, it’s relatively simple to switch to working from home, and many of us work from home regularly, or all the time. However, with a quarter of the world’s population already in lockdown, the circumstances are not exactly the same as your typical week at work. 

With a majority of workers now trying to work from home, the daily mix of office news, banter, and general togetherness has been dramatically changed. 

Continue reading Developing from home

Musings from March – Inc Denmark and Poland

This month has seen an ever-changing global situation with the outbreak of the coronavirus. The first time that I can remember I had to radically change / cancel a live event due to circumstances out of our control.

At the start of March we were keeping an eye on the news to see how the spread of the coronavirus had impacted Denmark. With only 2 cases in Denmark, the advice at the time was that it was set to travel and we proceeded with events in Kolding and Copenhagen. Especially nice to see was a growing number of new and younger faces, and a good proportion who’s first-ever version of Delphi or C++Builder what 10.something.

Continue reading Musings from March – Inc Denmark and Poland

Delphi is turning 25!

This week, Delphi is turning 25, and as part of the celebrations, members of the community have been encouraged to share their stories about Delphi, what they love and how it has helped their careers.

Delphi was originally launched on the 14th of February 1995, while I was still at 6th form College. It kind of passed me by, to be honest. At the time, I was just purchasing (well my parents did) my first PC with Windows on it. I was, however, using Pascal in the computer labs in some elective modules I took alongside my primary studies. (Progressing on from Basic).

Continue reading Delphi is turning 25!

Creating and connecting to MSSQL Database on Azure with Delphi / C++Builder

Creating and connecting to MSSQL Database on Azure with Delphi / C++Builder

I have been asked multiple times recently about connecting to a  Azure databases with Delphi and C++Builder. So….I decided to make a video! Which even shows how to use the data directly at design time in the RAD Studio IDE.

The video follows the the 3 phases.

  • Creating an account
  • Creating a database
  • Connecting to the database from the RAD Studio IDE

Continue reading Creating and connecting to MSSQL Database on Azure with Delphi / C++Builder

Attributes for Documenting TEMSDataSetResource

Attributes for Documenting TEMSDataSetResource

I recently blogged about a number of RAD Server topics, including using TEMSDataSetResource, (the component that enables a TDataSet to be expose as a RESTful resource, and manage all the List, Get, Put, Post, Delete methods – very cool!), how to set named parameters for the TEMSDataSetResource documentation (where multiple keys are passed in e.g. with Master Detail relationships (reviewed below)), and how the YAML and JSON documentation is auto generated with custom RESTful resources / end points

Typically, each custom REST endpoint method (List, Get, Put, Post, Delete), would be supported by separate procedures in the code, with each having their attributes to support documentation, resource name etc. Continue reading Attributes for Documenting TEMSDataSetResource

Developing client applications using RESTful master-detail data with TRESTResponseDataSetAdapter

This is part 3 in my series of developing an REST server and client application and will focus around using the TRESTResponseDataSetAdapter.

In my last two posts, we have created a REST server with a fully documented API using YAML , and exposed 3 datasets with master detail relationships over REST using zero lines of code.  If you have not read and watch the videos. I would suggest starting there. – It’s now time to consume the API into a cross platform Delphi Client.

Steps to making the client

The video and supporting blog post take you through the following.

  1. Setting up components to connect to the REST API. (RAD Style)
  2. Converting the JSON into a master detail datasets (based on the current item in the JSON data)
  3. Enabling the data in the UI with LiveBindings and zero code.
  4. Tricks for reducing API calls.

Continue reading Developing client applications using RESTful master-detail data with TRESTResponseDataSetAdapter

Master Detail data in RAD Server using TEMSDataSetResource

Master Detail data in RAD Server

The TEMSDataSetResource is a very powerful component that enables rapid development of full document REST API’s for TDataSet using RAD Server. Using TEMSDataSetResource, along with traditional master detail relationship configurations, it is possible to expose, and automatically document data APIs via REST with no code at all.

In this article, I will cover sharing master detail data with no code, but also how to roll your own REST endpoint to cover more advanced detail with detail embedded calls.

In my previous article, I updated advise on getting started with Swagger UI, using the new WebFiles feature of RAD Server (from 10.3.2) as a way to view your documentation as you build your backend services API. This article will build upon the sample application created in that post.

Continue reading Master Detail data in RAD Server using TEMSDataSetResource

Embedding Swagger UI into RAD Server

This post is an update to the original post written previously showing Swagger UI being used with RAD Server, covering new features of RAD Server.

Why Embed Swagger UI into RAD Server?

Swagger UI (as previously discussed) is a great option for checking your documentation and working with the REST API. One of the challenges has always been CORS (Cross Origin Resource Sharing) that makes execution of the code a challenge when developing.

There are a few options now however. You can either work around this with browser plug-ins, (as seen before), enable CORS in the emsserver.ini under [Server.APICrossDomain], or embed swagger-ui inside your RAD Server instance.

In this video, I cover the latter option. You can watch how to get documentation up and running. The video shows how to configure your EMSServer.ini to share the external resource through RAD Server and also modify the downloaded files to automatically load up the API documentation directly from RAD Server.

WebFiles in RAD Server EMSServer.ini

The key to making this work is the WebFiles option that was added to RAD Studio in 10.3.2. This was primarily added to make it easier to serve out web content and support ExtJS for doing web client development under the Architect edition of RAD Studio, however, this also has the benefit of making other content available to share.

Continue reading Embedding Swagger UI into RAD Server