Creating and connecting to MSSQL Database on Azure with Delphi / C++Builder
I have been asked multiple times recently about connecting to a Azure databases with Delphi and C++Builder. So….I decided to make a video! Which even shows how to use the data directly at design time in the RAD Studio IDE.
The video follows the the 3 phases.
Creating an account
Creating a database
Connecting to the database from the RAD Studio IDE
I recently blogged about a number of RAD Server topics, including using TEMSDataSetResource, (the component that enables a TDataSet to be expose as a RESTful resource, and manage all the List, Get, Put, Post, Delete methods – very cool!), how to set named parameters for the TEMSDataSetResource documentation (where multiple keys are passed in e.g. with Master Detail relationships (reviewed below)), and how the YAML and JSON documentation is auto generated with custom RESTful resources / end points
The TEMSDataSetResource is a very powerful component that enables rapid development of full document REST API’s for TDataSet using RAD Server. Using TEMSDataSetResource, along with traditional master detail relationship configurations, it is possible to expose, and automatically document data APIs via REST with no code at all.
In this article, I will cover sharing master detail data with no code, but also how to roll your own REST endpoint to cover more advanced detail with detail embedded calls.
In my previous article, I updated advise on getting started with Swagger UI, using the new WebFiles feature of RAD Server (from 10.3.2) as a way to view your documentation as you build your backend services API. This article will build upon the sample application created in that post.
Swagger UI (as previously discussed) is a great option for checking your documentation and working with the REST API. One of the challenges has always been CORS (Cross Origin Resource Sharing) that makes execution of the code a challenge when developing.
There are a few options now however. You can either work around this with browser plug-ins, (as seen before), enable CORS in the emsserver.ini under [Server.APICrossDomain], or embed swagger-ui inside your RAD Server instance.
In this video, I cover the latter option. You can watch how to get documentation up and running. The video shows how to configure your EMSServer.ini to share the external resource through RAD Server and also modify the downloaded files to automatically load up the API documentation directly from RAD Server.
WebFiles in RAD Server EMSServer.ini
The key to making this work is the WebFiles option that was added to RAD Studio in 10.3.2. This was primarily added to make it easier to serve out web content and support ExtJS for doing web client development under the Architect edition of RAD Studio, however, this also has the benefit of making other content available to share.
FireDAC has introduced new support for Change Views – enabling rapid identification of what has changed on the server side data and updating of client side stored data. See this <2min video for how these work.
Source code for the example ships in the samples directory:
Marco Cantu mentioned on the Launch webinar Q&A a customer was claiming seen a speed up of around 25% on a TClientDataSet application due to the refactoring at the base of how TField is used at the core layer. 🙂 This is really cool for both VCL and also FMX developers.
64bit support for iOS
With the new platform for iOS 64bit, the database layer is also seamlessly available, just recompile and run 🙂
There are updates for EMS including push notification. EMS is a great way to access central data from mobile devices. EMS now is updated to include InterBase XE7 for both the server and ToGo side, allowing you to use Change Views on both Server and Clients.
Where FireDAC uses SQLite, it has been updated to a newer driver.
FireDAC is the Universal Data Access library for developing applications for multiple devices, connected to enterprise databases.
Starting tomorrow you can join the embarcadero team for free FireDAC training online in these special sessions, where you will be taken from a beginner to an expert by showing you how to utilise FireDAC in multiple situations.
Having used multiple database technologies over the years of developing with Delphi, I have been exceptionally impressed by the raw power of FireDAC and how fast and easy it makes the most difficult jobs as a database developer.
The sessions run every Thursday from Jan 22-Mar 26 in 3 time zones so no excuse for missing out!