VCL

Introducing TMS XData Query Builder and more!

We’re excited to announce TMS XData 5.2 version with several new great features. TMS XData is the more straightforward way to take your Delphi app to the cloud, allowing you to create secure, robust REST servers along with a huge ecosystem around it. Here are the major features in this release, which also includes several minor improvements and bug fixes. XData Query Builder XData allows you to easily query entities from automatic entity set endpoints using a full query syntax. For example, to query customers which name is “Paul” or birthday date is lower then August 1st, 1940, ordered by name in descending order, you can write a code like this: Customers := Client.List(‘$filter=(Name eq ”Paul”) or (Birthday lt 1940-08-01)&$orderby=Name desc’); But now you don’t need to worry to write the raw query syntax anymore. The new XData Query Builder allows you to build such filter using a fluent interface which already does some validation (like checking for correct property names) before the data is sent to the server: Customers := Client.List( CreateQuery .From(TCustomer) .Filter( (Linq[‘Name’] = ‘Paul’) or (Linq[‘Birthday’] < EncodeDate(1940, 8, 1)) ) .OrderBy('Name', False) .QueryString ); You can build logical expressions and projections in a similar way you would do with TMS Aurelius criteria. Receive DTO objects in URL query string Service operations can now receive DTOs (Delphi objects) from the query string of the request URL (as long the DTO only have properties of scalar types). In this case, each DTO property will be a separated query param. Suppose you have a class TCustomerDTO which has properties Id and Name, then you can declare the method like this: [HttpGet] function FindByIdOrName(Customer: TCustomerDTO): TList; And have your Customer parameter be received from a request URL like this: GET /CustomerService/FindByIdOrName?Id=10&Name='Paul'. XData queries in service operations Now, in addition to send queries to automatic CRUD entity set endpoints, you can also benefit from XData query mechanism in service operations. You can now easily receive and process XData query syntax like $filter, $orderby, $top and $skip in service operations, even for DTOs, and create Aurelius criteria from it. You can declare a service like this: type IMyService = interface(IInvokable) [HttpGet] function List(Query: TXDataQuery): TList; Which means clients can now invoke the endpoint passing the same $filter, $orderby, $top and $skip parameters, like this: GET /MyService/List/?$filter=Name eq 'Foo'&$orderby=Name&$top=10&$skip=30 Or, of course, passing the raw filter string with TXDataClient: Customer := Client.Service .List('$filter=Name eq 'Foo'&$orderby=Name&$top=10&$skip=30'); Or even using the brand new XData query builder fluent interface: Customer := Client.Service.List( CreateQuery.From(TCustomer) .Filter(Linq['Name'] eq 'Foo') .OrderBy('Name') .Top(10).Skip(30) .QueryString ); From server-side, you can create an Aurelius criteria automatically from the passed XData query: function TMyService.List(Query: TXDataQuery): TList; begin Result := TXDataOperationContext.Current .CreateCriteria(Query).List; end; Not only that, you can even create a criteria from a query based on a DTO object: function TMyService.List(Query: TXDataQuery): TList; begin Result := TXDataOperationContext.Current .CreateCriteria(Query, TCustomerDTO).List; end; In the example above, even though you are creating a criteria for the TCustomer class, the query will be validated based on the TCustomerDTO class. This means XData will only accept queries that use properties from TCustomerDTO. For example, if the filter string is $filter=Status eq 2, even if the Status property exists in TCustomer, if it does not exist in class TCustomerDTO the query will not be accepted and an error "property […]

Read More

One subscription for all current VCL components!

TMS VCL Subscription is our two year subscription to all our current & future VCL products for Windows application development. With this bundle you will save over 60% now and even more with new free VCL component releases! This bundle includes many unique products like TMS VCL UI Pack with over 600 VCL  components, grids, flexcel, charts, … All products come with perpetual licenses and 2 years of FREE updates & support. After 2 years the subscription can be extended at 50% discount! Products included in the bundle: TMS Logging TMS VCL UI Pack TMS VCL Cloud Pack TMS VCL Chart TMS VCL WebGMaps TMS PassKit TMS FlexCel Component Suite for VCL TMS Scripter TMS Query Studio TMS Unicode Component Pack TMS GUIMotions TMS Async TMS VCL Plugin Framework TMS VCL Security System TMS VCL Instrumentation Workshop TMS Workflow Studio TMS Diagram Studio TMS MultiTouch SDK Get full access to VCL components: Best bundle for Delphi / C++Builder VCL Win32 or Win64 application developer.  2 years free updates & free support.  Renewal after 2 years at 50% discount instead of regular 795 EUR*. Always current with latest Delphi & C++Builder releases. All products accessible via TMS Subscription Manager tool. Full online support through TMS Support Center. *The price is valid for this moment & depends on the price of the pack at the moment of renewal. Act now: Find out more about our products included in TMS VCL Subscription and get your license today! NOTE: Contact sales for special upgrading pricing for existing customers of other products.

Read More

Google Maps heat maps

We recently received a question whether TMS FNC Maps supports heat maps. Heat maps are supported in Google Maps and we immediately went exploring the capabilities upon this request. More info and a sample about heat maps can be found here: https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap. TMS FNC Maps comes with a lot of great functionality as well as a (lesser visible) customization events and methods to add your own extensions. To add support for heat maps, we had to override 2 virtuals and we can do this by inheriting from the TTMSFNCGoogleMaps class. Customizing the API URL TTMSFNCMaps (and TTMSFNCGoogleMaps), expose a lot of virtuals to extend and customize existing or new functionality. To support heat maps, we needed to add an extra parameter to the URL that is required to load the Google Maps JavaScript API. This can be done by overriding the GetHeadLinks procedure. procedure GetHeadLinks(AList: TTMSFNCMapsLinksList; ACheckReady: Boolean = True); override; Additionally, we need to change the link to include an additional parameter: “libraries=visualization” to enable the library required to load the heat map layer. procedure TTMSFNCGoogleMapsEx.GetHeadLinks(AList: TTMSFNCMapsLinksList;   ACheckReady: Boolean); begin   AList.Add(TTMSFNCMapsLink.CreateScript(‘https://maps.googleapis.com/maps/api/js?key=’ + MapsProperties.GetAPIKey + ‘&language=’ +     MapsProperties.GetLocale + ‘&libraries=visualization’, ‘text/javascript’, ‘utf-8’, ”, True, True)); end; Adding additional JavaScript functionality After extending the API URL to load the required libraries we need to add custom JavaScript to visualize the heat map. According to the sample (following the link at the top), we need to add code to visualize heat maps in San Francisco. To add custom JavaScript functionality, override the DoCustomizeMap virtual. procedure DoCustomizeMap(var ACustomizeMap: string); override; The code specified in the sample translated to Delphi code is shown below. procedure TTMSFNCGoogleMapsEx.DoCustomizeMap(var ACustomizeMap: string); var   h: string; begin   h := ‘var heatMapData = [‘ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.447), weight: 0.5},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.445),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.443), weight: 2},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.441), weight: 3},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.439), weight: 2},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.437),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.782, -122.435), weight: 0.5},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.447), weight: 3},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.445), weight: 2},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.443),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.441), weight: 0.5},’ + LB +   ‘new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.439),’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.437), weight: 2},’ + LB +   ‘{location: new ‘ + MAPSERVICEVAR + ‘.LatLng(37.785, -122.435), weight: 3}’ + LB +   ‘];’ + LB +   ‘var heatmap = new ‘ + MAPSERVICEVAR + ‘.visualization.HeatmapLayer({‘ + LB +   ‘  data: heatMapData’ + LB +   ‘});’ + LB +   ‘heatmap.setMap(‘ + MAPVAR + ‘);’;   ACustomizeMap := h;   inherited; end; Bundling this all together produces the following result. The complete code snippet (written in FMX, but can be used in any framework) unit UGoogleMapsHeatMap; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, […]

Read More

Another webinar with another first …

If any of these technologies are of interest to you, we have a new webinar coming up with another first!Reserve your first class seat now while it can here.  We will show you for the first time in public, the latest state of project Miletus in TMS WEB Core.  To give you a hint, we only show today this screenshot: First time you hear about the word Miletus? Read up here and then reserve your seat!  With your registration, you’ll see & discover it first-hand in our online webinar running in our own fully web-based TMS Web Academy platform developed here using TMS WEB Core for Visual Studio. We look forward to meet you in the webinar and discuss via the platform the many new capabilities that open up for Delphi developers.  See you!

Read More

Discover our wide range of TMS FNC Components

FNC stands for Framework Neutral Components. This means that the components can be used cross-framework and cross-platform. With our TMS FNC Component studio bundle you will get access to all our current FNC components! That is not all! You will save over 45% now and even more with new free FNC component releases! All products come with perpetual licenses and 1 year of FREE updates & support. Subscriptions can be extended for another year at 70% discount! Products included in the bundle: Get full access to FNC components: Components for Delphi & C++Builder that can be used in all project types. Only one learning curve: VCL, FMX, LCL and WEB. Target Windows, macOS, iOS, Android, Linux and WEB. Growing range of components, new products on the way. Yearly renewal only 145 EUR* instead of regular 495 EUR. All products accessible via TMS Subscription Manager tool. Full online support through TMS Support Center. *The price is valid for this moment & depends on the price of the pack at the moment of renewal. Learn More: Want to learn more about FNC and how you can benefit from it? Join us on our upcoming webinar: “What is FNC : Introduction to the growing family of FNC technology based components“, on June 22, 2021. Act now: Find out more about our products included in TMS FNC Component Studio and get your license today! NOTE: Contact sales for special upgrading pricing for existing customers of other products.

Read More

TMS WEB Core & FNC trial support

A small update with a big impact We have recently changed the way the trial version is being built and now works together with other TMS WEB Core enabled products. Evaluating a product before considering a purchase is important and therefore we have bundled all of our resources and investigated a solution for the ongoing issues trying out the combination of trial FNC & trial TMS WEB Core. Today we can announce there are no issues compiling FNC trial & TMS WEB core trial together. Enjoy and test the trial version of the following products in combination with TMS WEB Core trial today! In case you didn’t notice This week is also FNC week. Please read the following blog post to know more about FNC & FNC Studio and the benefits it has to offer: https://tmssoftware.com/site/blog.asp?post=806

Read More

JSON backstage pass for TMS WebCore developers

2. First things first In the previous section we used the terms JSON and JavaScript object. But what is it exactly and what are the differences? In JavaScript, a variable can contain a simple value as well as an object or an array. // JavaScript let i = 5; let s = ‘some text’; let o = { a = ‘text’, b = i } In this example the variable o contains a JavaScript object with the two attributes a and b where a contains a text and b contains a number. In TMS WEB Core there is a type JSVALUE for the value of a variable from the JavaScript world. Whenever we want to access the value of a JavaScript variable, we can use the JSVALUE type for it. // WEBCore function sampleJavascriptVariable : JSVALUE; assembler; asm let i = 5; return i; end; procedure AccessJsvalue; var javascriptvalue: JSVALUE; i: integer; begin javascriptvalue := sampleJavascriptVariable; // value will now contain the JavaScript VALUE (hence JSVALUE) 5 i := integer(javascriptvalue); // we needed to typecast javascriptvalue to integer because the compiler // doesn’t know the type of the value actually stored in that variable end; So whenever we want to access JavaScript values directly from TMS WEB Core, we need a typecast to tell the compiler which type the value in the variable with the type JSVALUE contains. This is already cumbersome with simple types and also error-prone and it gets even more complex when we want to access JavaScript objects. Let’s summarize: A JavaScript object is an object in the JavaScript world that is stored in an internal representation in a JavaScript variable. To store such a JavaScript object in an Object Pascal variable in TMS WEB Core, the object pascal type JSVALUE is available. And what has all this to do with JSON ? JSON (JavaScript Object Notation) is a string that represents a JavaScript object. A JavaScript object can be converted to JSON and a JSON string can be converted to a JavaScript object. More information about the syntax definition of JSON can be found here: https://www.json.org/json-en.html. Whenever we talk about JSON, we mean a string from an Object Pascal point of view. Whenever we talk about a JavaScript object we mean a JSVALUE from an Object Pascal point of view. // WEBCore var json: String; javascriptobject: JSValue; begin json := ‘{ “x” : 5, “y” : 7 }’; javascriptobject := TJSJSON.parse(json); end; In this example the JSON variable contains a JSON representation (data type String) of an object with the members x and y, both containing numbers. This string is parsed into a JavaScript object using the static method TJSJSON.parse() and stored in the variable javascriptobject. Note: All sample sources use only the units that are already automatically included in the uses list of a standard TMS WEB Core web project. So you can try and reproduce everything directly in TMS WEB Core when you include the source texts in the unit1.pas of a newly created project. To keep the example source code short, only necessary code is shown, in real world code you would need to add some exception handling here and there… All well and good, now we have a JavaScript object in an Object Pascal JSVALUE variable in TMS WEB Core. But how […]

Read More

Keep up with the latest developments!

Everything evolves so incredibly fast in the software world! So our team is also trying really hard to keep up with the latest developments. And to give our customers access to all our latest developments we have created our no-nonsense subscription TMS ALL-ACCESS! Because we want our customers to be able to use all our products with no restrictions or limitations. And when we say ALL we really mean ALL our products we offer now and also all new products we’ll release in the year of the subscription. Moreover, our all-access users are the first to receive the previews and betas of our non-released products! Here is a small overview of the new products we added in 2021: January 2021: TMS VCL UI Pack v10.4: Powerful, extensive & flexible component suite for native Excel report & file generation & manipulation for VCL & FireMonkey TMS FNC Cloud Pack v1.3: Seamless access to cloud services from Windows, cross-platform and the web TMS WEB Core v1.6: Framework for creating modern web applications February 2021: March 2021:  April 2021:  May 2021:  Get full access with:  Easy plan: All current and new products for 1 price! Easy renewal: Yearly renewal only for 495 EUR! Easy install: all products accessible via TMS Subscription Manager tool Easy support: Full online support center access to all areas Easy up-to-date: Early access to product betas Easy learning: Access to TMS WEB Academy Act now: So what are you waiting for? Find out more about our products included in TMS ALL-ACCESS. NOTE: Contact sales for special upgrading pricing for existing customers of other products.

Read More

Custom control development with TMS WEB Core for Visual Studio Code, an intern reports

At tmssoftware.com we love to have interns. I believe it is a fantastic experience to learn young aspiring software developers about Delphi, its eco-system, its amazing productivity and at the same time, absorb a lot of energy, get new fresh ideas and get to know what drives and motivates the next generation of software developers. So, also this school year, we had 2 interns learning all about Delphi, TMS WEB Core, Object Pascal, components and much more here at tmssoftware.com. Today, we want to give the word to our intern, and very soon colleague, Bradley who did a lot of stunning work this school year and tells in his first blog post about building his first custom control for TMS WEB Core. Nothing but an amazing and exciting story! So, with pleasure, I give the word to Bradley: A first custom web control Having only one year experience using Delphi and TMS WEB Core, I was assigned the (at first sight) daunting task of developing my first ever custom web control, namely a chat box control. I had only been developing web applications since I joined tmssoftware.com as an intern, so clearly writing a component was something completely new. Using the available documentation and the experience of my mentor Bruno I quickly obtained the necessary skills for developing a TMS WEB Core custom control, the TWebChatBox control. First steps To gain some experience, I first developed another very small control, a custom toggle button control to switch a web application between full-screen and normal mode. I went for developing the custom control directly from TMS WEB Core for Visual Studio Code because I just feel more comfortable for web projects to use this IDE. I had the “privilege” to use first the alpha and then the beta version of TMS WEB Core for Visual Studio Code v1.3 (released yesterday btw) as this introduced component package support. Using the new package support for installing custom controls made it very easy to test the control, also at design-time. The development of this first small control allowed me to get used to the concept of custom controls as well as the steps involved to get it installed in the IDE. Starting the chatbox implementation After I was comfortable enough with the principle of custom controls. I’ve started building the chat box component. As there were a ton of features on the requirements list, I had actually no idea where to start. I’ve focused first of all on a working way of sending/receiving messages. When I had that going, I started focusing on adding a basic design, followed up by adding the necessary properties for manipulating said chat box.  I think implementing collections as a way of managing messages was the only thing I really struggled with. Having never implemented anything like this, figuring out how to implement the chat message bubbles at collection item level was a challenge. If you add a message to your collection, a chat message bubble will be generated and displayed in the chat control. The collection item will also keep a reference of the chat message bubble so that you can manipulate it later on. A chat bubble contains several HTML elements. We have a SPAN for the message. For the user avatar there is an IMG element. […]

Read More

TMS WEB Core for Visual Studio Code v1.3 released

Today is an exciting day as we reached yet another milestone, this time the release of TMS WEB Core for Visual Studio Code v1.3. You are an Object Pascal expert, your customers look out to access your applications everywhere via the web and without any install hassle, you love the RAD component based development methodology, you can do this software development from the operating system you love … then having a look at TMS WEB Core for Visual Studio Code v1.3 will open a whole new world!  What brings TMS WEB Core for Visual Studio Code Fully Object Pascal based web development RAD component methodology driven fast & productive development  Hosted in a free hugely popular IDE for web developers Running on Windows, macOS and Linux Using a WYSIWYG form designer A framework that has a similarities with the familiar VCL framework where possible  What is on the table in v1.3 This major update is packed with significant new features: Support for packages Yes, from now on, it is easy to create your own custom components and compile & install these for use at design-time. The package system is similar to how you can use packages to install components in the Delphi IDE or Lazarus Support for workspaces With workspaces, now you can have multiple projects in a folder and activate and select which project to compile/run/debug. Support for using the entire FNC component suite As our entire set of FNC components is ready for use in web client applications, the new package support in TMS WEB Core for Visual Studio Code enables to install all TMS FNC components in the TMS WEB Core for Visual Studio Code IDE. The latest FNC registered version updates released last week contain all the required packages for this. Brings the framework up-to-date with latest version as available in TMS WEB Core for Delphi/Lazarus v1.7 The TMS WEB Core framework that comes with TMS WEB Core for Visual Studio Code is now in sync and up-to-date with the latest release of TMS WEB Core for Delphi. This means that all new components and component improvements are now also available for Visual Studio Code users. This includes the new USB components, local file access components, new Firestore dataset capabilities, extensions to grids, web socket connection improvements and much more…  One important note though, the Miletus application type is not yet in our release for Visual Studio Code release but scheduled for the next release.  Get started! There are several ways to get started with TMS WEB Core for Visual Studio Code TMS ALL-ACCESS users have immediate & free access to TMS WEB Core for Visual Studio Code TMS WEB Core for Visual Studio Code registered users will find the new release now on your “My Products” page A fully functional trial version for Windows, macOS or Linux is available We have a webinar coming up that will guide you around the IDE, the framework, the possibilities Check more details about FNC and using FNC components from Visual Studio code in this blog  Learn how to use packages, write your own components or use FNC components We have already two videos for you and more are coming. Chief architect José Leon Serna explains how to start using packages: José Leon Serna and Bruno Fierens host a […]

Read More