Another milestone for Web development with Delphi!
Today, I woke up to awesome news. TMS Software released TMS WEB Core 1.6. This version is a milestone because it comes with enormous compiler upgrades!
Available now are:
- Class constructors
- Resource strings
- Async procedure decorator
- Await support
- Resource file support
This will allow TMS and other third parties to upgrade their libraries to truly work in the same way as they do in other platforms.
Here’s an example: Implication for Web services
When consuming Web services, parsing the JSON or XML information is always a tedious, error-prone process as it is based on strings being parsed. XData and other Web service frameworks offer components that allow you to directly consume information from their services in client. For XData, you can use the TXDataClient class. Then, you can include the server interfaces to get type-safety at compile time. Run-time surprises are rare when using this approach. As this approach was based on Generics, the same implementation was not available in TMS WEB Core so far. As of today, XData can be extended to offer the same functionality “across all platforms”. The component that you use in the VCL to digest your Web services will be available in TMS WEB Core at some point. You will be able to import the interface declaration of your services and have type-safety at design time. No longer will you have to parse JSON results manually. You will be able to use object instances that you defined in your server.
This truly is a big step!
Another one: Wait for me!
The Web is asynchronous. There is no blocking call in TMS WEB Core. Thus, a lot of events have to be implemented, or in recent versions, you are able to specify anonymous methods as completion and error handlers. Still, sometimes you just want your code execution to “wait” for the result to be ready for consumption. With the new version of TMS WEB Core, you can use the await keyword. You simply request the code execution to “wait” until the asynchronous action completed. The compiler will do all the work for you to allow other tasks to run in the main thread while your task runs in the background. As soon as it completes, the execution of your code will continue, and you can use the “results” of the background task.
These are just two of all the amazing new features putting into perspective what’s on the horizon!
Pick your development environment (IDE)!
TMS WEB Core is available for RAD Studio, Visual Studio Code, and Lazarus!