Added By: Feedage Forager Feedage Grade B rated
Language: English
applications  at https  blog  build  code  delphi  embarcadero  free  linux  new  rad server  rad studio  rad  server  tokyo 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics

Techie Italian Blogging on Delphi and More

Updated: 2018-03-16T09:49:05.669Z


RAD Server Support for Web Files in RAD Studio 10.2.3


RAD Studio 10.2.3 version of RAD Server adds support for directly mapping and returning web related file, a handy feature when using the local development and debugging version

The RAD Server (formerly EMS) platform is evolving to be a better backend for JavaScript applications, including of course those built with Ext JS. In the 10.2.2 release we improved support for returning JSON data based on the result of database queries, as covered in

In RAD Studio 10.2.3, we have added to RAD Server the ability to act as a Web Server, with the support for mapping URLs to folders and returning the content of files like HTML, JS, CSS, graphic, and more. This is a handy feature when using the local development and debugging version, so you don't need to configure both the web service and a separate web server for development, testing and debugging. We do not recommend using this approach for deployment: in that case RAD Server is deployed as a Web Server (Apache or IIS) plugin and the Web Server would of course support file mapping.

How do you configure RAD Server to return files? There is a new section in the EMS.INI file (notice this is a global configuration, not per module) when you can add virtual folders:

;# Identify directories that contain public files, such as .html
;# The following entries define two different virtual directories ("images" and "content") 
;# that may be used to access static files. The "directory" value indicates the physical 
;# location of the static files. The optional "default" value indicates a file 
;# that will be dispatched by default when browsing to the root of the virtual directory.
;# The optional "mimes" value is an array of MIME file type masks. And optional "extensions" 
;# value is an array of file extensions. Only these files will be accessible from this directory.
Path1={"path": "images", "directory": "C:||web||images||", "default": "index.html", "mimes": ["image/*"]}
Path2={"path": "content", "directory": "C:||web||content||", "default": "index.html", "extensions": ["js", "html", "css"]}

In this case I have two folders, one with images and one with HTML content, and also a default file with the URL refers to the folder as a whole. So I can now create a JavaScript application invoking a server method. To keep things simple, I've used a minimal jQuery application:

RAD Server JS + Service


When clicking on the button, the JS app will call the /xyz resource of the RAD Server project and display the result. This is the application in action in a browser (with the RAD Server log below):


Of course, our focus is to help build applications that use Ext JS as the client and RAD Server as the server. I'll make sure to follow uo with such a demo soon.


Delphi 10.2.3 is Now Available


Delphi Tokyo Update 3 has been released today

Embarcadero has released today version 10.2.3 of RAD Studio, Delphi and C++Builder, that is Tokyo Update 3.

Official announcement:

Introductory video: 

DocWiki What's New page:

List of 100+ publicly reported bugs fixed:

Among many features, one is fairly notable: "Inclusion of mobile support in Delphi and C++Builder Professional Edition". If you have Delphi Pro with active update subscription, you now have access to Android and iOS at no extra cost.


Delphi Blogs of the Month #58


It has been way too much time since I shared a few relevant blog posts, so just providing some key ones, and hope to get back to a monthly schedule. The last few months have been really a bit hectic, and I failed to find the time for my regular "notable Delphi blog posts" summary. I've also done very few blog posts in general. Here is one, with key entries only (or I'd be way too long). Embarcadero Updates Exciting RAD Studio Developments in 2018 by Sarina at with new plans and the announcement of a 10.2.3 release. Upgrade SKU to be Discontinued by March 31st at This means you have only 2 weeks to update from recent versions (in case you don't have Update Subscription, of course). With Update Subscription as standard approach, updates from the previous release make little sense, so they are being discontinued. Modernize Your Apps by Atanas at Blog Posts I didn't know you could do this with Record Helpers by Dave at Creating custom TEdit styles with the FireMonkey Style Designer by Sarina at Optimizing ARC the hard way by Dalija at Strings too slow outside WIN32? by Rudy at Three parts on MVVM, the last being MVVM Starter Kit (Part 3 of 3) by Erik of Grijjy at Very nice series, recommended read. Meltdown, Spectre and Delphi by Danny at The Exit Procedure by TMS at Lockless Multi-Threading in Delphi by Craig at Data-driven Multithreading by Primoz at TIP: Typing long strings in the editor using Enter to auto-continue to the next line by Kyle at (you always learn something new in Delphi ;-) Debugging Delphi applications inside a Windows Docker container by Juan at This is a very interesting post, as Docker is growing even on Windows. Thanks for sharing. JavaScripting with Duktape for Delphi by Erik at Supporting In-App Purchase Subscriptions for iOS and Android Firemonkey Apps by Chris at Extremely detailed and well documented. Very handy. Feeding a HTML report dashboard from a Delphi application by Craig at Accessing private methods of another class by Rudy at Delphi Videos  I suggest you keep an eye to Kassebaum Development YouTube channel, very nice stuff: Jim, David and Craig have started a weekly live video podecast. See for example Other Programming Blog Posts Borland OWL to C++ Builder VCL by Al at https://community.e[...]

Speaking in London About Delphi Tokyo on Thursday, March 15th


Next week I'll be presenting a live session in London, UK. If you can join, this would also be good chance to have a chat and offer me feedback about RAD Studio in general and Delphi specifically.

Next week I'll be presenting at an event in London organized by our partner Grey Matter. You can find more information and the link to sign up on 

Titled "To Delphinity and Beyond" the event is focused on a general update of where the product is today and where it is heading in the near future. There will be specific focus on what's new in the latest Delphi (including the coming version 10.2.3) a long session focused on Windows 10 support and VCL applications modernization, but also Linux, mobile, parallel library, RAD Server, and more.

I'll be around for most of the day, even before and after the event, so feel free to join and have an extra chat, but also ping me over email to reserve some time up front. See you soon.


Running a Delphi Linux Application on Google Cloud Shell


Google has made available to all its users a Linux Shell to interact with their Cloud Services. It is an online Linux machine you can use... also for running Delphi Linux applications.

Google has made available to all its Gmail users a Linux Shell to interact with their Cloud Services, called Google Cloud Shell. This shell is a free Debian 7 shell with 5Gb of storage. It is not a VM that keeps running while you are disconnected, but it is a shell allowing you to perform task on a Linux box. Every time the session expires and you reconnect, a new machine is created for you. The 5GB of storage is persistent, though.

You access to this shell via browser at:

It is an online Linux machine you can use... also for running Delphi Linux applications. So, as an experiment, I've written a console app that downloads some RSS feeds data (via TIdHTTP) and dumps it in a local file. The file name is a timestamp:

SaveToFile (FormatDateTime ('yymmdd_hhnnss', Now) + '.txt');

I've pushed it to a web site, opened the shell, used wget (plus the URL) to download it, chmod u+x to mark it as an executable for the user, and could simply invoke it in the local folder, as in the image below:


Now the power of this shell comes from integrating with other Google Cloud services, but it certainly nice to have a Linux shell at hand, for free, for running any application including those you build with Delphi Tokyo for Linux.


RAD Studio 10.2.2 Tokyo February 2018 Patch Re-Released


We have released (after an initial glitch) a patch for Delphi and C++Builder 10.2.2 Tokyo covering a critical Android animation issue and some RTL interface compatibility improvements

Last week, Embarcadero released a patch for Tokyo 10.2.2, focused on Android and RTL improvements. What happened is that Windows would not always ask for execution with admin account (on systems with active User Account Control) and could end up copying the replacement files in a wrong location. It did affect a few of the developers who tried it, so we pulled it, fixed the installer and now re-issued the patch.

If you are a registered user of Tokyo (or have a license for it), you can find it at

There is no change in the content on the patch, so if you already installed it successfully, there is no need to repeat the process. On the other hand, if your installation got broken, we have provided an alternative ZIP-based option (in the same download page). We have already sent it to developers who had got in trouble, but might not have reached everyone.

As for the content, the main fix is the Android animations and tab animation issue. These have been addressed. There are still cases in code where the combination of called to Application.ProcessMessages and timers might get you in trouble. I'll blog more information ASAP, but the general recommendation is to use threads rather than timers for background processing -- an all platforms, although in Windows that coding style can be used.


Updated Notice: Only for 10.2.2 Build 2004 

We had a notice in the download page, but better repeat it here. The patch is only for the second build of 10.2.2 we released, build 2004. If you have the previous build (which had compatibility problems with third party packages) don't install the patch. Either wait for a future update (if you don't specifically need the fixes the patch provides) or install build 2004 first. The link to 2004 installer is in the patch download page.


Delphi 23 and Delphi 10.2.3


Today is Delphi's 23rd birthday and Embarcadero just announced version 10.2.3. Coincidence? ;-)

Today is Delphi's 23rd birthday. The product was launched on Valentine day in 1995 in San Francisco (and I had the luck to be there, as I covered in the past). 23 years is a lot of time for people. It is a incredibly long time for technologies. It is hard to find a language, framework and IDE from 23 years ago you can use to build todays's and tomorrow's software. Of course, the IDE, language and frameworks have evolved and keep evolving -- developers using them can modernize their apps without a full rewrite.

In this 23 years, millions of developers and have used Delphi to build millions of applications, and applications used by millions of users. The most used Delphi application ever build is probably Skype for Windows. But it has been used to build applications worth millions in sales and moving millions in financial markets. And Delphi is still used to day to maintain those applications and create new ones in industrial, financial, health, travel, and sport fields (among others)... including mobile apps for its birthday. Or to run a miniature airport.

In these 23 years the product has changed a lot (Hey, I've changed a lot from the picture in the link above!), Below you can find a comparison of Delphi 1 running on a VM and Delphi 10.2.2 (with dark theme) running on the same machine. It is not a Photoshop, it is an actual screenshot!

(image) Both versions of the IDE have a VCL application with a Button and the Caption property highlighted in the Object Inspector. I didnt' include the about bos of 10.2.2 (as I was trying to do) because it is a little too big. One of these days I'll make a parallel video of working on both. But you know what? Most applications you build in Delphi 1 can be recompiled with few changes in the 23 year later version. Well, as long as you don't use pointers, as Delphi 1 had 16 bit pointers (ugh!). Of course, most applications you write in todays product don't have a chance to run in the older sibling.

Speaking of today, Embarcadero (and the PM team I'm part of) just announced some more plans for this year, and the plan does include the coming release of an additional quality focused update for 10.2 Tokyo, 10.2.3. Now 10 x 2 + 3 is in fact 23. Or Delphi 10 version 2.3. We have a lot in the works for the next mayor release, but also want to keep improving on the quality of Tokyo and release it as soon as possible.

What else can I say? Just invite to you watch Jim Mckeeth great "23 years" Why I Love Delphi video.


My New RTTI in Delphi Class on Embarcadero Academy


Last week I published a new Delphi language training class focused on RTTI on the Embarcadero Academy web site, and the class has also been added to the "Master Modern Delphi Language" course bundle.

As you might remember, I'm helping building the Delphi curricula on the Embarcadero Academy web site. My focus so far has been on the Delphi language, while other tackle VCL and other areas, or other languages and tools. Last week I completed my set of classes on the Modern Delphi language (Interfaces, Generics, Anonymous Methods) with a class on reflection and RTTI. You can buy each of these classes separately (price vary depending on the length) or buy the complete bundle with over 8 hours of content.

The class on reflection and RTTI has a lot of information on the modern RTTI (compared to the classic one), covers the RTTI unit, the TValue record, the use of attributes and much more. And for those who already purchased the Modern Delphi bundle in th past, the new class has been added to their account for free!



Try-Finally Blocks for Protecting Multiple Resources in Delphi


In the Delphi language resource allocations and use is generally protected with try/finally blocks. But what's the best practice for protecting multiple resources? We've had some internal discussions and I'd like to share some of the considerations. The Delphi language shares with many others a standard resource allocation pattern to make sure that in case of an exception the resources is properly released. Resources in this context are memory objects, files, operating system objects and handles, and the like. In Delphi, compared to other languages with a garbage collector, the relevance increased by memory management considerations. Protecting a Single Object In the most simple cases, you'd write code like: allocate resource try use resource finally free resource end; A more specific example would be like: A1 := TTest.Create; try A1.DoSomething; finally A1.Free; end; So far, so good. Notice that is an error happen during the constructor execution, Delphi will automatically execute the destructor for the partially initialized object (but this could be a topic for another blog post). Protecting Two Objects: How NOT to Write the Code The issue I want to focus on is how to write the same type of code if you need to allocate and dispose two resources. Here there are multiple options. What you shouldn't do (but is fairly common) is to write: A1 := TTest.Create; A2 := TTest.Create; try A1.DoSomething; A2.DoSomething (A1); finally A2.Free; A1.Free; end; The issue with this code is that in case the creation of A2 fails (and there could be many reasons), the A1 object would remain in memory. Simply pushing the second allocation within the try block is also not good: A1 := TTest.Create; try A2 := TTest.Create; A1.DoSomething; A2.DoSomething (a); finally A2.Free; A1.Free; end; With this code in case of a failure in object A2 constructor call, the finally block will try to Free an uninitialized object (the default value of a local object reference is undefined). This is why a possible solution is to set A2 to nil at the beginning -- as calling Free on a nil object has no effect. Or set all object reference to nil for simplicity and uniformity. Or write two nested try blocks to protect each of the resources. Protecting Two Objects: A Tale of Three Solutions This long introduction brings us to the point of this blog post. There are at least 3 different correct solution for the issue of protecting two resources in the same code block, as I just mentioned. Here are the three solutions in an image I "borrowed" from one of our RAD Studio R&D architects, Bruneau Babet. Provided they are all correct in terms of proper resource management in all scenarios, which are the advantages and disadvantages of these 3 solutions? What is important to consider is that the 2 resources could be 3, or 4 or half a dozen.  Which One to Pick? The first solution with the nested try blocks fairly clean but more verbose (more lines of code) and has additional nesting that could become an annoyance with multiple resources. Also, there is a runtime cost associated with try blocks, clearly limited but not zero.  The second solution has the least amount of lines of code code and the least amount of runtime cost. The only additional is setting A2 to nil. The code remains readable also with many resources. However, the code is "unbalanced" and it might be slightly confusing. The third solution goes in the same direction, but it adds one extra technically useless assignment to nil (for A1), offering the advantage of being cleaner and more balanced, and likely more readable after all. So what's the best solution? This is really hard to tell,. I personally mostly used #1 in my books, but at Embarcadero we[...]

HTTP Protocol Related Improvements in Delphi 10.2.2


In Delphi and C++Builder Tokyo 10.2.2 we have added a number of features to the HTTP client and REST client libraries. Here is a summary.

The new features for the HTTP client library offer more flexibility and options in terms of protocol and standards support. 

Better Secure Protocols Support

The first change is the improved support for security protocols. In the past it wasn't possible to specify the required security protocols (TLS1.1, TLS1.2, etc.) for an HTTP request. We have added a new enumeration, THTTPSecureProtocol with the values (SSL2, SSL3, TLS1, TLS11, TLS12). THPPTClient and related classes have now a SecureProtocols property which is a set based on that enumeration.

The property (available only at run-time) controls which security protocols to use and it is currently implemented only for Windows. This was requested in our Quality Portal at

HTTP Redirect Improvements

Another set of improvements is in the way the HTTP client library handles redirects. There is a new RedirectsWithGET runtime property offering another set of options, this time based on the following enumeration:

THTTPRedirectWithGET = (Post301, Post302, Post303, Post307, Post308, 
  Put301, Put302, Put303, Put307, Put308, Delete301, Delete302, 
  Delete303, Delete307, Delete308);

The property controls which request method and response status must be redirected using GET method and it was reported in several entries in QP, including

New REST Client Events OnNeedClientCert and OnAuthEvent

These events corresponds to their HTTPClient counterparts and are now surfaces at a higher level:

TRESTClient.OnNeedClientCertificate: TNeedClientCertificateEvent
TRESTClient.OnAuthEvent: TCredentialAuthEvent

This was requested in

MIME Name Helper

We added a function that to the TEncoding support, which returns the encoding MIME for a speficied encoding:

function GetEncodingMimeName(AEncoding: TEncoding): string;

Changed TIniFile Behaviour

This one is totally unrelated, beside the fact it was also done in 10.2.2. The Ini File behavior was platform specific, not is it platform independent. On Windows, TIniFile ReadString ignores the case of Key parameter. On Linux, the ReadString call was case sensitive, leading to issues when migrating code and configuration files. Now by default TIniFile content structure (not the actual values) is treated in a case-insensitive way on all supported platforms.