TMS Web Core

Yesterday, it has been a wonderful and symbolic day. It was Delphi’s birthday, Valentines Day and after weeks of rainy weather the sun was shining in North-Rhine-Westphalia where I live. 🙂

And something else happened: TMS Software announced TMS Web Core, the new web platform framework from TMS Software.

Why do I blog about this? There are two reasons: On the one hand it is a fantastic web framework and on the other hand I was allowed to work together with others on this framework. It was a wonderful experience to see how this project grew and grew. And I have to say that after 22 years of Delphi projects I haven’t worked in such a great team before!

But let’s come back to the framework itself. What exactly is TMS Web Core? Well, it is not only a web framework, it is a logical extension of RAD Studio.

Let me explain this step by step. Currently RAD Studio supports many platforms like Windows, MacOS, iOS, Android and Linux but not directly the Web. There are some extensions but not really the Web platform.

But with TMS Web Core things have changed. Delphi now supports a further platform, the Web. And with the Web I really mean modern HTML5 applications.

How could this be done?  HTML5 Web applications are not written in the Pascal language. They normally need HTML5 and JavaScript. That’s why some solutions offer Delphi components that produce JavaScript in the background, others paint some good old windows into the HTML5 canvas, but real HTML5 applications are written in JavaScript and not in Pascal.

Well, the trick is that TMS Web Core has a Pascal to JavaScript compiler. This means that you can write Pascal or Delphi code and then this code will be compiled to real JavaScript.

Okay, many of you now will ask why shouldn’t I write JavaScript directly? Why do I need Pascal? But there are three main reasons: I would like to use the full power of Delphi with all its wonderful features, platforms and components, I would like to reuse all my existing Delphi code and I simply like Pascal.

Reuse existing code, what does it mean? I know many software companies which have written over the years a huge code basis and simply don’t want to rewrite the code in another language. And if they would they would have to maintain at least for a while two languages. And we all know that this could be a very difficult issue that could collapse a whole company.

In short words, the integrated Pascal To JavaScript compiler has a huge compatibility to the Delphi compiler so that much of the Delphi code can be compiled to JavaScript. Its is clear that there are statements that cannot be compiled but believe me the level of compatibility is very high.

But what about components? Is it possible to have components that work with normal Delphi and TMS Web Core? I can simply say yes! There are the standard components like Buttons, Labels and Edits but there are also the FNC Components from TMS Software.

Just to give you a short overview: The FNC Components are the so called Framework Neutral Components. They compile for VCL, FMX and LCL. For all that are not familiar with LCL, it is a window framework for Lazarus, the open source pendant to Delphi.

The FNC components already existed before TMS Web Core. They offer for example Grids, TreeViews, InplaceEditors and much more and work for all platforms that Delphi and Lazarus support. This means that e.g. a FNC TreeView compiles under a normal VCL Win32 applications and also under a FMX iOS app! As I heard for the first time about this I thought that this is impossible but what should I say, it simply does work!

And now these FNC components also work in a HTML5 JavaScript website! And they have nearly the same look and feel as under other platforms. Here you can see some live examples, it is incredible!

Most of the Delphi applications that I have written in the past needed to connect to web servers. They needed to connect to databases or web services via REST or SOAP. There are also some great frameworks around which allows this in a very easy way. Some are already integrated into Delphi, others can be bought as Third-Party-Components.

One of the frameworks is TMS XData. And now as we know about the FNC components it doesn’t surprise that TMS XData also compiles for the Web! This means that you can put some TDataSet descendants on a WebForm and can write data-sensitive code like in every Delphi application!

I already explained so many things but there is one point I really have to mention: As a Delphi Developer I normally don’t like to design websites. This means that Web Designers can do this job much better than me but there is another trick: You can go to a web designer, ask him to create some wonderful websites and then you can connect your TMS Web Core form to an HTML page. You only have link your components to the existing HTML controls.

TMS Software explains this feature in the following way: “Yes, other than using the Delphi IDE form designer for WYSIWYG design of your web pages, you can create pages using HTML template files and using CSS. You can easily link UI HTML elements in the HTML page to controls on the Delphi IDE form designer and use the IDE just for creating the inter-UI control logic & UI control to server logic.

Certainly it is possible to compile a develop version of your code so that you can full debug your application in the browser.

I can mention so many other features: Components for showing Google Maps or YouTube, embedding jQuery…

For me, there were two very important milestones in the 23 year old history of Delphi: It was the publishing of Delphi itself and then the introduction of FireMonkey so that Delphi could be opened for further platforms. And now on Delphi’s 23th birthday Delphi goes Web!

Many thanks to

Bart Holvoet
Bruno Fierens
Detlef Overbeek
Holger Flick
Masiha Zemarai
Mattias Gaertner
Michael Van Canneyt
Pieter Scheldeman
Sanjay Kanade
Wagner R. Landgraf

This entry was posted in C++-Builder, Delphi, FireMonkey, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin, RAD Studio 10.2 Tokyo, RAD Studio XE8, TMS Software, TMS Web Core, Uncategorized. Bookmark the permalink.