The Biggest TMS Software Event Ever

Be prepared! Coming in November 2019, the biggest TMS Software event ever: TMS TRAINING DAYS 2019. TMS team members from nine different countries will be speaking about Delphi development, TMS libraries and components, in sessions that target from the beginner developer to the advance one.

Dusseldorf Training Days (Germany)

On November 14th and 15th, there will be two training days in Dusseldorf, Germany. The event will take place at Lindner Hotel Airport, Unterrather Str. 108, 40468 Düsseldorf, Germany.

Check below the full agenda for the two training days

TMS Business Masterclass
November, 14th – Dusseldorf, Germany

Bruno Fierens

9h00: Welcome & introduction (Bruno Fierens)
A welcome to all attendees and introduction to the agenda.


Wagner Landgraf

9h15: Session 1 – The TMS Business World (Wagner R. Landgraf) 
A journey into the world of TMS Business bundle. We will learn about the solutions provided by TMS Business: the components included, the libraries, the use cases, all in the historical context and the motivations behind it. Products covered: TMS Scripter, TMS Diagram Studio, TMS Workflow Studio, TMS Data Modeler, TMS Aurelius, TMS Sparkle, TMS RemoteDB, TMS XData, TMS Echo, TMS Logging. 
*BIZ level: Beginner 


10h00: Coffee break


10h30: The TMS Aurelius book , experiences & book writing process (John Kouraklis)
John Kouraklis book author talks about his most recent book dedicated to TMS Aurelius and the experiences related to writing it.


Wagner Landgraf

11h00: Session 2 – The Joy of Databases (Wagner R. Landgraf) 
A talk about new ways to deal with databases. What is an ORM (Object-Relational Mapping) framework, and are the most recent news and features about it. What you can use to help you out in modeling your databases, easily use existing databases with the new paradigm, and advanced techniques on ORM and database modeling. Products covered: TMS Aurelius, TMS Data Modeler 
*BIZ level: Intermediate 


Wagner Landgraf

12h00: Session 3 – Your App Everywhere: REST API (Wagner R. Landgraf) 
Multitier, cloud, REST, HTTP, SSL: What, Why, When, and mainly, How? Learn what a REST API server means, why you will benefit from moving your app to the cloud, and learn how to do it in a very RAD way. The latest features will be covered, even for the experienced users. Products covered: TMS XData, TMS Sparkle 
*BIZ level: Intermediate 


13h00: Warm lunch


Wagner Landgraf

14h00: Session 4 – The Unsung Heroes (Wagner R. Landgraf) 
A deeper look into three awesome TMS Business libraries that bring you solutions for problems you never thought you had. User-customized application, modifying business rules at runtime, offline data synchronization, and moving your app to the cloud in a couple of days. Products covered: TMS Scripter, TMS Echo, TMS RemoteDB 
*BIZ level: Beginner 


Wagner Landgraf

15h00: Session 5 – Getting serious in the Cloud (Wagner R. Landgraf) 
Advanced techniques and concepts when building REST API servers: Security, background processing and deep analysis of real-world source code. Products covered: TMS XData, TMS Sparkle 
*BIZ level: Advanced 


16h00: Coffee break


Wagner Landgraf

16h30: Session 6: All Together Now (Wagner R. Landgraf) 
A very interactive session where all the current ideas from the TMS team for the future of TMS Business will be presented. We will discuss the existing roadmap, brainstorming about all the possibilities, have all questions answered and summarize the whole day. 


17h30: Wrap-up, Q&A & open discussion 


TMS DEV Intensive
November, 15th – Dusseldorf, Germany

Bruno Fierens

9h00: Welcome & introduction (Bruno Fierens)
A welcome to all attendees and introduction to the agenda.


Bruno Fierens

9h15: TMS VCL UI Pack modernization (Bruno Fierens)
What is new & upcoming for ensuring VCL UI controls look as good as possible: high-DPI, VCL styles, Office styles, images


Marion Candau

10h15: Using TMS Cryptography Pack for secure signing of PDF files (Marion Candau)
Marion will show how to sign a PDF document with a cryptographic USB token using TMS Cryptography Pack. She will briefly explain the cryptographic mechanisms of an electronic signature, then she will present how a cryptographic USB token works and finally, how to use a TMS Cryptography Pack component to sign a PDF document with the token. 


10h45: Coffee break


Adrian Gallero

11h15: TMS Flexcel 7.0 introduction: taking advantage of the new Flexcel 7.0 for VCL/FMX features (Adrian Gallero)
Adrian will show how to create a Delphi app that exports data to Excel and Pdf files, using some of the newest stuff introduced in FlexCel 7. If time allows, he will also have a glimpse at the future and look at the stuff currently in development.


12h15: Warm lunch


José León Serna

13h15: Taking the wraps of our upcoming groundbreaking product for Delphi developers (José León Serna / Bruno Fierens)
Be there, be amazed, receive the first product beta and start playing with it!
It has been more than one year that Bruno Fierens, CEO of tmssoftware.com got in touch with José Leon Serna and discussed about future opportunities for Delphi development. Surprisingly our visions for future directions and possibilities perfectly aligned. From there, an intense collaboration started and in this session they will present the first fruits of this collaboration. TMS clearly could not have achieved the amazing technical break-throughs without José Leon. The TMS team is honoured, happy and proud to have one of the brightest minds in the Delphi world in our family.


Roman Yankovsky

14h15: Using TMS FixInsight to bring your code to a higher & more secure level (Roman Yankovsky)
Roman will show how to use FixInsight’s static code analysis in Delphi to find bugs in your code before your customers do.


15h15: Coffee break


Roman Kassebaum

15h45: TMS WEB Core v1.3 for web, cross platform Electron and mobile PWA apps new features & capabilities (Bruno Fierens / Roman Kassebaum)
Together with Bruno Fierens, Roman Kassebaum, architect of the TMS WEB Core IDE integration, will present and demonstrate TMS WEB Core v1.3 new features & capabilities.


Holger Flick

16h45: Putting it all together : Using TMS XData back-end and TMS WEB Core + TMS FNC UI as front-end (Holger Flick)
Many frameworks, many platforms: TMS has all the tools. You’ve read it many times, but how do all these technologies fit together?
This session will give an example of how you can build a database application for multiple desktop and mobile platforms as well as for the web using the same database backend. It will also provide an overview of the technologies that are available from the TMS toolbox and will hand you key pointers how to pick the right one for the task you need to achieve. In short, you will get a hands-on example that covers TMS XData, TMS RemoteDB, TMS Web Core, VCL, and FNC.


17h45: Q&A & open discussions 


Meet the experts

During the whole TMS Dev Intensive Day, the opportunity will be given, as alternative to the regular sessions, to meet each of the many TMS experts available during the full day in person or in very small group to discuss and learn from. 

Wevelgem Training Day (Belgium)

On November 18th, there will be a second TMS Business Masterclass day in Wevelgem, Belgium. The event will take place at the TMS Software Main Office. It’s an opportunity to meet other members of the team as well!

The sessions will very similar to the TMS Business Masterclass in Dusseldorf on November 14th, thus this is a simplified agenda. All sessions will be presented by Wagner Landgraf and Bruno Fierens.

TMS Business Masterclass
November, 18th – Wevelgem, Belgium

Speakers:

Bruno Fierens
Wagner Landgraf

9h00: Welcome & introduction (Bruno Fierens)


9h15: Session 1 – The TMS Business World (Wagner R. Landgraf) 


10h00: Coffee break


10h30: Session 2 – The Joy of Databases (Wagner R. Landgraf) 


11h30: Session 3 – Your App Everywhere: REST API (Wagner R. Landgraf) 


12h30: Warm lunch


13h30: Session 4 – The Unsung Heroes (Wagner R. Landgraf) 


14h30: Session 5 – Getting serious in the Cloud (Wagner R. Landgraf) 


15h30: Coffee break


16h00: Session 6: All Together Now (Wagner R. Landgraf)  


17h00: Wrap-up, Q&A & open discussion 


SPEAKERS

Adrian Gallero (Uruguay)

Adrian Gallero is an Electrical Engineer who has been working in Delphi since it was Turbo pascal 4. He has worked in calculating power line distribution for electrical companies in Montevideo and Rio de Janeiro. He lived for over 3 years in Madrid working the development of a telecommunication management system, and over a year in Sydney developing custom solutions for a freight-forwarding company. 

He has been working with spreadsheets for longer than he can remember, and in 1996 he developed a small component that allowed his Delphi 1 apps to export the results to a spreadsheet (to his surprise, he learned a year ago that the electrical company is still using those unmodified apps today). This component grew over the years: It was renamed FlexCel in 2001 and it joined the TMS family in 2002. Today FlexCel exists in both Delphi and .NET versions, and they contain over a million lines of code. 


Bruno Fierens (Belgium)

  • Studied civil electronic engineering at university of Ghent, Belgium (1987-1992).
  • Started a career as R&D digital hardware engineer at Barco Graphics Belgium designing with FPGA, VHDL, graphic processors, PCI, Silicon Graphics add-on boards, high-end printer controllers,…
  • Began writing software in Turbo Pascal 3.0 since 1987 and used all Borland Pascal and all Delphi versions since then.
  • Founded TMS software in 1996, developing VCL components starting with Delphi 1.
  • TMS software became Borland Technology Partner in 1998 and developed Delphi Informant award-winning grid & scheduling components.
  • From 2011 FireMonkey cross platform components,targetting Windows, macOS, Android, iOS.
  • In 2016, TMS software launched FNC, a framework neutral component architecture enabling to use UI controls in VCL,FMX & LCL apps
  • In 2018, TMS software launched TMS WEB Core, a framework for creating rich web clients using ObjectPascal
  • Currently doing and managing VCL, FMX, Web, .NET, IoT, LCL, REST, node.js development.
  • Is a regular speaker at conferences (Be-Delphi, DelphiTage, ITDevCon, CodeWay Tour, EKON, DevTracks, SDN, ..).
  • Available for consulting & custom project development.
  • Bruno Fierens was titled Embarcadero MVP since 2012.
  • Special area of interest are user interfaces design, UX, RAD software development, hardware/electronics.

Holger Flick (United States)

Since 1996, Dr. Holger Flick has been using Delphi as his primary development platform and has been an active member of the community. He studied computer science at Dortmund University and later wrote his dissertation at the Ruhr University in Bochum in the field of telemedicine. For his passion for and knowledge of Delphi he was awarded the “Delphi MVP” moniker in 2016. 

In 2019, Holger moved to the United States of America (USA) and established his new company FlixEngineering LLC. The company focuses on consulting, training and software development using object-oriented programming languages like Delphi, C#, Swift, and Objective-C. 
Holger is part of the TMS Software family providing his expertise as Evangelist and QA Engineer. 


John Kouraklis (United Kingdom)

John Kouraklis started exploring computers when he was 16 and since then has followed all the way from Turbo Pascal to the latest Delphi versions as a hobby initially and as a profession for most of his adult life. He has developed a wide range of applications, from financial software to reverse engineering tools. The last years he has been teaching business and programming in undergraduate and postgraduate courses. He is the author of MVVM in Delphi (Apress, 2016) and Introducing Delphi ORM – ORM with TMS Aurelius (July 2019)


José León Serna (Spain)

Creator of Delphi for PHP/HTML5 Builder and former Director of Engineering and Branch Manager at Embarcadero Technologies between 2010 and 2016. Although the Embarcadero’s branch participated in the development of several products, he was mainly responsible for RAD Studio, and more specifically, the IDE. He participated actively on the conception and implementation of multitude of new features, specially focused on multi-device development. He has been involved in IDE development for most part of his career and is the area where he enjoys most. 


Marion Candau (France)

  • PhD in cryptography
  • Developer at Cyberens, a French cybersecurity company located in Bordeaux. 
  • TMS Cryptography Pack architect
  • MVP Embarcadero
  • She mainly develops cybersecurity-related applications and advises clients to use cryptographic tools and libraries in their own applications.

Roman Kassebaum (Germany)

Roman Kassebaum is a freelancer. He started to work with Delphi in 1996 after he graduated with a Master degree from the University of Paderborn. He is a Delphi MVP and an Embarcadero Technology Partner. During the last years he became a member of the great TMS team and he is also a  TMS certified consulting partner. Roman is a specialist in all kinds of Delphi projects including TMS Business components and the cutting edge TMS WEB Core library for which he created the Delphi IDE integration. 


Roman Yankovsky (Russia)

Roman Yankovsky is an Embarcadero MVP who has been working with Delphi since Delphi 2. He joined the TMS team in 2016. He is the product manager and architect of the  FixInsight static analysis tool for Delphi. 

Roman Yankovsky is also author of the Delphi AST, an open source Abstract syntax tree builder for Delphi you can find here: https://github.com/RomanYankovsky/DelphiAST and this library is used in the great OmniPascal Visual Studio Code extension.


Wagner Landgraf (Brazil)

  • Graduated in Electronic Engineering and M.Sc in Industrial IT at Federal Technological University of Parana-Brazil.
  • More than 24 years experience (since 1995) in Delphi development – since Delphi 1.
  • Architect and main developer of Delphi libraries like TMS Aurelius, TMS XData, TMS RemoteDB, TMS Scripter, among others.
  • Product Manager at TMS Software for more than 20 years.
  • Founder of landgraf.dev online school.

Special Bonuses

There are also special bonuses for attendees of TMS Training Days!

Book: Introducing Delphi ORM

All attendees of TMS Business Masterclass day in Dusseldorf (Nov 14th) will receive a free copy of the book “Introducing Delphi ORM: Object-Relational Mapping using TMS Aurelius“, written by John Kouraklis. Wagner Landgraf, author of TMS Aurelius was a technical reviewer of the book.


“Introduction to TMS Web Core” Training Course: 50% off

All attendees of TMS Training Days will get a 50% off discount coupon for the online training course “Introduction to TMS Web Core”, from landgraf.dev. The instructor is Wagner Landgraf and you will learn concepts from the beginning: what is a web application, how does it work, what are single page application (SPA) and multiple page application (MPA), what is HTML, JavaScript, CSS, Bootstrap, AJAX. Full source code of the examples are provided.


Special discounts for TMS Products

TMS Software will also offer special discounts for new license on several TMS products, for all attendees. Stay tuned for the offers!

Registration and More Info

You can find more info from TMS Software web site directly: TMS Training Days in Dusseldorf and TMS Business Masterclass in Wevelgen.

Registration fees:

Nov 14th, TMS Business MasterClass: 295 EUR 
Nov 15th, TMS Dev Intensive: 295 EUR
Nov 18th, TMS Business Masterclass: 295 EUR

Special offer for the two TMS Training Days in Dusseldorf (Nov 14th and 15h): 495 EUR 

Embarcadero Conference 2019 in Brazil: Meet the NFC-e Issuer in the Cloud

On October 22nd, 2019, there will be another edition of Embarcadero Conference. It’s the biggest Delphi event of the world, and happens in São Paulo, Brazil. There are hundreds of attendants.

In this edition, just like last year, there will be seven simultaneous sessions, all happening in the same auditorium. You choose which session to listen by selecting the audio channel in your headphones. The full session list is available in the site of the event.

With som many sessions happening at the same time, you get even anxious to choose which want to watch. But if there is one that you cannot miss, it’s this one we are going to suggest.

Our speaker, Wagner Landgraf, will be presenting the session “Anatomy NFC-e issuer in the cloud (REST API). Oh yes, we are recommending our own session. But that’s just a coincidence, it will be very interesting, believe me!

Why “in the cloud”?

Ok, let’s anticipate some content here. Why of the reasons is the “why”. NFC-e is a legal digital document in Brazil, and when we issue such a document in the cloud, we have several advantages compared to the issuing of the same document in a local desktop or mobile application:

  • One single and centralized place to configure the issuing environment (installation of certificates, configuration of cryptography libraries, etc.)
  • Minimizes the risk of problems and support cost: you don’t have to configure hundreds of client environments
  • Much easier system update and maintenance: you also don’t need to manage all the clients.
  • You can issue NFC-e from any platform (from a desktop Windows application, a mobile application, or even from Rasperry PI, who knows?). All you need is internet connection and HTTP communication on that platform.
  • It’s easier to develop clients in other platforms. No need to be able to port and compile several 3rd party libraries needed for the document issuing, like ACBr, FastReport, FortesReport, cryptography dlls or tools, etc.

Can you disclose a little bit more?

To give you a tease of what will be presented, here are some screenshots of the API that we will show and explain at the event:

Not only that…

This will be a really interesting session. There will be an additional surprise that for sure will be very interesting for all those who work with Delphi and deal with such legal Brazilian documents. That’s just the beginning… See you at Embarcadero Conference 2019!

Databases inside Delphi Ecosystem: Webinar

On October 10, Softacom is holding a webinar on “Databases inside RAD Studio & Delphi ecosystem. Migration process (legacy to up-to-date, to another RDBMS), data layer architecture (ORM), data access architecture (REST API)”.

Speakers

Wagner Landgraf from landgraf.dev will be one of the speakers, talking about how database access evolved in Delphi since the early versions, Object Relational Mapping (TMS Aurelius), REST API Servers (TMS XData) and remote database access (TMS RemoteDB).

Serge Pilko

Serge Pilko

Embarcadero MVP & CEO of Softacom – Enterprise digital transformation & software modernization services expert

Wagner Landgraf

Wagner Landgraf

CEO of landgraf.dev / TMS Software Partner / TMS Business Product Manager

Bruno Fierens

Bruno Fierens

Embarcadero MVP & CEO of TMS Software – Main player as Delphi and C ++ Builder 3rd party vendor

What will you learn

For CEO / Owner / CTO / IT – Director / Product Manager:

  • Up-to-date Delphi solutions and frameworks for communications with databases;
  • Pitfalls of migration to up-to date or another type of RDBMS;
  • Cutting-edge Delphi-related solutions and practices for RDBMS;
  • Arguments, why you have to use Delphi and RAD Studio for your multi-tier applications;

For Developers and Technical Specialists:

  • Best practices for developing data access layers for RAD Studio projects;
  • How to use ORM for Delphi projects;
  • How to develop REST API server as DB facade;
  • Insights, tips and tricks for the app developers from the first mouth of DB tools and DB framework developers;

Webinar Highlights:

  • Most popular data access patterns 10-15 years ago and today;
  • Pitfalls of migration legacy versions of RDBMS to up-to-date versions;
  • Pros and cons of migration to ORM instead of using regular practices;
  • ORM for Delphi ─ TMS Aurelius from TMS Software. Pros and cons of the solution;
  • Pros and cons of migration to REST API instead of using “classic” DB access;
  • REST API server for Delphi ─ RAD server. Pros and cons.

For webinar attendees only!

Don’t miss a chance to get your discount promo code for EKON conference and 10% discount for new TMS Software licenses.

Registration

Registration link: https://www.softacom.com/en_softacom_october_webinar

5 Reasons to Use Inline Variables in Delphi

Inline variables declaration is a feature introduced in Delphi Rio 10.3. What is it?

In short, it is the possibility to declare a variable in any line of your code. That is, you can declare a variable this way, within the begin..end block:

procedure Test;
begin
  var I: Integer;
  I := 22;
  ShowMessage (I.ToString);
end;

A lot of people already understood how this feature works, but did not understand why it is interesting. In this article, I will show you this new feature with a focus on the advantages it brings.

1. Organizes your code

The variable is only accessible from the point it is declared. For many people this better organizes the code in a large method, because it is possible to know better where that variable is being used. Consider the following code:

procedure Test;
var 
  A, B, C, D, E: Integer;
  Found, Done, Excluded: Boolean;
  Text: string;
begin
   // many
   // lines
   // of
   // code
end;

It may be confusing to know where all of these variables are used, when they are being initialized, if it has been set a value before, etc. In the following code, we know that the Text variable, for example, does not exist at the beginning of the code, and that it is only used at the end. No code changed its value bfore that part of the code:

procedure Test;
begin
   var A, C: Integer;
   // We cannot use Text here
   // lines
   // of
   // code
   
   var Text: string;
   // Text can only be used here
end;

2. Minimize bugs

Have you ever done something like this:

procedure Test;
var I: Integer;
begin
  for I := 0 to Count - 1 do
    Process;
  DoSomethingWithI(I);
end;

That is, using the for variable after the loop is finished. This is not safe, and although the compiler raises a warning for this, many people ignore it. By declaring the for variable inline, it will be only valid inside the for, and using it outside the block will result in a compilation error:

procedure Test;
begin
  for var I: Integer := 0 to Count - 1 do
    Process;
  DoSomethingWithI(I); // Compile error!!!
end;

The benefit from the code above comes from the fact that the scope of the variable is limited to the block in which they are declared. That minimizes the chance of errors. For example, suppose you have a code like this:

procedure Test;
var I: Integer;
begin
  I := CalculateSomething;
  Persist(I);
  // many lines below...
  Log(I);
end;

Then you eventually need to refactor the code in a way that the first part only executes under a specified condition. You think that variable I is only being used there, and do something like this:

procedure Test;
var I: Integer;
begin
  if Condition then
  begin
    I := CalculateSomething;
    Persist(I);
  end;
  // many lines below...
  Log(I);
end;

There, you forgot the last line and maybe the value of I is not what you expect. Changing the scope of your variable to the block will generate compilation errors if the variable is used outside the block, which will show you the problem immediately, so you can make a decision:

procedure Test;
begin
  if Condition then
  begin
    var I: Integer;
    I := CalculateSomething;
    Persist(I);
  end;
  // many lines below...
  Log(I); // Compile error!
end;

3. Less typing

Who does not want more productivity? If you can type a bit less to declare a variable, why not? You can now declare and initialize a variable at the same time:

procedure Test;
begin
  var I: Integer := 22; 
  ShowMessage (I.ToString);
end;

But not only that. There is also type inference, which means that in most cases you do not need to include the variable type when declaring it. Just initialize the variable with a value and Delphi will know the variable type.

Looks like it’s not a big deal? Imagine a case where the variable type is using heavy generics:

procedure NewTest;
var
  MyDictionary: TObjectDictionary<string, TObjectList<TMyAmazingClass>>;
  Pair: TPair<string, TObjectList<TMyAmazingClass>>;
  List: TObjectList<TMyAmazingClass>;
begin
  MyDictionary := TObjectDictionary<string, TObjectList<TMyAmazingClass>>.Create;
  MyDictionary.Add('one', CreateList);
  Pair := MyDictionary.ExtractPair('one');
  List := Pair.Value;
  ShowMessage(List.Count.ToString);
end;

Using inline variable and type inference, you can rewrite the code this way:

procedure NewTest;
begin
  var MyDictionary := TObjectDictionary<string, TObjectList<TMyAmazingClass>>.Create;
  MyDictionary.Add('one', CreateList);
  var Pair := MyDictionary.ExtractPair('one');
  var List := Pair.Value;
  ShowMessage(List.Count.ToString);
end;

Better, isn’t it?

4. Increases performance

The fact that the variables belong to a more limited scope (within a begin..end block) can even increase code performance!

You can see more details in this excelent article: Inline Variables can increase performance. In summary: the variable will initialized only if the code execution enters the block, and finalized only upon block exit. In this code, for example:

procedure TestInlineVars(const ACondition: Boolean);
begin
  // BEFORE
  if (ACondition) then
  begin
    var S := 'Inline String';
    var I: IInterface := TInterfacedObject.Create;
    var F: TFoo;
    F.S := 'Managed Record';
  end;
  // AFTER
end;

Variables S, I and F are managed types (string, interface and record). The compiler automatically adds initialization and finalization code for them.

If you call TestInlineVars procedure a million times, it will have a big impact. However with the code above, the variables will only be initialized if ACondition is true and the block is actually executed. Less unnecessary code being executed.

5. Makes it easier to use conditional directives

This feature can help even in small things. This article brought my attention: Unexpected Benefit of Inline Variables: Conditional Blocks.

If you use compiler directives where you declare and use different variables for each situation, you have also wrap variable declarations around a compiler directive as well:

procedure DoesSomething;
var
  {$IFDEF CASE1}
  var1: Integer;
  {$ENDIF}
  {$IFDEF CASE2}
  var2: Integer;
  {$ENDIF
begin
  {$IFDEF CASE1}
  // use var1
  {$ENDIF}
  {$IFDEF CASE2}
  // use var2
  {$ENDIF}
end;

Boring, huh? In my opinion this is easier:

procedure DoesSomething;
begin
  {$IFDEF CASE1}
  var1: Integer;
  // use var1
  {$ENDIF}
  {$IFDEF CASE2}
  var2: Integer;
  // use var2
  {$ENDIF}
end;

I believe that inline variables still brings other subtle benefits in specific situations that are not listed here. If you can think of any other benefit, leave your comment. If you do not agree and you think inline variables are not good news for Delphi, leave your comment as well. Just do not forget one thing: if you didn’t like it, simply don’t use it!

What I liked about Delphi/Rad Studio 10.3.2 update

Embarcadero has just released a new Delphi Rio version (which means also Rad Studio and C++ Builder): version 10.3.2. It’s a minor update – meaning product codename is still “Rio”, and it’s binary (DCU) compatible with previous 10.3.1 version.

Why then, an article about a minor update? Usually minor updates contain just bug fixes and small improvements, however it’s not the case of this one. I will mention here two improvements that I personally found significant. It’s also worth mentioning that Embarcadero has recently published the updated Rad Studio roadmap – May 2019 which lists the probable new improvements in upcoming major versions. Now to the improvements in this release:

macOS 64-bit support

Delphi 10.3.2 finally supports macOS 64-bit platform. If you develop macOS applications with Delphi, you know how much this is important.

Apple has been planning moving all macOS applications to 64-bit for years and informing users and developers that 32-bit macOS applications will be deprecated soon. And the time has come. When using macOS Mojave and trying to run 32-bit applications (the ones built with Delphi until 10.3.1, for example), users are receiving the following message:

App is not optimized for your Mac and needs to be updated

I would say that your application wouldn’t give much confidence to the user, do you agree? And, finally, in next macOS release, macOS Catalina (10.15), 32-bit applications will simply not work anymore.

Thus, if you develop (or intend to develop) macOS applications with Delphi, it’s a relief to know that you won’t have those problems anymore: just build 64-bit macOS applications and everything is going to be alright!

IDE stability and performance

Another improvement that is worth mentioning is the significant improvement in IDE stability and performance. First Delphi Rio version brought us a refreshed IDE, with dark theme and more modern visual. But there were also issues: flickering, strange visual “effects”, slowness, the screen was redrawn several times when you resized the window, among other things.

That was significantly improved in this new update. If you are already using previous Delphi Rio 10.3 or 10.3.1, I believe you will notice the difference, with a smoother and snappier IDE in this regard.

Delphi Rio 10.3.2 is already available! There are many other improvements besides the ones mentioned above. If you are already using this new update, leave a comment telling what do you think about it!

What are memory leaks and what are their consequences?

A memory leak happens when your application allocates a space in memory and never frees it again.

How memory leaks happen in Delphi

In a Delphi application, memory spaces are allocated and released all the time. This is often done automatically by the compiler or by the RTL – for example, when allocating variables of primitive types, parameters that are passed to functions, etc. – and we usually do not have to worry about it.

However, there are many cases where we allocate memory manually. Instantiating an object is one of them:

Obj: = TMyObject.Create;

The code above will allocate a memory space and the Obj variable will point to the address of allocated memory space. To release it, you can use the Free method:

Obj.Free;

If the developer forgets to call the Free method, the memory space associated with the object is never released. We have a memory leak.

Consequences of memory leaks

You may wonder: "What’s the problem? I’ve seen this happen in my application and I’ve never had any practical problems!"

Actually, we often don’t see issues when there are just a few memory leaks, and the consequences also depend on the type of applications:

Client applications (desktop or mobile)

In general, in desktop or mobile applications, the consequences are not very serious. In current operating systems, the memory allocated by the application is generally released when the application is terminated, so as not to cause system instability.

Even so, if your application generates a lot of memory leaks, there may be some problems, caused by excessive memory usage:

  • Slow application and/or system: Disk access may be necessary to get around the memory shortage.

  • Application abrupt closing: The operating system may force application termination due to excessive memory usage. This is more common in mobile applications.

  • Application bugs: Application code that allocates memory can start to crash and cause bugs.

Server Applications

When talking about server applications, the problem gets worse. That’s because ideally you will never close the server – you want it to run "forever" without needing to restart it.

The consequences are almost the same as the ones for desktop applications, but since the server application theoretically should never close, any small memory leak will have consequences in the future. The memory will slowly be consumed over days, weeks, months, and your server performance will degrade, bugs will appear and eventually the server will stop working.

Avoiding Memory Leaks

There are techniques and tools to help you detect and remove memory leaks from your application. This will be covered in future posts.

What about you? Have you ever had issues in your application caused by memory leaks? Do you consider detecting and removing memory leaks a low-priority task compared to other more important things to worry about in your code? Leave a comment!