Over the last couple of years, Embarcadero has been expanding the features and capabilities of the RAD Server architecture, while at the same time making it more affordable (by including free deployment licenses with different RAD Studio editions).
The recent 10.3.2 Release of RAD Studio continues in the same direction, adding several interesting features to RAD Server, which I’m going to cover in some detail in this blog post and in a second coming blog post focused on the RAD Server Console. The focus has not been the addition of totally new features, but improving each of the steps, from development to configuration, from deployment to management.
RAD Server Database Mapping Wizard
In 10.3 we introduced new components that can help you configure a RAD Server endpoint mapped to a database table. While this simplified development quite a bit, there is still a necessary step to configure these components. For this reason, we added to the RAD Server New Module Wizard a new option to select one or more database tables and let the wizard fully configure the data module of a working RAD Server package for you.
The first step is to select the new checkbox, “Database EndPoints”. While you can also keep regular sample endpoints, these are often alternative — so I disabled the sample endpoints below:
By pressing next, you are now presented with a new page of the wizard, which allows you to pick a FireDAC connection name (out of those already configured) and provide a table filter. In the resulting list you can pick one or more tables. Here I selected a couple:
As you finish the wizard execution, the IDE will add a new data module with a FireDAC connection component and a FireDAC query with a matching EMSDataSetResource component for each of the selected tables:
These components have rather standard settings you can easily configure. The additional benefit, though, is that the component declarations are properly decorated with attributes, making this data module ready-to-use:
Now you can just build the package and run RAD Server, and you’ll be able to use URLs with the matching elements to access the exposed database data. If you just use “/one” you’ll get an error, because the module doesn’t have a global GET operation defined. But a URL like “one/employee/” will let you read the entire query:
Notice you need the final / to hit the resource matching the entire component, while adding to the URL the record key field will end up selecting an individual record for fetching, updating, or deleting, like in:
While using default configuration settings is only a good start, requiring more refinement and configuration and often custom code, having a ready to use server with database mapping is certainly very nice to get started.
Swagger API Documentation Improvements
Another feature of the wizard (see the first image above) is the ability to generate Swagger API documentation attributes for the sample methods generated. While Swagger API support has been in RAD Server for a while, it is far from simple to get it going and for this reason we decided to offer some additional guidance.
If you use the wizard and select the “API Documentation” checkbox while keeping some of the sample endpoints selected, the wizard will decorate your endpoints with proper documentation attributes:
Now if you start RAD Server and hit the /api/apidoc.yaml endpoint you can get the complete documentation for your APIs, including the specific section displayed below that matches “test” endpoint above:
Using a Swagger client you should be able to easily browse that documentation.
Improved Logging and Error Messages
In past versions the logs displayed by RAD Server would display information about registered endpoints in a fairly cryptic way, and not providing the actual URL you can call. Now this is much more clear, better structures, nicely formatted, and also offers much more detailed error messages in case something goes wrong. Here is an example:
ExtJS Web Console
Another change is that the ExtJS Web Console previously available in GetIt as an additional download is now fully integrated with the standard installation, replacing the older jQuery-based Web Console.
The New Windows Server and Linux Installers
Finally, in the GetIt Package manager you can find the downloads for two installers for the deployment version of RAD Server, one for Linux and one for Windows Server, including all of the binaries needed, like the InterBase server installation and the various files to deliver. The installers should make deployment significantly easier.
The RAD Server Console
We have also fully redesigned and re-implemented the RAD Server Console FireMonkey client. Given this is a fairly rich client with many new features, I’ll write about it in a new specific blog post. Stay tuned and …. enjoy the new features and enhanced quality of RAD Studio 10.3.2.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
Deep Dive Webinar: Boost C++Builder Compile Speed with TwineCompile