Easily move your Windows/VCL apps to Delphi XE5 and gain tons of benefits

Posted by on in Blogs
Regardless of the previous version of Delphi you are using, there are a large number of benefits you will gain by moving your projects forward.  There is also a special offer for all Delphi customers (regardless of the version you are using) to move up to our latest XE5 release. I am sure that you see that there a lot of great new technology available to you as a Windows VCL developer.

Delphi XE5 Technologies you can use today in your Windows/VCL apps

  • Sensors - You can use the System.Sensors unit and classes in your Windows/VCL applications. The TSensorManager class can be used to identify the sensors connected to the computer and make them available for use within Delphi applications.

  • FireDAC - The fastest and most powerful Universal Data Access library ever! FireDAC enables native high-speed direct access from Delphi and C++Builder to InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, DB2, SQL Anywhere, Advantage DB, Firebird, Access, Informix, DataSnap and more.

  • New REST Client Support - Simple invocation of REST web services from any third party provider and includes authentication support and JSON response manipulation, with dataset and LiveBindings mappings.

  • LiveBindings - LiveBindings is an expression-based framework that provides fast, easy and no-code data-binding to bind objects to other objects or to dataset fields. While you can continue to use your VCL data bound components, in XE5 all VCL visual controols contain a LiveBindings property.  You get the benefit of the LiveBindings Wizard, LiveBindings Designer and rapid application prototyping using the TPrototypeBindSource.

  • VCL Styles - Control and change the appearance of a complete VCL application with VCL Styles, including the appearance of every part and state of a control. You can also create your own custom styles using the Bitmap Style Designer.

  • 64-bit Windows - Push the envelope of performance by creating 64-bit Windows applications that take advantage of the latest hardware and access more memory.  In your the IDE project manager window, right mouse click on the Target Platforms node and choose "Add Platform" and select "6t4-bit Windows".  Rebuild your project and you now have a 64-bit executable.

  • Unicode - XE5 ensures that your apps are available to a global workforce of users and marketplace of customers. Delphi is fully Unicode-compliant. While new data types have been introduced, existing data types remain and function as they always have. Based on more than five years of in house and customer experience with Unicode, your applications should migrate smoothly to the Unicode world.

  • Surface Pro Tablets - With the Metropolis UI in Delphi, you can take your VCL applications and create applications that incorporate the latest Windows 8 styling and functionality in an easy and accessible way.

  • VCL Performance and Quality Improvements - XE5 both fixes and contains the culmination of thousands of performance and quality improvements reported against every version of Delphi from Delphi 7 to XE4.


What Delphi XE5 can give you compared to your current version

Getting the Ambient Light Lux Value on my Samsung Slate Series 7


Here is a Windows/VCL example that gets the Ambient Light value on my Samsung Slate Series 7 tablet. Create a new VCL Delphi application. Put a button and three labels on the form. Set the form caption to "Get Ambient Light VCL Demo". Set the button caption to "Get Ambient Light". Set the first label to hold the caption for the Lux (light value) label. Set the second label's name to "AmbientLightSensorLabel" (this is used to display a message for whether an Ambient Light Sensor is found or now). The third label is going to contain the ambient light value, name this label "LuxLabel". For the Button's onClick event handler use the following code (remember to include the uses statement in the implementation section for the System.Sensors unit):
implementation
{$R *.dfm}
uses System.Sensors;

procedure TForm1.Button1Click(Sender: TObject);
var
MySensorArray : TSensorArray;
MyAmbientLightSensor : TCustomLightSensor;
begin
try
TSensorManager.Current.Activate; // activate sensor manager
// use GetSensorsByCategory to see if a Light sensor is found
MySensorArray := TSensorManager.Current.GetSensorsByCategory(TSensorCategory.Light);
if MySensorArray <> nil then begin // check if Ambient Light Sensor is found
AmbientLightSensorLabel.Caption := 'Ambient Light Sensor Found';
MyAmbientLightSensor := MySensorArray[0] as TCustomLightSensor;
LuxLabel.Caption := FloatToStr(MyAmbientLightSensor.Lux); // display the Light sensor value
end
else begin
AmbientLightSensorLabel.Caption := 'Ambient Light Sensor Not Found!'
end;
finally
TSensorManager.Current.DeActivate // deactivate sensor manager
end;
end;

Here is the app running on my Samsung Slate Series 7 with the afternoon light here in Scotts Valley at around 3pm today:



Using Sensors with Delphi VCL

Here is a blog post showing how you can integrate Windows based sensors in your DelphI VCL applications. The blog post references Delphi XE3.  You can use the same code with Delphi XE5. See the source code and output at http://blogs.embarcadero.com/davidi/2012/10/03/41699. The following screen shots were grabbed from my Windows 7 VM (hosted on MacBookPro using VMWare Fusion for the Mac) and my Samsung Slate Series 7 running Windows 8.

Special Offer - Upgrade to Delphi XE5 from any previous version (expires Dec 31, 2013)

The offer is "Buy RAD Studio, Delphi or C++Builder version XE5 at the low upgrade price if you have any earlier version of Delphi, C++Builder, RAD Studio or Borland Developer Studio." How to get it? Purchase a RAD Studio, Delphi or C++Builder XE5 upgrade. Available only between October 22, 2013 and December 31, 2013.


About
Gold User, Rank: 1, Points: 2466
David Intersimone (known to many as David I.) is a passionate and innovative software industry veteran-often referred to as a developer icon-who extols and educates the world on Embarcadero developer tools. He shares his visions as an active member of the industry speaking circuit and is tapped as an expert source by the media. He is a long-standing champion of architects, developers and database professionals and works to ensure that their needs are folded into Embarcadero's strategic product plans. David holds a bachelor's degree in computer science from California Polytechnic State University at San Luis Obispo, California.

Comments

  • Guest
    David Intersimone Monday, 2 December 2013

    Kent: Thanks for your comment. Not sure what you mean by "older version" since you were not specific in your comment.

    "New, Slow, Badly Written RTL" and "highly optimized RTL for each supported platform" - would also be great to get specific suggestions from you so that I can pass them along to the R&D team.

    Thanks in advance and thanks for commenting.
    David I.

  • Guest
    Dalija Prasnikar Monday, 2 December 2013

    @Kent Morwath I fully agree with you.

  • Guest
    Daniel San Monday, 2 December 2013

    @Kent Morwath I fully agree with you too!

  • Guest
    Markus Ja Monday, 2 December 2013

    @Kent Morwath: Well sayed.
    I also don't see any reason to upgrade to XE5 when only targeting Windows.

  • Guest
    Bunny Monday, 2 December 2013

    Thank you. The area of VCL is ok ...

    Don't worry.

  • Guest
    jake Tuesday, 3 December 2013

    "Surface Pro Tablets" do you mean it could run in win RT ?

  • Guest
    davidi Tuesday, 3 December 2013

    Jake - Surface Pro has an Intel processor and can run all windows apps. Thisis the tablet we are talking about. We don't support Windows/RT/ARM yet - which is what is needed to have apps run in the Surface.

    Windows/RT/ARM is listed on our RAD Studio public roadmap as work being investigated by R&D as we continue to deliver products for Windows, OSX, iOS and Android. Also listed on the roadmap is Linux Server targeting which will help developers create Linux based web services, soap servers, DataSnap servers and other Linux server apps.

    Wondering aloud about Windows/RT's future - recently, the head of Windows at Microsoft, Julie Larson Green, was quoted ion an article on The Guardian web site saying ""We have the Windows Phone OS. We have Windows RT and we have full Windows. We're not going to have three."

    http://www.theguardian.com/technology/2013/nov/26/microsoft-kill-windows-rt-larson-green

  • Guest
    Bruce McGee Tuesday, 3 December 2013

    With the notable exception of the terrible streaming regression (fixed in XE5/XE5), I have yet to see a concrete example of Delphi getting slower. In fact, the two concrete examples that I know of comparing identical code in XE2 and XE5 both perform better in XE5.

    If there are clear, repeatable examples of regressions, please speak up.

    That said, I agree that the QC backlog needs some serious attention.

  • Guest
    Unspoken Tuesday, 3 December 2013

    @Kent Morwath I fully agree with you too! Absolutely no reason for me for upgrade from XE 2 to XE 5

  • Guest
    Brian Andersen Tuesday, 3 December 2013

    David, why didn't you comment on the QC statements?

    Ohhh, wait... It's fixed in the next release. You have to buy an update!

  • Guest
    Donovan Tuesday, 3 December 2013

    when they start actually doing what their customers ask for, maybe then it will be worth updating, till then, we will explore other avenues

  • Guest
    David Intersimone Tuesday, 3 December 2013

    Thanks everyone for the feedback. If you have specific QC #'s, I will be very happy to walk them over to R&D and push to get resolutions. I do know that thousands of QC reports have been fixed in the versions between Delphi 7 and XE5. That said, there will always be some bugs in software and the team holds bug meetings to review each and every problem report and assigns them to engineers via our Jira tracking system (QC is the web front end for you).

    All software has issues, and we are dedicated to not only working on new capabilities for you but also continually working to improve the quality of our products.

    Send along your QC #'s - even if you are not the one who reported them.

    Thanks again for all of the feedback and comments.

  • Guest
    David Intersimone Tuesday, 3 December 2013

    Donovan - what specifically do you mean "when they start actually doing what their customers ask for" - what are you asking for in features for our products?

    What more do we need to do to make it "worth updating"?

  • Guest
    David Intersimone Tuesday, 3 December 2013

    unspoken - You have XE2 - cool!. Did you like the Win64 support? is there some other features of XE2 that you are using that you like?

    If you want/need mobile support - then we have spent a lot of R&D time building mobile support for Delphi for iOS and Android in XE4 and XE5.

    Why multiple releases? The R&D team continues to invest in a wide range of new features and platforms as well as adding to our existing support for Windows. When the technologies are ready to move from the lab to you we release products.

    If all you need is more Windows support - let me know what you want for Windows and I will bring it directly to Product Management - or you can contact John Thomas and Marco Cantu directly if you want.

  • Guest
    David Intersimone Tuesday, 3 December 2013

    Brian - what QC #'s do you want me to escalate for you?

  • Guest
    Dalija Prasnikar Wednesday, 4 December 2013

    As far as mobile platforms are concerned 119501 - lack of 8-bit COW strings is absolute showstopper in my case, others are 118796 application started on incompatible device shows black screen, and 118203 - lack of support for non NEON devices (as well as Intel based Android devices, but I am not aware if there is QC for that). Also, FireMonkey is still too buggy to be used out of the box without needing to do a lot of fixes and workarounds.
    And good example of performance issues mostly introduced from XE3 up, besides streaming regression is 119459.

  • Guest
    David Intersimone Wednesday, 4 December 2013

    Kent - I am very sorry, but I accidentally deleted your latest comment when I was trying to clean up my Wordpress spam. Thankfully, I get emails for every comment that is posted on my blog. Here is the latest comment you posted - and again, I am very sorry for clicking on the wrong button.

    Author : Kent Morwath
    Comment:
    I see there is still a lot of confusion with Windows 8. First of all, WinRT is not ARM only. It's a "new" API to deliver applications running in the WinRT subsystem, aka "Modern UI" (aka "Metro"). WinRT is the only API available in the ARM version of Windows (but for special applications like Office, but AFAIK only MS can code this ones), but it is also available in Windows 8 Intel and it is the API used to write the "tiled" applications, those who don't need the "desktop" to run.

    AFAIK XE5 can write Windows 8 "desktop" applications (because they are plain old Windows app) but can't target "Modern UI" applications at all - even on Intel (Surface Pro & C.).

    A skin and some controls that mimic the "Modern UI" is not writing this kind of applications. This ones run outside the desktop, integrate with "charms", etc, etc.

    Thereby, please, sell what you really have, don't act like a weasel and use some obscure wording to sell what you don't have. We know the reason, you can't access some APIs you need to target RT, and you were so busy with the Android stuff you forget to force MS to open its APIs allying with those in your same situation.

    But those who need to target the latest releases of Windows don't care about UI imitations - which looks the actual trend at Embarcadero (FM and Metropolis) - we need a tool which is able to deliver native apps on that platforms. And that's not Delphi, any longer. Delphi is becoming a Frankenstein built with pieces get here and there that tries to resemble a human being, but which is not.

    Sorry, if people don't upgrade often they have very good reasons. Don't ask your customers what they can do for you... ask yourself what you can do for your customers...

  • Guest
    David Intersimone Wednesday, 4 December 2013

    Kent - regarding my post about our roadmap (http://edn.embarcadero.com/article/42544) and what it specifically says on slide 5 in the section titled "Beyond iOS and Android": "Windows 8 ARM/RT".

    Most developers will understand that there are three versions of Windows available, again quoting directly from Julie Larson-Green: "We have the Windows Phone OS. We have Windows RT and we have full Windows. We're not going to have three."

    We all know that there is a difference between "full Windows" and Windows RT. We know what is needed in our RTL/VCL/FMX to support full Windows vs Windows RT and also what we need to do to support Windows Phone OS. We've decided to focus for now on iOS and Android for mobile. We also are still committed to supporting Windows and are making sure that the IDE and everyone's VCL applications continue to work on the supported Windows platform versions: Microsoft® Windows 8, Windows 7 SP1, Windows Vista™ SP2, Windows Server® 2008 (32-bit and 64-bit).

    The Metropolis-UI style and implementation does give you the look and feel of Windows 8. We do not claim it is Windows 8 tiled or modern UI. We do have a Live Tile mechanism that you can use, but we do not claim that it is a Windows RT based application (and never have).

    You're right, we can create "full Windows" desktop apps, server apps, etc.

    When we complete the Windows 8 ARM/RT investigations we will find that the work we are doing will allow us also to choose to support Windows 8 Intel/RT (we do already have the Intel compilers for 32 and 64 bit).

    At the same time, everyone will be watching to see what Microsoft's next move and incarnation of Windows will be (beyond Windows 8.1). If WinRT is going to Morph or go away altogether (ask Larson-Green), then we will not have wasted too much time or everyone's time (I still remember how Silverlight was going to be a critical part of Windows' future).

    I am very glad that we are focused on Windows, OSX, iOS and Android. This gives Delphi developers all of the opportunities to do build software for a wide range or platforms, users and customers.

  • Guest
    David Intersimone Wednesday, 4 December 2013

    Dalija - we are looking at Intel on Android. We have the Intel compilers/toolchain and we know how to build Android APK files. If the number of Intel/Atom based Android devices grows beyond the starting number, we know we can do the toolchain work and testing to leverage all that we are doing in XE5 and beyond.

    As far as Android Non-NEON devices goes - we are looking to see what more we might be able to do, but for now, most of the recent and newer chips and devices are ARMv7 with Neon Support. Just as we have tested apps on GIngerbread, Ice Cream Sandwich and Jelly Bean we also have been testing on KitKat.

    As the platforms and devices keep moving forward we know we will have to continue to support new APIs, new form factors, new sensors, etc. We are on it, we are focused on additional Windows, OSX, iOS and Android support. XE5 is our first Delphi for Android release and there will be many more releases in the coming years.

    Your investment in Delphi (even if it is that you are still using older Delphi versions) allows you to quickly build applications, just as you have been able to do since Delphi 1. The same capabilities, along with the newer language features, tooling, components and RTL will continue to allow you to rapidly build apps for years to come.

  • Guest
    Kent Morwath Thursday, 5 December 2013

    David, the sad story is Delphi is no longer able to create "full" Windows app. Nor client, nor server. Many new Windows features are outside Delphi envelope, and not only Windows RT. Look at Datasnap, for example. Can it use Acrive Directory for authentication (and using the user secuirty toklen to handle that)? No, it can't. In 2013, from a *full* Windows application - server and client - I expect something like that. Especially now you have AD LDS to allow for specific AD instances, even when you don't have a full AD DS deployed - or along it for specific needs. Can the VCL use latest controls, for example Windows Ribbons? No, again, it can't. Are there facilities to use Windows encryption libraries? Again, no. TCP/IP support is built using libraries like Indy, and not OS facilities - for example see how easy is using the configured system proxy from Indy - and use the current user authentication.
    Delphi Windows service implementation is old, and not very flexible. How do you code real server applications without services? Where are the components to write to the Windows event log? Where is support for newer APIs in the RTL and VCL, maybe with some code to compile for or adapt at run-time to newer OSes? Maybe MS will kill Windows RT as a separate OS, but I'm sure WinRT will stay in Windows - because it works well on smaller devices with a touch UI, where plain Windows UI doesn't.
    Sadly, Delphi still supports Windows 95 only (and somewhat, NT4). It doesn't really support Windows 7, 8, 2008 or 2012. Apps run on them just thanks to the great Windows support for older applications. Delphi has lost a lot of ground on its flagship platform, while chasing new markets where it's still in doubt it can gain any market share bigger then Windows Phone in the phone market today.
    I'm very sorry, but you really offer very little to us, long-time, hard-core Windows programmers, to upgrade. Other tools have better support for newer Windows features, and well, even if I have to code them from scratch I'll do it now with tools allowing me to access them out of the box, without hacks. And I do believe Delphi is - was, maybe - a great tools for Windows applications. As far as I've seen till now, it's not a tool for mobile development. Too many compromises, especially for the UI, but not only. Again, we are using other ones, with better support for latest devices and UIs. Sorry - it's up to Emb to offer us what we need.... if we don't upgrade, there's a reason.

  • Please login first in order for you to submit comments

Check out more tips and tricks in this development video: