Marco Cantu

Syndicate content
Techie Italian Blogging on Delphi and More
Updated: 1 hour 27 min ago

The August 2016 Delphi (and RAD Studio) Roadmap

Thu, 08/04/2016 - 09:30

Embarcadero has published yesterday a new roadmap for Delphi, C++Builder, and RAD Studio, with the current plans for the next 18 months.

The document is available at:

http://community.embarcadero.com/article/news/16418-product-roadmap-august-2016

As you can see each of the PM (myself included) has added some detailed information. Over the next few weeks, I'll blog some more specific information about the features of the coming releases, and you'll start see some previews of future technologies as well.

PS. If I don't approve your comments here timely it is because I'm taking 10 days off, with limited connectivity. No bad intentions. ;-)

Categories: News, Blogs, and Tips

RAD Studio, Windows 10 Anniversary Update and Centennial

Wed, 08/03/2016 - 10:52

Windows 10 Anniversary Update shipped yesterday. This is the first mayor update to Windows 10, which shipped roughly one year ago. This new edition has many new features, mostly customer facing like the new support for Cortana. There is also, however, a new SDK that ships with it.

RAD Studio offers extensive support for Windows 10, offering new VCL controls that offer the Windows 10 UX, support for calling the new WinRT APIs, and integration of features based on those APIs into components (like the notification and the contracts components). The IDE also offers support for Windows 10 specific styles for both VCL and FireMonkey.

Among the many new features there is one of particular interest to Delphi and C++Builder developers: the Windows Desktop Bridge, also known as Project Centennial. This is a way to "convert" existing WinAPI applications into first-class UWP (Universal Windows Platform) applications, that can be executed "safely" on Windows 10 and distributed on the Windows 10 store (although this is still not enabled, as far as I can tell). These applications are natively compiled or .NET ones, and can still use older APIs and frameworks (WinAPI, MFC, VCL, WinForms, Silverlight, etc).

Creating a Centennial APPX

There are two ways to create the APPX files for the Centennial bridge. One is to use a converter from Microsoft, which will compare a vanilla image of the OS with that obtained after running the application installer, and capturing a differences among the two. This becomes the set of files to be packaged.

The second approach is to do the conversion process manually, as described on https://msdn.microsoft.com/windows/uwp/porting/desktop-to-uwp-manual-conversion. This is what I've done to convert a pretty simple Delphi applications into an APPX. First you need to call the makeappx utility, passing to a file with the list of files to embed (the executable, the graphical assets, and XML configuration file. and more) and as second parameter the output file:

makeappx.exe" pack /f mapfile /p myrssclient.appx

The other steps involve creating a certificate and using it to sign the APPX file with your credentials. So the real input to the process is the AppManifest.XML file and the list of files. The manifest has developer and application information, the logo, and a few more configuration settings. The list of files can be as simple as mine was:

[Files] "RssClient.exe" "RssClient.exe" "logo44x44.png" "logo44x44.png" "logo150x150.png" "logo150x150.png" "appxmanifest.xml" "AppxManifest.xml"

At this point I got my APPX file, I copied it into an Anniversary edition VM, and I was able to install it by opening the APPX as shown below:

If you follow the steps, the APPX get expanded into its own application folder and it is treated like a WinRT application, more than a traditional WinAPI ones. This is the installation folder structure (with the virtual file system under it):

The application is also added a a tile (with its logo) and can be started from there.

Next step is wait for Microsoft to enable distribution via the Windows 10 Store, that should allow most Delphi and C++Builder applications to be distributed and sold to large numbers of users, like it happens on the mobile platforms. Stay tuned.

PS. I'll cover more details in a coming "Windows 10 Anniversary Edition" Embarcadero webinar, later this month and we are planning to add specific support to simplify APPX deployment to the IDE in Berlin 10.1 Update 2, along with other new Windows 10 related features.

Categories: News, Blogs, and Tips

RAD Server Intro Video

Wed, 07/20/2016 - 07:36

Embarcadero has published on YouTube a nice video introducing RAD Server.

If the embedded version below doesn't work, go to:

https://youtu.be/HY0JRJPvjsU

Categories: News, Blogs, and Tips

Delphi Blogs of the Week/Month #45

Wed, 07/13/2016 - 07:12

It has been a couple of very busy weeks, so here is a general update, and more tech blogs to come.

Embarcadero News and Plans

In case you missed them, there have been a few updates with the company plans for RAD Studio going forward. In particular, I recommend reading:

I'll follow up ASAP with the status and plans for the Object Pascal language (or Delphi language, call it as you like) and some information about the VCL features and the new IDE designers under development mentioned by Brandon.

Technical Blog Posts Books
  • Daniele updated Delphi Cookbook is available. See http://www.danieleteti.it/delphi-cookbook-2nd-edition/
  • I've just finished updating my Object Pascal handbook for Delphi 10.1 Berlin. Not a large update, but there are a dozen new pages covering recent features and some updates and correction. I don't plan getting it in print -- not such a significant update. Will become available as an eBook only.

That's all for now. I really need to put more effort into blogging... stay tuned.

 

Categories: News, Blogs, and Tips

GetIt Packages Project Dependencies

Tue, 06/21/2016 - 01:50

A new feature of RAD Studio 10.1 Berlin that has gone mostly unnoticed is the ability to have project dependencies to GetIt packages. This makes is much easier to share projects that depend on third party libraries.

Since its introduction last year, the GetIt Package Manager has been continuously updated and extended with more capabilities. Since the beginning, the GetIt architecture allowed for dependencies: if library A depends on library B, when installing A you'll be prompted to install the dependent library B first. Now in Delphi and C++Builder 10.1 Berlin the mechanism has been extended so that a specific project can declare which libraries it depends on (this is not an automatic mechanism). Before looking to the solution, let me recap the issue at stake. Suppose that another developer send you a Delphi project, in my scenario one that uses the VirtualTreeView component. You open it, and if you don't have the package installed, you'll end up with an error like:

Now suppose that before sending me the project, the developer has opened the new GetIt Dependencies tab of the Project Options and set the proper dependencies, as below:

 

Now as I receive the project and open it, if I don't have the package installed, I'll be prompted to download it:

In theory, this will automatically trigger the download of the package. In practice, this triggers an error and and up making the dependencies unstable. So my recommendation is to select No, let the project open, eventually click Cancel if you receive an error that a component is not found, close all forms (but not the project), open the Project Options and install all missing packages, as below:

Now open your project forms, compile your projects and you should be up and running.

As you can see from reading above, there are still some hiccups in the process, but this is a very important new feature for the GetIt package manager, and I felt it was worth sharing despite the pending issues. If you go for a partially manual process, using the GetIt Dependencies page of the Project Options, everything should work fine.

Categories: News, Blogs, and Tips

Delphi Blogs of the Week/Month #44

Mon, 06/20/2016 - 08:04

Another round of blog posts covering news and blogs related with Delphi and RAD Studio.

Official Embarcadero News

A new PM has joined the RAD Studio PM team, with a specific focus on C++Builder. Great to have David Millington on board. You can read http://community.embarcadero.com/blogs/entry/hello-from-the-new-c-product-manager and https://parnassus.co/joining-embarcadero-c-product-manager/.

Speaking of another David, don't miss http://community.embarcadero.com/blogs/entry/calculating-how-i-am-and-how-many-years-i-have-been-married-using-delphi-and-c-builder

Finally, the GetIt Package Manager is going to have an increasingly important role, as you can read at http://community.embarcadero.com/blogs/entry/partner-collaboration-using-getit

​Technical Blog Posts

Variable Item Height with TListView in 10.1 Berlin by Sarina at http://community.embarcadero.com/blogs?view=entry&id=8574

The new "build with" and powered by" logos, at http://community.embarcadero.com/article/articles-support/171-rad-studio/16411-get-the-new-powered-by-built-with-and-built-for-logos

More from Uwe on his Package Magician at http://www.uweraabe.de/Blog/2016/06/19/package-magician-and-search-paths/

Jim is covering all of the cool apps submissions we received at http://community.embarcadero.com/blogs?view=blogger&layout=listings&id=390

Pawel on proximity apps at http://community.embarcadero.com/blogs?view=entry&id=8584

Projects and Libraries

FireBase is becoming critical for Android developers, great that Daniele Spinetti has a Delphi library to interface it at https://github.com/spinettaro/Firebase4Delphi

​Speaking of mobile, a FireMonkey sprite engine is available at https://github.com/dimsa/ShadowEngine

​And Events

In case you haven't seen it, Cary and Nick are teaming for Delphi Developer Days 2016: http://caryjensen.blogspot.it/2016/06/delphi-developer-days-2016-with-nick.html

That's all for this round...

Categories: News, Blogs, and Tips

Delphi Blogs of the Week/Month #44

Mon, 06/20/2016 - 07:53

Another round of blog posts covering news and blogs related with Delphi and RAD Studio.

Official Embarcadero News

A new PM has joined the RAD Studio PM team, with a specific focus on C++Builder. Great to have David Millington on board. You can read http://community.embarcadero.com/blogs/entry/hello-from-the-new-c-product-manager and https://parnassus.co/joining-embarcadero-c-product-manager/.

Speaking of another David, don't miss http://community.embarcadero.com/blogs/entry/calculating-how-i-am-and-how-many-years-i-have-been-married-using-delphi-and-c-builder

Finally, the GetIt Package Manager is going to have an increasingly important role, as you can read at http://community.embarcadero.com/blogs/entry/partner-collaboration-using-getit

​Technical Blog Posts

Variable Item Height with TListView in 10.1 Berlin by Sarina at http://community.embarcadero.com/blogs?view=entry&id=8574

The new "build with" and powered by" logos, at http://community.embarcadero.com/article/articles-support/171-rad-studio/16411-get-the-new-powered-by-built-with-and-built-for-logos

More from Uwe on his Package Magician at http://www.uweraabe.de/Blog/2016/06/19/package-magician-and-search-paths/

Jim is covering all of the cool apps submissions we received at http://community.embarcadero.com/blogs?view=blogger&layout=listings&id=390

Pawel on proximity apps at http://community.embarcadero.com/blogs?view=entry&id=8584

Projects and Libraries

FireBase is becoming critical for Android developers, great that Daniele Spinetti has a Delphi library to interface it at https://github.com/spinettaro/Firebase4Delphi

​Speaking of mobile, a FireMonkey sprite engine is available at https://github.com/dimsa/ShadowEngine

​And Events

In case you haven't seen it, Cary and Nick are teaming for Delphi Developer Days 2016: http://caryjensen.blogspot.it/2016/06/delphi-developer-days-2016-with-nick.html

That's all for this round...

Categories: News, Blogs, and Tips

Weak and Unsafe Interface References in Delphi 10.1 Berlin

Thu, 06/16/2016 - 07:32

Delphi 10.1 Berlin adds a couple of features to the Delphi language, bridging gaps between platforms and extending the Win32/Win64 interface reference model. This is not the only change to the language, but clearly the most relevant one. Another, focused on mobile, is the introduction of the native UTF8String type on all platforms, mobile compilers included.

But let me get back to the way references to interfaces work on the desktop compilers. By default, all references to interfaces use reference counting. As you assign a variable to the interface the reference count is increased, as the variable is set to nil or goes out of scope, the reference count is decreased. When the reference count gets to zero the object is deleted from memory. That is not actually always true, as the actual behavior is implemented by each class, so you can write a class that implements an interface and ignores the reference counting mechanism.

Anyway, getting back to the common scenarios in which reference count is active, you can have code like the following, which relies on reference counting to dispose the temporary object:

procedure TForm3.Button2Click(Sender: TObject); var one: ISimpleInterface; begin one := TObjectOne.Create; one.DoSomething; end;

What if the object has a standard reference count implementation and you want to create an interface reference that is kept out of the total count of references? You can now achieve this by adding the [unsafe] attribute to the interface variable declaration, changing the code above to:

procedure TForm3.Button2Click(Sender: TObject); var [unsafe] one: ISimpleInterface; begin one := TObjectOne.Create; one.DoSomething; end;

Not that this is a good idea, as the code above would cause a memory leak. By disabling the reference counting, when the variable goes out of scope nothing happens. There are some scenarios in which this is beneficial, as you can still use interfaces and not trigger the extra reference. In other words, an unsafe reference is treated just like... a pointer, with no extra compiler support.

Now before you consider using the unsafe attribute for having a reference without increasing the count, consider that in most cases there is another better option, that is the use of weak references. Weak references also avoid increasing the reference count, but they are managed. This means that the system keeps track of weak references, and in case the actual object gets deleted, it will set the weak reference to nil. With an unsafe reference, instead, you have no way to know the status of the target object (a scenario called dangling reference).

In which scenarios are weak reference useful? A classic case is that of two object with cross-references. In such a case, in fact, the object would artificially inflate the reference count of the other objects, and they'll basically remain in memory forever (with reference count set to 1), even when they become unreachable.

As an example consider the following interface, accepting a reference to another interface of the same type, and a class implementing it with an internal reference:

type ISimpleInterface = interface procedure DoSomething; procedure AddObjectRef (simple: ISimpleInterface); end; TObjectOne = class (TInterfacedObject, ISimpleInterface) private anotherObj: ISimpleInterface; public procedure DoSomething; procedure AddObjectRef (simple: ISimpleInterface); end;

If you create two objects and cross-reference them, you end up with a memory leak:

var one, two: ISimpleInterface; begin one := TObjectOne.Create; two := TObjectOne.Create; one.AddObjectRef (two); two.AddObjectRef (one);

Now the solution available in Delphi 10.1 Berlin is to mark the private field anotherObj as weak:

private [weak] anotherObj: ISimpleInterface;

Now the reference count is not modified when you pass the object as parameter to the AddObjectRef call, it stays at 1, and it goes back to zero when the variables go out of scope, freeing the objects from memory.

Now there are many other cases in which this feature becomes handy, and there is some real complexity in the underlying implementation. It is great feature, but one that takes some effort to fully master. Also, it does have some runtime cost, as weak references are managed (while unsafe ones are not).

Categories: News, Blogs, and Tips

Closing the Class Helpers Private Access Loophole

Wed, 06/08/2016 - 07:16

As many of you know, Embarcadero made a change to the Delphi compiler in 10.1 Berlin to close an existing bug that allowed access to private data of any class via a class helper. Developers who were leveraging this hack would need a migration strategy.

Private is... Private

For quite some time, there was a bug in the Delphi compiler that ended up allowing class helper methods to access private fields of the class they helped, regardless of the unit in which the class was declared. This “hack” basically broke OOP encapsulation rules. To enforce visibility semantics, class and record helpers in most recent versions of Object Pascal compilers (starting with 10.1 Berlin) cannot access private members of the classes or records that they extend. Notice that protected members, on the other hand, are accessible to class helpers, exactly like they are to derived classes.

(By the way, this issue was covered last month also by Craig at http://chapmanworld.com/2016/05/03/the-encapsulation-bug-that-was-a-feature/)

A number of developers found this hack quite handy for accessing private fields and methods of the class library or component they use and we got complaints during the beta and after the product release about this change. We spent a lot of time evaluating different options and solutions... but could not find any better option. The request of "leave this bug open, it is a feature we rely upon" does make sense, but ultimately allowing access to private fields in libraries implies going against the main pillar of object-oriented programming and the last 20 years of computer languages. Not only that, in practical terms it means having to maintain some sort of compatibility of the private portion of core library classes in the future, avoid changing any behavior. The reason these private features are private is exactly to allow developer freedom to change them in the future!

We also got requests to leave this as a temporarily switch, but that would have only delayed the decision (and the code update) to the next release, while leaving the bug open.  Another point I heard a lot was about other programming languages allowing the same type of private access. C++ has a "friend class" construct, but the difference there is you grant friendship to another class, while that other class cannot just claim friendship and access private data. Imagine Facebook would allow any person to claim friendship (not be granted friendship) and access your information at will.

Other languages like Java and C# allow access to private fields via reflection... which is exactly what Delphi also allows, and has allowed for many years now since extended RTTI was introduced. Now the question becomes: if this is possible anyway, why don't let developers do it the easy way? The issue is developers should not be encouraged to access private data and they should clearly express their intention in code, clearly indicating what they are doing. To me, using RTTI satisfies these requirements better.

Again, this is not a decision that was taken lightly. We even invited a former R&D engineer, who originally added class helpers to the language, to share his opinion with us and in the beta forums. That resulted in some very interesting conversations. 

But is Private Always Needed?

An important point that was highlighted by this change in the compiler, is that in some cases libraries keep access to some information private without a full evaluation of the scenarios in which developers might need access to those fields or methods. During the beta, developers pointed out fields or methods they really needed to access to, and the team either moved some fields to protected, added additional access properties (still keeping the data private), or introduced more flexibility in other ways. These are specific titles of QP issues that have been addressed during the beta (but there have been many more in this and the previous releases):

Private access issue: TCustomForm.FTextHeight

Private access issue: TBitmap.FAlphaFormat

Private access issue: VCL TBitmap.FImage / TBitmapImage.FDib

TListView: It should be possible to define own calls for TListColumn

Mark CreateRoot method in ShellCtrls virtual and elevate visibility Root fields

FMX TTreeViewItem needs protected ChildrenOffset

TRTTIParameter.Parent not pointing to correct TRttiMethod instance (affects Spring4D)

Change visibility specifiers in all style hook classes

Private access issue: TStyleManager.FSystemStyle

​We are more than willing to keep evaluating more cases in which exposing a private member makes sense, and the same you should probably ask to other library vendors.

But What About my Code?

Most of Delphi developers have been able to move their code to 10.1 Berlin easily, as they were not leveraging this hack or did it only occasionally and were able to bypass the problem. There are others who are experiencing bigger problems. What are the options?

One option is to consider if changes already done to the RTL or VCL libraries have already made the private access redundant. At times this is the case (and more often that some people think). If this is not the case, you might also want to consider if that is really needed. If it does, apply one of the workarounds below and file a quality portal report asking Embarcadero to open access that specific information.

The cleaner solution for private access is generally the use of RTTI. Something like

RTTIContext.GetType('classname').GetField('fieldname').GetValue(anObject)

might do the trick. Beside the extra code (which can be simplified and embedded in a class helper!) the drawback is the significantly slower performance. However, you can also keep the RTTI context and the TRttiField object around for optimization. This is a small working VCL-based code snippet (even if not a terribly useful one):

var rttiCtx: TRTTIContext; begin ShowMessage (rttiCtx.GetType(TForm).GetField('FClientWidth').GetValue (self).ToString);

If you need a fast, direct solution a real hack is to declare a data structure matching the class and doing a hard type cast among the two classes. Or just get the field position in the class structure and do a pointer-based access. These approaches are clearly not recommended, but (in corner cases) they offer top performance.

For some alternative coding styles and some discussions, you can see among other sources:

http://stackoverflow.com/questions/37351215/how-to-access-a-private-field-from-a-class-helper-in-delphi-10-1-berlin

http://stackoverflow.com/questions/36716363/how-to-access-private-methods-without-helpers

http://stackoverflow.com/questions/31972202/accessing-private-fields-from-a-class-helper

Compatibility versus Evolution

Even if this is a very specific scenario, having to do more with a bug than with a feature, the issue we faced while deciding for a direction to take in this case is one between maintaining perfect compatibility with all existing code and evolving the tool. In many cases the two can coexist (and Delphi has one of the best track records with 20 years of backwards compatibility), but in same scenarios you have to privilege one over the other. In this case the call was to fix a really critical bug. I know some of you would disagree...

Categories: News, Blogs, and Tips

Webinar Video about Submitting Apps to Mobile Stores

Mon, 06/06/2016 - 03:59

A video fragment of last week Mobile Development webinar with my portion of the recording, covering submitting apps to the Apple App Store and the Google Play Store, is available on YouTube, at https://youtu.be/-JNGEvKbfeU. While it is not a detailed step by step tutorial -- that could take hours -- it highlights the main steps and issues when submitting mobile apps built with RAD Studio to the two most popular app stores.

All other sections of the same webinar are in the EmbarcaderoTech YouTube channel (https://www.youtube.com/user/EmbarcaderoTechNet) and include the complete webinar video (https://www.youtube.com/watch?v=sukeR4IZi1Q) or the various fragments.

 

Categories: News, Blogs, and Tips

Delphi Blogs of the Week/Month #43

Fri, 06/03/2016 - 05:51

Another round of news and links related with Delphi, including some old one I had to research for my part of the mobile webinar this week.

Blog Post of the Week

Not sure if I want to start a regular "blog post of the week" contest, but if I were this week winner would definitely be Jim's "Delphi DNA" blog post, that you can read at http://delphi.org/2016/06/what-is-delphis-dna/. It is honestly a great, terse, summary of why Delphi is a great tool and deserves to be considered even in today's development tools landscape (clearly much different from 20 years ago). It is the unique combination of components, compilers, APIs, database access glued together by productivity and programming power that makes Delphi (and C++Builder) what it is.

Runner up blog post (as I noticed only a few) is Uwe's latest on package management, at http://www.uweraabe.de/Blog/2016/06/01/there-can-only-be-one-at-a-time/.

MVP and Cool App Contest

Quite a few things happening around the MVP program and other Developer Relations initiatives. We have new MVPs listed at http://delphi.org/2016/05/more-new-mvps/. Great news the team in growing with several new well known Delphi experts from all over the world.

The fist winner of the cool app content is... http://community.embarcadero.com/article/news/16234-1password-for-windows-is-the-1st-winner-of-the-cool-app-contest-2, and that is possible because http://community.embarcadero.com/blogs?view=entry&id=8513 -- there is also a video at https://www.youtube.com/watch?v=CkUF42OPKvE

​From Webinars

Myself and the rest of the team is spending some time on webinars these days. After the RAD Server real case scenario and overview, we did a mobile webinar yesterday, and now there is a coming in depth view of the RAD Server retails app coming.

From that work, Sarina blogged about the UI of the retail app at http://community.embarcadero.com/blogs/entry/iot-retail-application-example-home-screen-design

​I haven't blogged (but might do), but had to find back this link for an assets generator for Delphi mobile apps, at http://riversoftavg.com/blogs/index.php/2014/02/03/creating-icons-and-launchers-for-delphi-mobile-applications/ (would be nice to have an update with all the newest icons resolutions, but it does save a lot of time).

Yesterday webinar notes are at  http://community.embarcadero.com/blogs/entry/june-2-webinar-getting-started-building-mobile-applications-for-ios-and-android including a large number of links David I has collected. I covered (in 10 minutes) submitting apps to mobile stores (Play Store and App Store).

Coming

That's all for now. I do have several blog posts in the pipeline, and always too little time. Let's see what I can cover. Next week, I'll also stop by at the Delphi event in Piacenza, see http://community.embarcadero.com/all-events/viewevent/679-italian-delphi-day-2016.

Categories: News, Blogs, and Tips

Faster Compilation for Delphi Win32 Generics in 10.1 Berlin

Wed, 05/25/2016 - 02:57

While the Delphi compiler is recognized as an extremely fast compiler, when it comes to generics it can significantly slow down, along with the linker. The latest version of Delphi offers a significant improvement.

During the development of 10.1 Berlin Delphi’s R&D team, and in particular the compiler team, looked into areas in which we could improve the compiler quality, both in terms of code generation and in terms of compiler speed. Out of many improvements, one worth calling out it the significantly faster compilation for code involving a large number of generic data types.

This wasn’t actually a single fix, but a collection of 6 different compiler optimizations, each of which contributes to the overall improvement. Ranging from small to very large projects, we have internal test cases that show different gains for each of these individual optimizations – well, in general, as there are individual optimizations that make compilation slower in given scenarios.

As an example, one of our customers (thanks, Guenther) had submitted a demo (and actually even a demo generator) as part of https://quality.embarcadero.com/browse/RSP-11865. That demo code on Win32 in 10 Seattle takes on average 25 seconds for a full build. The same exact code compiles in 10.1 Berlin in less than 10 seconds. That is, it is taking only 40% of the original time – a 150% improvement.

Other code scenarios, specifically those not so extreme, will see a more moderate advantage, but the changes are applicable to almost all code and both the compiler and the linker. As a more real-world scenario, I downloaded the latest Spring4D library, and compiled the Win32 version of the Spring.Tests projects of 10 Seattle and 10.1 Berlin, and got the following numbers:

  • 10 Seattle: 6.01 seconds
  • 10.1 Berlin: 4.50 seconds

As a further test (although less significant because it is very fast) I also compiled the Demo.Spring.Collections.Stack demo and saw the following timing:

  • 10 Seattle: 1.02 seconds
  • 10.1 Berlin: 0.70 seconds

The summary is there is a consistent improvement in compiling code with generics, in this real-world cases the compilation is about 30% faster. I had a chat with Stefan Glienke, and he confirmed seeing similar numbers. 

There is a caveat, though. The original request was to speed up the Win64 compiler, and that hasn’t actually seen a significant gain in this cycle, I only see a 10% improvement in that case. That clearly means we still have a lot of room for improvement, and need to keep focusing on the compiler performance (but without forgetting code generation quality and performance of the compiled code, of course).

In any case, 10.1 Berlin represents a good step in the right direction in terms of compilation of Delphi code with generics and I hope this is appreciated.

Categories: News, Blogs, and Tips

Delphi Blogs of the Week/Month #42

Mon, 05/23/2016 - 03:29

This is a new installment of my occasional (mostly monthly) collection of relevant Delphi links.

Embarcadero News

Company focus is summarized in this video, "Inspire. Develop. Excel.": http://community.embarcadero.com/article/news/16231-inspire-develop-excel

As you have seen also in this blog, we have officially lunched a new product, RAD Server, a new offer of existing enterprise level technologies (EMS, BeadonFencing, IotT remoting, etc). Read more at https://www.embarcadero.com/products/rad-server. Notice that the complete evaluation software is already included in RAD Studio 10.1 Berlin at the Enterprise level, along with the all of the specific development tools. You can also read http://community.embarcadero.com/article/news/16233-embarcadero-unveils-rad-server-for-c-builder-and-delphi-service-based-application-back-ends

If you missed RAD Studio 10.1 Berlin launch webinar, the replay in on YouTube at https://www.youtube.com/watch?v=1CHPXbUeSJ8

​Technical Blog Posts

A summary of RAD Studio 10.1 Berlin FireUI Live Preview articles, videos, apps and docs by David I at http://community.embarcadero.com/blogs?view=entry&id=8495

InterBase Array Fields and FireDAC, by Stephen at https://delphiaball.co.uk/2016/04/29/interbase-array-fields-firedac/

Comparison of Database access frameworks in Delphi (in which FireDAC has a big role) at https://ultimatedelphi.wordpress.com/2016/04/14/database-connectivity-frameworks-in-delphi/

A Delphi Guy Walks Into Google, by Allen Bauer at http://blog.therealoracleatdelphi.com/2016/05/random-stuff-about-working-at-google-or.html

A Delphi mobile app used to track Bolzano city elections, at http://www.andreamagni.eu/wp/2016/05/viktor-a-delphi-mobile-app-used-in-bolzano-during-elections-of-mayor-and-city-council/

The new TBufferedFileStream class: https://delphiaball.co.uk/2016/04/29/faster-filestream-tbufferedfilestream/

Third-Party Related News

Using Advantage Database Server with 10.1 Berlin by Joachim at https://www.jd-engineering.de/using-ads-with-delphi-10-1-berlin/

Interesting project by Daniele to support Google's FireBase in Delphi at https://github.com/spinettaro/Firebase4Delphi 

And Finally...

Verity Stob has a new column about the Sons of Kahn, covering last 6 months of news around RAD Studio. And punctuation. And misspelled Wookeys. See http://www.theregister.co.uk/2016/05/20/verity_sons_of_khan_witch_of_wookey/

And, finally, don't miss this months offers: Upgrade from very old versions of RAD Studio and free mobile pack if you buy Delphi or C++Builder Professional! See https://www.embarcadero.com/radoffer

Categories: News, Blogs, and Tips

RAD Server Launched, Webinar on Thursday

Wed, 05/18/2016 - 00:52

Last week my team at Embarcadero has launched a new product, RAD Server, which combines several Enterprise-grade technologies in a single, much cheaper offering. RAD Server, in fact, combines the REST API hosting offered by EMS, with IoT integration (ThingPoint) and the proximity awareness offered by BeaconFence.

The idea behind RAD Server is to make the development of REST APIs and other related services extremely simple, much like Delphi and RAD Studio do for the client side. Having a ready-to-use, turn-key solution which can scale at a very low price, can be a nice and effective way for developers to implement a modern, REST-based, multi-tier solution for both mobile and desktop applications.

Here are some relevant links about the launch and some further reading about the technologies included in RAD Server:

- The official press release can be found on the community site: http://community.embarcadero.com/article/news/16233-embarcadero-unveils-rad-server-for-c-builder-and-delphi-service-based-application-back-ends

- The new product page is at https://www.embarcadero.com/products/rad-server

- The launch webinar, next Thursday (May 19th), "Introducing RAD Server - Walk Through an example Real World Scenario in Creating a Modern Retail Customer Experience Solution" (where I'll have a small part) -- register at https://attendee.gotowebinar.com/rt/8032550740830239489 

The technology behind RAD Server is very powerful, and we'll have more information about it soon, in terms of blog posts and webinars, but you can already read the core features of the REST API hosting solution in this EMS white paper by Cary Jensen: http://forms.embarcadero.com/EMSMiddlewareWP. While the current version has several extensions, the core concepts apply.

 

 

 

Categories: News, Blogs, and Tips

Ribbon Controls in RAD Studio 10.1 Berlin

Mon, 05/09/2016 - 04:28

A few Delphi and C++Builder developers who moved to 10.1 Berlin are wondering what happened to the VCL Ribbon controls and how to get them. Here is the full story.

A Tale of the Fluent UI (or Office UI)

Let me start from the beginning, while trying to keep the story short. The Ribbon VCL controls offer an implementation, natively done in the VCL with no external dependencies, of Microsoft Fluent UI (also know as Office UI). Given Microsoft has a patent on this UI (debatable, I know) using the controls required to accept a license from Microsoft, originally available at https://msdn.microsoft.com/en-us/office/aa973809.aspx. In the past RAD Studio installation alerted that accepting that license was required for legally using the controls.

Later on, Microsoft built an actual SDK (in Windows 7 and above, also back ported to Vista) to support building applications with the Fluent UI. So far so good. Afterwards, they retired the original license. Any developer who had already accepted Microsoft Fluent UI license can still build a clone UI, but developers cannot obtain that license any more. You can see this reported, among others, in Wikipedia at https://en.wikipedia.org/wiki/Ribbon_(computing):

The Microsoft Ribbon Licensing Page has been retired, therefore it is no longer possible to license the ribbon control from Microsoft.

This is why we had to pull the Ribbon VCL controls from the core RAD Studio product, as we have no way to grant all customers a license or indicate how to obtain one. This doesn't mean we are removing the controls completely. While we don't expect to have the Ribbon VCL controls as part of the product and covered by support, we are in the process of making the Ribbon controls available in the GetIt Package Manager, for any developer who has a valid license with Microsoft (something you have to determine yourself, of course). This was supposed soon after the 10.1 Berlin release, should be coming shortly.

Ribbon Future Options for RAD Studio Developers

Overall, though, this change of direction from Microsoft (which actually happens a few years back), requires rethinking the use of these controls. I'd offer 3 alternatives:

  • If you have a license and want maximum compatibility with existing code, you can keep using the existing Ribbon controls. Shortly we'll make the official package available on GetIt. We are also assessing how to keep fixing bugs and updating this library over time. This might involve the community.
  • You can switch to using an implementation of the Ribbon SDK from Microsoft. One set of VCL controls wrapping that implementation and called Ribbon Framework is available in the https://github.com/TurboPack/RibbonFramework library and it is already hosted in GetIt (and was hosted also for 10 Seattle). This has no legal limitations, and the team might also need help to keep this project moving. And thanks to Joachim Marder and the team behind these controls
  • You can consider moving away from the Ribbon UI. But this is more of a UI discussion I don't really want to focus on in this blog post.

As it should be clear from reading this blog post, it was never our intention to stop supporting the VCL Ribbon controls, but we don't have a way to do this legally for all of our customers. I know other component vendors have different interpretations of the legal status, but we did check with several sources (including directly with Microsoft) and we are convinced that there isn't another option. Once the VCL Ribbon controls will be made available in GetIt, consult with your legal counsel about using them.

Categories: News, Blogs, and Tips