Frequently when I am talking about the VCL or FireMonkey I get some of these common questions:

  • Is VCL deprecated?
  • Which is better FMX or VCL?
  • If I am starting a new app today, should I use VCL or FMX?

The first is easy to answer, the other two are a little harder. The VCL (or Visual Component Library) is NOT depreciated, nor will it be any time soon. As long as there is Windows and the Windows API, there will be VCL. Just recently in Marco’s Windows 10 Webinar he said “VCL is the best library for Windows desktop development and fully embraces Windows 10.

The VCL gets new components, features and bug fixes frequently, but maybe not as often as FireMonkey. The reason is the VCL is a mature framework, while FireMonkey has been going through a lot of growth the past few versions (although it has stabilized a lot recently, and is reaching a more mature status.)

So which is better, and which to use? There isn’t a straightforward answer, but instead I can tell you the advantages of each, and you can make an educated choice for your next project.

Visual Component Library (VCL)

The VCL was release with the first version of Delphi. It is mostly a thin wrapper over the Windows API controls, but also includes a lot of owner draw controls. It uses GDI, Windows Handles and Windows Messages. This makes it subject to the same behavior as 90% of the other windows applications out there. If you want to you can inject a VCL button from your app into another app, or sniff messages sent to a different app and redirect them into yours.

As I said earlier, the VCL is mature, and so is the 3rd party component space. There are thousands of high quality VCL components, controls and libraries out there. Probably the most notable are the grids. The VCL grids are the best in the industry, and for good reason, our technology partners were making grids for the VCL before any other platforms had the idea of 3rd party controls. So if you want the best grid on the planet, you will probably use the VCL (although the FireMonkey grids are gaining fast).

Because VCL is mostly a thin wrapper on the Windows API, VCL based applications are much smaller than FireMonkey applications. Anymore this usually isn’t a huge deal with fast download speeds and huge hard drive sizes. But if you need a really small lightweight application, then VCL might be a good choice.

Because VCL has been around a while, you may have some existing VCL code that you want to integrate into your application. You could use a utility like Mida converter to convert it to FireMonkey, or something like Monkey Mixer or TFireMonkeyContainer to mix FireMonkey with VCL.

Generally if I am building a simple grid intensive application that I know will only run on Windows, then I find myself using VCL. Or if I need to leverage a specific 3rd party control, or Windows API feature that requires Windows messages. This is less and less frequent though.

FireMonkey Cross Platform Framework (FMX)

As FireMonkey is a newer framework you tend to see it covered more. A lot of people are still learning how to use it, and how to tackle cross platform development. The main advantage of FMX is that it is designed from the ground up to be a cross platform framework. It lets you design a single user interface that runs and looks great on Windows, iOS, macOS and Android. But that isn’t the only reason to use FireMonkey.

FireMonkey is based on the latest GPU frameworks: DirectX for Windows and OpenGL elsewhere. It supports both 3D and 2D rendering models, both of which are hardware accelerated. If you want to have some powerful graphic effects or 3D, then FireMonkey is probably going be your first choice. There are some really powerful 3D engines as well as some great graphics effects libraries for VCL, but FireMonkey has these ideas baked into it’s core.

FireMonkey is also a lot more flexible. You can embed any control in any other control with FireMonkey. This ability to build composite controls turns the smaller set of controls it includes into a much more robust set of controls. Also there are animations and effects that let you build fantastic, rich user interfaces with very little effort.

VCL has a respectable set of containers and alignments, but FireMonkey has many, many more, and again they are much more flexible. Another big difference is FireMonkey uses a single precision floating point number instead of an integer in laying out the controls. Much higher precision, but typically subpixel precision doesn’t buy you much. Where it does make a difference is when you scale on FireMonkey since it supports multiple pixel densities.

The most obvious reason to use FireMonkey is if you are currently planning to target multiplatform, or there is a possibility you might in the future (which is a pretty high likelihood). The other reasons are you want a more flexible UI or you plan to take advantage of 3D or other effects FireMonkey provides.

Conclusion

In summary VCL is amazing, and continues to get fixes and new features. It is a better user interface framework than any other out there, except maybe FireMonkey. So use VCL when you are only targeting Windows and don’t need the 3D, effects or flexibility of FireMonkey. Use FireMonkey when you are going multiplatform, or you new some of FireMonkey’s flexibility especially when working around graphics.

Both frameworks will be around for a while. As you use them both you will get a better feel for which to use in each situation. I’d love to hear your feedback about when you choose which framework.

http://community.embarcadero.com/blogs/entry/firemonkey-vs-vcl?utm_source=Developers%20Newsletter&utm_medium=Email&utm_campaign=Newsletter%20%2330&utm_content=firemonkey-vs-vcl

http://delphi.org/

FireMonkey vs. VCL (FMX的UI更灵活,图形效果更强,硬件加速,内嵌3D,使用浮点数更精确,跨平台,可使用Mida converter转换和TFireMonkeyContainer内嵌)的更多相关文章

  1. VCL+FMX 双剑合壁编程

    VCL 是经典,FMX 是新生,新生事物总会带来一些好玩新奇的东西.舍弃经典是浪费,不了解新生事物是等死,那么我们来一个二合一双剑合壁又如何呢? 要双剑合壁,就得投些机,取些巧.由于 Delphi / ...

  2. Steema TeeChart Pro VCL FMX 2017.20 Full Suorce在Delphi XE10下的安装

    一.首先将压缩包TeeChart Pro VCL FMX 2017.20 FS.rar解压到一个目录,比如 E:\Application\Steema TeeChart Pro VCL FMX 201 ...

  3. 编写高质量代码改善C#程序的157个建议——建议56:使用继承ISerializable接口更灵活地控制序列化过程

    建议56:使用继承ISerializable接口更灵活地控制序列化过程 接口ISerializable的意义在于,如果特性Serializable,以及与其像配套的OnDeserializedAttr ...

  4. bootstrap3-dialog:更强大、更灵活的模态框(封装好的模态框)

    用过bootstrap框架的同学们都知道,bootstrap自带的模态框用起来很不灵活,可谓鸡肋的很.但nakupanda开源作者封装了一个更强大.更灵活的模态框——bootstrap3-dialog ...

  5. bootstrap3-dialog:更强大、更灵活的模态框

    用过bootstrap框架的同学们都知道,bootstrap自带的模态框用起来很不灵活,可谓鸡肋的很.但nakupanda开源作者封装了一个更强大.更灵活的模态框——bootstrap3-dialog ...

  6. graphicview和widgets没本质区别。它只是更轻量级,更灵活,性能更高的widgets

    graphicview和widgets没本质区别.它只是更轻量级,更灵活,性能更高的widgets.核心就是把widgets变成了更轻量级的graphicitem,把QWidget的各种事件转换成了g ...

  7. 【转】编写高质量代码改善C#程序的157个建议——建议56:使用继承ISerializable接口更灵活地控制序列化过程

    建议56:使用继承ISerializable接口更灵活地控制序列化过程 接口ISerializable的意义在于,如果特性Serializable,以及与其像配套的OnDeserializedAttr ...

  8. xmake从入门到精通12:通过自定义脚本实现更灵活地配置

    xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验. 本文主要详细讲解下,如何通过添加自定义的脚本,在脚 ...

  9. 源码分析:Phaser 之更灵活的同步屏障

    简介 Phaser 是 JDK 1.7 开始提供的一个可重复使用的同步屏障,功能类似于CyclicBarrier和CountDownLatch,但使用更灵活,支持对任务的动态调整,并支持分层结构来达到 ...

随机推荐

  1. java程序执行顺序

    原来自己一直都没弄明白Java程序的执行顺序问题,今天,自己写了个测试,果然与自己考虑的有差距 测试代码: 一个父类Animal 一个子类Dog 测试类Test 运行结果: 所以执行顺序是: 父类An ...

  2. 编译gd-2.0.35.tar.gz时报错:gd_png.c:16:53: error: png.h: No such file or directory

    编译gd-2.0.35.tar.gz时报错: gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/freetype/include/freetype2 -I/us ...

  3. JavaScript高级程序设计(十):数组类型

    先导: 访问对象属性使用的都是点表示法.另外,我们还可以使用方括号表示法来访问对象的属性.在使用方括号的时候,应该将要访问的属性以字符串的形式放到方括号中.这两种方法没有什么区别.但是方括号的优点是可 ...

  4. 让C# Excel导入导出,支持不同版本的Office

    问题:最近在项目中遇到,不同客户机安装不同Office版本,在导出Excel时,发生错误. 找不到Excel Com组件,错误信息如下. 未能加载文件或程序集“Microsoft.Office.Int ...

  5. 【html】【21】高级篇--搜索框

    下载: http://www.xwcms.net/js/bddm/25368.html 代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...

  6. Java实战之04JavaWeb-08文件上传与下载

    一.文件上传 1.文件上传的实质是什么 文件的拷贝,文件从客户端拷贝服务器端 2.文件上传的工作 (1)客户端怎样将本地文件输出去? 1)文件上传的表单项 <input type=”file”& ...

  7. Config spec rules for elements in subbranches

    Quote from:  Config spec rules for elements in subbranches The following is an example of a config s ...

  8. 伪分布式环境下命令行正确运行hadoop示例wordcount

    首先确保hadoop已经正确安装.配置以及运行. 1.     首先将wordcount源代码从hadoop目录中拷贝出来. [root@cluster2 logs]# cp /usr/local/h ...

  9. OpenJudge/Poj 1191 棋盘分割

    1.链接地址: http://bailian.openjudge.cn/practice/1191/ http://poj.org/problem?id=1191 2.题目: 总时间限制: 1000m ...

  10. Apache服务

    Apache服务的安装: Apache服务程序的软件包名称是:httpd 安装方法: rpm软件包安装.源码编译安装.yum安装 yum install httpd 安装完成后启动: revice h ...