Subscribe: marcocantu.blog
http://blog.marcocantu.com/blog_rss2.xmldata
Preview: marcocantu.blog

marcocantu.blog



Techie Italian Blogging on Delphi and More



Updated: 2017-07-21T15:00:50.436Z

 



Delphi Blogs of the Week #54

2017-07-21T15:00:50.436Z

A new round up of news, after my two weeks of vacation around Europe.

A new round up of Delphi-related news, after my two weeks of vacation around Europe.

Delphi Product Blogs and More

Quickly find add-ons with new GetIt categories by Sarina at https://community.embarcadero.com/blogs/entry/quickly-find-add-ons-with-new-getit-categories (by the way, we are open for ideas and suggestions, given the system is now fairly flexible)

The Enterprise Connector Beta has started by Sarina at https://community.embarcadero.com/blogs/entry/the-enterprise-connector-beta-has-started

Viewing Salesforce Data in RAD Studio Data Explorer by Sarina at https://community.embarcadero.com/article/16541-viewing-salesforce-data-in-rad-studio-data-explorer

#FireMonkey RAD Studio Overview Download Link: http://forms.embarcadero.com/sFireMonkeyRADStudioOverview

Targeting Chrome OS with Delphi via Android and Linux by Jim McKeeth at https://community.embarcadero.com/blogs/entry/targeting-chrome-os-with-delphi-via-android-and-linux

Notable Blog Posts

Send an Email with an Attachment in iOS, Android, and Windows using RAD Studio by Roy Woll at https://www.woll2woll.com/single-post/2017/04/24/Send-an-Email-with-an-Attachment-FireMonkey

ScannerMApp: a QR/barcode scanner app with Delphi, ZXing and TFrameStand by Andrewa Magni at https://blog.andreamagni.eu/2017/06/scannermapp-a-qrbarcode-scanner-app-with-delphi-zxing-and-tframestand/

Using Google Sign-In for Firebase SDK on Android by Allen Drennan at https://blog.grijjy.com/2017/07/20/using-google-sign-in-for-firebase-sdk-on-android/

SIMD Assembly Optimization by Erik van Bilsen at https://blog.grijjy.com/2017/07/10/simd-assembly-optimization/

Building a (real) Linux daemon with Delphi - Part 1 by Paolo Rossi at http://blog.paolorossi.net/2017/07/11/building-a-real-linux-daemon-with-delphi-part-1-2/

4 Years at Embarcadero Technologies by Jim at http://delphi.org/2017/07/4-years-at-embarcadero/

Encode JSON to a FireDAC Memory Table without REST Request by Craig at http://chapmanworld.com/2017/07/07/encode-json-to-a-firedac-memory-table-without-rest-request/

Stay tunes for more news.

(image)



Delphi Blogs of the (Week) Month #53

2017-06-29T11:08:06.231Z

Really becoming more of a monthly post, with a summary of links, recent news, blogs, releases, etc.

Embarcadero News

Embarcadero Partners with CData to Offer Enterprise Connectors (press release at http://www.businesswire.com/news/home/20170621005319/en). You can read more on this blog post from Sarina, https://community.embarcadero.com/blogs/entry/new-enterprise-connectors-for-delphi-and-c-builder-join-the-beta. The beta of the components can be found in GetIt for Tokyo customers (Professional and above), in a new "Connectors" category. You can use them to connect with over 70 different business, enterprise and social web services. Very nicely integrated with FireDAC and the IDE.

A patch for Tokyo focused on Android is available, http://blog.marcocantu.com/blog/2017-june-102-android-patch.html

Books, books!

Cary Jensen has a new FireDAC book out. See the announcement at http://caryjensen.blogspot.it/2017/05/delphi-in-depth-firedac-is-now-available.html and a review by Stephen at https://community.embarcadero.com/blogs/entry/firedac-book-using-interbase.

Dalija has a new book project focused on Delphi Memory Management, as you can read at https://plus.google.com/u/0/+DalijaPrasnikar/posts/Kkund4GXpXv and https://plus.google.com/+DalijaPrasnikar/posts/CbEnZdx6fNY.

Blog Posts

Visualize JSON using TTreeView at https://community.embarcadero.com/blogs/entry/visualize-json-using-ttreeview

New FireDAC Database Status Page at https://community.embarcadero.com/blogs/entry/new-firedac-database-status-page

Using the Google Cloud Platform APIs at http://​https://blog.grijjy.com/2017/01/13/using-the-google-cloud-platform-apis/

FireMonkey and VCL Style Packs from DelphiStyles.com at https://community.embarcadero.com/blogs/entry/fmx-and-vcl-style-packs-from-delphistyles-com

Third Party Tools

MIDAS dropbox library at http://www.midaconverter.com/dropbox.html

PasLibVlc - use VideoLAN player in Delphi at http://prog.olsztyn.pl/paslibvlc/

The Light End

Delphi developers use spaces, right? https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/

(image)



RAD Studio 10.2 Patch for Android Released

2017-06-26T09:33:10.608Z

Last week Embarcadero released a patch for Delphi and C++Builder 10.2 Tokyo addressing issues for Android platform support

As Sarina already mentioned in the community site, last week Embarcadero released a second patch for Delphi and C++Builder 10.2 Tokyo. The first patch was focused on tool chain issues, while this new one addresses several issues for Android platform support. Namely, some of the fixes relate with the platform changes in editing (causing problems when using the backspace key) while other address regressions (and performance issues) introduced in 10.2 Tokyo and caused by platform changes in threading support.

You can find a list of open Quality Portal issues the patch addresses in the download page at https://cc.embarcadero.com/item/30781. This patch is available also for trial customers.

The matching source code is available only for registered users at https://cc.embarcadero.com/item/30782. Notice that the source code includes changes that affect multiple platforms, but we haven't released the updated DCU files for those other platforms. In other words, PAS and DCU will most likely be out of synch either with or without the source code patch, depending on the target platform, and you should consider enabling this new source code for Android specific projects or using it as reference only.

We know this is no ideal and this patch is intended as a temporary solution, while we complete and test a full update of the product, including all internal fixes and all platforms.

(image)



Celebrating 22 Exciting Years of Innovation with Delphi

2017-06-22T09:56:53.341Z

Throughout its history, Delphi has been one of the most successful development platforms as it continues to navigate a highly competitive space, maintain its essence as a robust integrative toolset, and serve a large community of passionate developers. A new marketing booklet summarizes today's product vision. Delphi was released over 22 years ago in San Francisco. More than two decades later, the Delphi design philosophy remains steadfastly the same: continual innovation and increasing productivity for developers. Throughout its history, Delphi has been one of the most successful development platforms as it continues to navigate a highly competitive space, maintain its essence as a robust integrative toolset, and serve a large community of passionate developers. Deep investments have been made in the product over the years to migrate Delphi from a Windows-centric product to a multi-device development tool supporting the five most popular operating systems: Windows, macOS, iOS, Android, and Linux. Global Reach Delphi developers can be found in virtually every corner of the world, and this is why a city moniker designates each of the 10.x versions to celebrate the diverse global reach and significant contributions that Delphi is making today. Since VCL has been the best object-oriented library Windows API wrapping for over 20 years, Seattle was chosen first (to honor the city near Microsoft headquarters). Next, the Berlin release acknowledged the strong developer community and partner network presence that Delphi has -- not only in Germany, but throughout all of Europe. Most recently, the Tokyo release recognizes the proud and growing community in Japan. Tokyo Release: Running on Linux Delphi has long had amazing support for multi-tier and server-side development on Windows. The 10.2 Tokyo release extends all of that support to the Linux operating system. This includes support for WebBroker, WebServices, DataSnap, and the new EMS modules for RAD Server. This means that many of your existing RAD Server/Windows server applications will migrate quite easily over to Linux. Only a few changes are necessary in a typical migration, thanks to the cross-platform FireDAC support. FireDAC works on both Windows and Linux to give you unparalleled access to your favorite databases.  There's more. Gather up all of your Apache or IIS modules, your REST backend services, your Windows services, or any other server-side or console application, and easily migrate those app components from Windows to Linux. New features continue to drive strong innovation If you've not taken a close look lately, it's time to reacquaint yourself with the newer release of Delphi and explore some truly amazing features. These are only a few: Live Preview - Let's say that you're designing an app, and you want to see how it looks on an iOS or Android device. As you work in the Form Designer, simply click a button to see your app in the Live Preview feature of Delphi -- in proper scale and clear definition. There's no need to plug in your device, and you can easily and repeatedly preview the app in either device format as you continue your development work. App Tethering - Maybe you've built a desktop app, and you're also building a mobile companion app. How should these apps talk to each other? App tethering makes it very easy to connect any app on any platform to an app on any other platform -- including Mac-to-Windows, Android-to-Mac, iOS-to-Windows, and so on. Parallel Programming Library - High-level, easy usable, and quick parallelization. It's the holy grail, and it's an integral part of Delphi. Desktop Bridge - Need to get your desktop app into the Windows Store? Simply rebuild, since the Windows Store is available as a build target (just like any other target). No need to mess with the tedium that you may have heard about in other development platforms[...]



Pictures from Italian Delphi Day last week

2017-06-19T16:23:29.838Z

Last week I was at a large Italian conference (almost 100 Delphi developers) in my city. Here are a few pictures and comments.

Last week I was at a large Italian conference (with almost 100 Delphi developers attending) in my city. I gave a keynote on the status and future of Delphi, and there were many other sessions given by Italian Delphi developers and some international experts (including Stefan, Dmitry, and Yuriy). See the conference site www.delphiday.it for more information and the program.

I was able to meet and talk with many attendees, several of which I've known for years, but I was also happy to find some very young developers in the audience. Here there are a few pictures (some I took and some shared by Paolo Rossi and Marco Breveglieri on social media):

(image)

(image)

(image)

(image)

(image)

(image)

(image)

Nice conference. Now I have a fairly long break, I'll be back speaking in public after the summer.

(image)



The Issue with Delphi Runtime Packages and Windows 10 Creators Update

2017-06-12T17:01:27.264Z

Windows 10 Creators Update changes to DLL loading affects Delphi applications that use runtime packages. Here is in update on the problems and possible solutions. Since Windows 10 Creators Update was released two months ago, we have started seeing reports of issues with runtime package (for example, https://quality.embarcadero.com/browse/ RSP-17972, where myself, Embarcadero support and R&D have chimed in), mostly while debugging applications. The issue is affecting applications that use runtime packages (BPL), not applications compiled as a single executable. In general terms, the problem affects all applications that use runtime packages, built with any version of Delphi (recent, old, or even the early ones). In most cases, the slowdown for end user application is relatively limited, however applications with runtime packages on network shares are affected. But what is happening? The Core Issue: Optimized DLL Loading Let's start with some background information. On the Windows operating system, dynamic linking (DLLs) support both load-time binding and full runtime binding (LoadLibrary). In both cases, when the DLL is generated it is has a table of entry points (export table). Any other library or executable referring to it has an import table referring to functions of that export table. Since the early days, when the Delphi compiler (and linker) generate a DLL or package library (BPL) by assembling multiple units in a single binary file, and do so by making functions and methods available by creating multiple sections in the export/import table. This was likely a minor linker optimization, and never had a real side effect. Fast forward to Windows 10 Creators Update. Microsoft decided to rewrite the DLL loading code to make it parallel (different threads can load different libraries in parallel) to optimize applications loading. However this change has ended up affecting the loading of libraries with multiple sections in the export tables. Empirically, it looks like a BPL is loaded once for each segment. Now consider that most of the core Delphi BPL (rtl, vcl, fmx) have dozens and dozens of sections, and the result is libraries are loaded (and unloaded) dozens and dozens of times. Here is a screenshot of the effect in the Event log (this is a single form FMX application): While in this simple application on my machine it takes a couple of extra seconds, with larger applications having many runtime packages the effect on the debugger can be fairly extreme. Here is the full debugger log, with operations on packages (and other notable ones) marked in bold: Thread Start: Thread ID: 12052. Process Project13.exe (13088) Process Start: C:\Users\marco\Documents\Embarcadero\Studio\Projects\Win32\Debug\Project13.exe. Base Address: $00400000. Process Project13.exe (13088) Module Load: Project13.exe. Has Debug Info. Base Address: $00400000. Process Project13.exe (13088) Module Load: ntdll.dll. No Debug Info. Base Address: $76F40000. Process Project13.exe (13088) Module Load: KERNEL32.dll. No Debug Info. Base Address: $74520000. Process Project13.exe (13088) Module Unload: KERNEL32.dll. Process Project13.exe (13088) Module Load: KERNEL32.dll. No Debug Info. Base Address: $74520000. Process Project13.exe (13088) Module Load: KERNELBASE.dll. No Debug Info. Base Address: $73B80000. Process Project13.exe (13088) Thread Start: Thread ID: 14596. Process Project13.exe (13088) Thread Start: Thread ID: 2688. Process Project13.exe (13088) Thread Start: Thread ID: 2076. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $50050000. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $00D10000. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $01740000. Process Project13.exe (13088) Module Load: rtl250.bpl. Has Debug Info. Base Address: $02170000.[...]



Speaking at the Italian Delphi Day 2017 Conference Next Week

2017-06-09T09:44:48.397Z

Next Wednesday I'll give a keynote (likely in Italian) at the XVI edition of the Delphi Day conference in Piacenza, Italy

Next Wednesday, June 14th, I'll give a keynote at the Delphi Day conference in Piacenza, Italy, which is also the city where I live (short trip, for sure). This is a conference I used to organize in the past and that Paolo Rossi and Wintech Italia are continuing to put together, with a fairly impressive group of speakers, Embarcadero MVPs, present and former members of Delphi R&D team.

I'll give a keynote, probably not too technical, and I'm likley going to give it in Italian. But I'll be around the entire day, and likley also stop by the day before (some of the pre-conference seminars are very interesting!). For all information and to sign up (the conference cost is nominal, just pays for the food) see:

http://www.delphiday.it/

I hope to see a lot of Italian Delphi developers there, as usual.

(image)



Webinar Tomorrow: Understanding Automatic Reference Counting

2017-05-31T12:51:06.375Z

Tomorrow I'll give a webinar on ARC memory management in Delphi

Tomorrow, June 1st, I'll give a webinar (at 3 different time slots) focused on automatic reference counting memory model in Delphi.. This is the summary:

Automatic Reference Counting is the memory management system used by Strings & Interfaces on all platforms, and all objects on Linux and Mobile. Unlike Garbage Collection, ARC is purely determisitic and keeps the developer in control. Join Delphi Product Manager Marco Cantu for this deep dive into Automatic Reference Counting.

Yuo can register for any of thr 3 times zones at https://register.gotowebinar.com/rt/65694002494075138

I'll do live Q&A at the end. See you onoline tomorrow.

(image)



Delphi Linux Blogs of the (Week) Month #52

2017-05-30T09:26:45.008Z

It has been almost two moth from my last collection of blog posts, so I'm doubling with a Delphi Linux version (today) and a regular one (coming).

Given I haven't made one of these monthly posts in some time, I have a rather large collection of relevant blogs psots and links, and so I decided to split the blog post in two. This is focused in full on Delphi Linux, a following one will be general in scope.

Blog Posts

Creating a Linux Daemon (service) in Delphi by Craig Chapman: http://chapmanworld.com/2017/04/05/creating-a-linux-daemon-service-in-delphi/

Daemonizing a WebBroker Application on Linux by Craig Chapman: https://community.embarcadero.com/blogs/entry/daemonizing-a-webbroker-application-on-linux

Calling Linux Commands from Delphi by Craig Chapman : https://community.embarcadero.com/blogs/entry/calling-linux-commands-from-delphi

Easy install SQL Server driver in Ubuntu by Luis Navarro: https://community.embarcadero.com/blogs/entry/easy-install-sql-server-driver-in-ubuntu

Importing third-party Linux libraries on Delphi 10.2 Tokyo by Allen Drennan: https://blog.grijjy.com/2017/04/06/importing-third-party-linux-libraries-on-delphi-10-2-tokyo/

Try Delphi on Amazon Linux by Haruyuki Mohri: https://community.embarcadero.com/blogs/entry/try-delphi-on-amazon-linux/

Running Delphi Applications on Linux with Docker by Juan Antonio Ruzafa: https://yeiei.net/en/running-delphi-applications-on-linux-with-docker/

How to make Linux platform available in existent console applications: https://blog.andreamagni.eu/2017/03/how-to-make-linux-platform-available-in-existent-console-applications/

Third Party Tools

Getting Started with FmxLinux: https://www.fmxlinux.com/guide.html

Few more features on FM for Linux: https://plus.google.com/u/0/118397897778295642304/posts/dDn1SREATEN?cfem=1

All for Now

This is all for now... hoping to get back to a more consistent schedule.

(image)



Centennial Bridge: BUILD, Creators Update, Windows 10 S and More

2017-05-29T14:28:05.976Z

Some considerations on recent Microsoft announcements related with the Windows Desktop Bridge (aka Centennial Bridge), from the BUILD conference to the Windows 10 S announcement. Spoiler: RAD Studio was mentioned at the BUILD conference! As you probably know, RAD Studio 10.1 Berlin Update 2 last fall was the first IDE to offer native and direct support for the Windows Desktop Bridge (also known as Centennial Bridge). In short, using the bridge you can create Universal Windows Platform (UWP) applications that can be distributed using Microsoft Windows 10 Store. RAD Studio let's you set a few parameters and generate an APPX file ready for the store. Given I already blogged multiple times on the topic, I won't re-iterate all of the details here. There are some interesting news from Microsoft. The summary is the Desktop Bridge is considered a successful project by the company and they plan to keep pushing it as the best approach to bring existing Windows applications to the Store. Windows 10 S The first interesting announcement was "Windows 10 S". See the FAQ at https://support.microsoft.com/en-us/help/4020089/windows-10-s-faq. This is a "safe" version of Windows 10 aimed to the consumer market and intended to allow running only applications downloaded from the Windows Store, excluding old traditional apps downloaded directly to the PC. This is potentially a huge change, although it has to be seen if Windows user will go for it. In any case, Desktop Bridge applications will be included in the support, so all of your VCL and FireMonkey applications could still be used after doing some fairly minimal migration (in most cases). Centennial at BUILD The second interesting announcement came at the BUILD conference, where Microsoft had many sessions covering the Desktop Bridge. The main one (https://developer.microsoft.com/en-us/windows/projects/events/build/2017/ bring-desktop-apps-to-uwp-and-the-windows-store) focused on new features in Creators Update and general status and plans for the Centennial bridge. For example, Microsoft ahs extended the support to shell extensions, but only for out-of-process scenarios. The (Microsoft) speaker listed RAD Studio as one of the tools supporting the bridge: Notice the in the session they did demonstrate deployment of a bridge application using Visual Studio, but apparently the steps are so complex they decided to skip the actual demo -- compared to a Delphi demo of APPX generation, that takes seconds! The other part of the session I'm still a bit unclear is why you'd really need to come up with the complex architecture below, when in most cases a native application (like one built in Delphi) can leverage most of the WinRT APIs like notifications in a much more simple way. While having two applications inter-operating makes sense in some cases, in most it seems fairly overkill. The Business Store The other relevant initiative related with the Desktop Bridge is the ability for larger companies to create their own "business store", again using APPX applications. In other words, the same binary you could upload to the public store you can also provide to a company for internal distribution. This makes sense for specific applications, includes license tracking, and because a simpler way to install and update an application on a large number of systems. The same applies to education institutions. More information at https://docs.microsoft.com/en-us/microsoft-store/windows-store-for-business-overview. Again, most Win32 and Win64 applications built with RAD Studio should be ready to be converted to the new format, and our IDE can help in the process. [...]