Friday, September 12, 2014

VCL or FireMonkey - XE7

In a previous blog post I mentioned we are starting a rewrite of an existing application using Delphi XE7 .     One of the comments was raised if we are going to use VCL or Firemonkey.

It was decision we took quite seriously.    Using Delphi  we spent a few days developing Firemonkey sample applications and compared them to what we could do in VCL.    Firemonkey is quite nice.   It has some really nice way of presenting data.  However, ultimately we have decided on writing our application using the VCL.  

Primary reasons we to considered using VCL
  • Existing libraries that can be reused.
  • We have written 30+ Custom Controls, that we can reuse.
  • Still maintained and enhanced.
Reasons we considered Firemonkey
  • Can create some really pretty applications, animations, etc... that are more time consuming to create under VCL.
  • Gets most of the new features in the Delphi libraries.
  • Gives a potential to go cross platform   However, we have no requirements for this.
Reasons we choose the VCL over Firemonkey.
  • We have no need to go cross platform with this application
  • VCL applications look like the belong on windows, Firemonkey applications look like that are made to work on Windows.
  • Firemonkey is a fast moving target, and Delphi upgrades may be more difficult if we skip versions.   
  • VCL is still getting improvements (But since it's mature it's not as difficult to adapt)  but it's easier to upgrade between Delphi versions.
  • Existing code libraries can be reused.
  • Cost we don't have to buy or develop controls we already have.
  • Specific VCL controls - (Where we could not find a equivalent in Firemonkey)
    • TImageScrollBox in the Envision Library  (Really nice way to view images)
    • TRichViewEdit from the TRichView Library (Any RTF editor may work)
    • TTrayIcon support 
    • TWebBrowser - HTML Viewing Component for desktop, we see it there for mobile.
The good news is that XE7 supports both and I have a decision to make.    I know some have said get rid of one or the other.    I personally like having the choice, they each meet a different set of needs.   

That being said part of my hope is that some of the reasons we chose VCL or Firemonkey are removed are removed in future releases.  I also really want supported interactions that allow us to mix Firemonkey and VCL Code, such as a TFrame in VCL or Firemonkey being able to be embedded into VCL or Firemonkey form.      

Regardless of the the framework choice,  XE7 appears to be a good choice for development and has compelling reasons to use over XE6.


  1. I am converting a VCL app framework I've written over the years to Firemonkey. I did so for the following reasons.
    1. Shakes the cobwebs off some of the VCL design. Small example: Position and Size properties grouped. Also, parenting any control is a snap. And, I like leaving the DB aware controls behind. The grid and edits in FMX are superior to VCL. Still nothing to the level of DevEx greatness yet however. TMS Grid and FireDataGrid are good options. Haven't tried InfoPower.
    2. While there is no plan for OS X, it's nice to have the option. In addition, it's good to get Firemonkey experience for when I'm ready to move to mobile platforms, which will occur before OS X. And hopefully, will get me to Linux one day. So it's knowledge acquired that can and will payoff.
    3. One can design with a style outside the standard scope of Windows. I don't think the look and feel of Windows is all that great. (I'm speaking from a WIn 7 perspective.) FMX allows for creativity easily.

    In regards to your issues, FMX has 2 of them covered. TMS has an FMX web browser component that works on Win, OS X, Android and iOS. And, it's TMS, so you get up to 2 years of support, which will cover 4 Delphi releases. Need a tray icon? FMX has you covered.

    Unless a significant portion of your code relies on Windows GUI specific code, you will find a lot of your existing code can convert to FMX. You can still use the Windows API if you want, but probably better to have some classes isolate your code from OS specific requirements. And if your code relied heavily on messaging, FMX has your covered.

    I've been pleased with how much of my code has moved over to the new app framework.

    1. To be completely honest I wanted to use Firemonkey so thank you for the links to the 3rd Parties. One of the major features in our existing application that we need to keep is that you can edit a letter and produce a PDF document from it. The editor needs to be embedded in our application and not a shell to another.

      One thing that is clear we are going to use MVVM , MVC or something similar that keeps our GUI easier to replace, and the rest of the code easier to unit test.