From the blog

Look Gorgeous and Go Cross-Platform To Windows, macOS, and Linux with Delphi 10.4 and FirePower X Video

In this webinar, Embarcadero Delphi MVP Ian Barker writes and deploys an app that targets Windows, macOS, and Linux from one set of code using just Delphi 10.4 and the FirePower components from Woll2Woll software. Roy Woll (from Woll2Woll) will be taking part in a live Q & A session with Ian after the demonstration to answer your questions plus attendees can get a coupon for a discount on the Woll2Woll components demonstrated.

Read More

Six Data ETL Solutions To Automate Your Business

What is ETL? You may come from another programing language or you might have started a new business and want to gather data to include in your new software system. Or perhaps you might want to backup your data so it can be converted to a different data formats. In fact, any situation where you want to get data from one source and put in another place. ETL come in to action in such cases. ETL stands for Extract, Transform and Load. You can read more about ETL and its process from here. https://en.wikipedia.org/wiki/Extract,_transform,_load ETL can be the Monday morning of computing Quite often ETL can be a painful task which involves lots of manual and repetitive work. A typical situation is one where we have loads of data gathered together in a collection of Excel spread sheets. The task might be to include that data in your database to use in a desktop or web application. Extracting data from an Excel sheet manually is often very time consuming. Then you have to transform data into a format which destination data sources can understand and use to load data into their own datasets. How can Delphi save you time on ETL? Delphi has great support for handling ETL tasks. We have several components in Delphi specifically designed to simplify the ETL process. In most cases you just need to drag and drop some components to your form, set some properties and with perhaps a very small amount of code to glue it together the task is done. Lets take a look at some components you can use in your ETL process. FireDAC TFDBatchMove LiveBindings Enterprise Connectors TRESTClient SOAP Client What is FireDac and how can you use it? FireDac is a universal data access library which you can use in both VCL and in multi device Firemonkey applications. It has extensive support for both SQL relational database management systems and non SQL data sources. FireDAC also includes the necessary components to move data from one source to another source. Here you can see it in action. In this example we use “TFDBatchMove” component to move data from an RDBMS to a Microsoft Excel file. We also show the reverse with the data transferring in the opposite direction back from Excel. Also, you can see that there are only two lines of code to make it all happen! How do we bind components to other components or data sources using LiveBindings? LiveBindings are the visual way to bind components components and components data sources. You can control properties of a component using another component without any code. You can use the Live Binding designer or the Live Binding Wizard to so. It’s just a drag and drop of a connection to bind components and data sets. A Live Bindings example Let work through an example to demonstrate LiveBindings. First, create a new VCL project and add a TFDMemTable and add some data to the memory table. Then add a TDateSource and connect it to the memory table using the data set property. Then, add some labels, a TSpinEdit, TEdit components until we your form resembles the form below. Now add a TDBNavigator and connect it to the data source. Give some memorable names for all components so we can identify those […]

Read More

Is this API the fastest, easiest way to add cost-effective image analysis to your apps?

To add cost-effective image analysis to your applications, this article will walk you through Azure API, how to obtain a subscription key to access Azure API, and how to make requests to Azure REST API using an IDE software with REST Client Feature. What is an Azure API? Azure is a cloud computing platform offered by Microsoft with more than 200 available services. Azure provides various client libraries and a REST API to access those services. There’s a free tier to get you up and running which allows you to access several services free many of which remain free as long as you don’t exceed some quite generous monthly limits. We are going to use the “Cognitive Search” service to perform Image analysis. The Cognitive Search service is an always-free tier so you should never need to pay for it. How do we get a subscription key to access the Azure API? To access the Azure REST API, we need a subscription key. A subscription key is a key assigned to a ‘resource’. So we need to create a resource first. To create a resource, you need an active Azure Subscription. Please visit this link to create a subscription: https://azure.microsoft.com/free/cognitive-services/ Once you have the Azure subscription set up you have to create a Computer Vision Resource. Make sure you have selected the correct geographical region because you cannot change this later. Visit this link to create the resource: https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision To get the Subscription key of your resource, open the resource and go to “Keys and Endpoints”. There you can see two keys and the location which needs to make our REST API call. How to make a request to Azure REST API using Delphi REST Client? Calling the REST API from Delphi Client is easy. You just need to set few parameters and you can execute it even in design time. Let make a DEMO application. First drag and drop these components in to a forum. TRESTClient TRESTRequest TRESTResponse Also, place some input controls to get the API URL, subscription key and the image URL. Place a TButton to start the request. The content type of the REST Client must be “application/json“. Now set the client and response properties of the TRESTRequest component to the client and response components we placed earlier. Also set the method to “rmPOST“. The code for the Start button looks like this: procedure TfrmMain.btnStartClick(Sender: TObject); var lparam : Trestrequestparameter; imgProcessed: bool; jsonObj, jsonStatus: TJSONObject; begin memResponse.Lines.Clear; RESTClient.BaseURL := edAPIURL.Text; RESTRequest.Method:=rmpost; imgProcessed := false; try RESTRequest.Params.Clear; RESTResponse.RootElement := ”; lparam := RESTRequest.Params.AddItem; lparam.name := ‘Ocp-Apim-Subscription-Key’; lparam.Value := edSubKey.Text; lparam.ContentType := ctNone; lparam.Kind := pkHTTPHEADER; //This one is Important otherwise the ‘==’ will get url encoded lparam.Options := [poDoNotEncode]; lparam := RESTRequest.Params.AddItem; lparam.name := ‘data’; lparam.Value := ‘{“url”:”‘ + edImgURL.Text + ‘”}’; lparam.ContentType := ctAPPLICATION_JSON; lparam.Kind := pkGETorPOST; RESTRequest.Execute; if not RESTResponse.Status.Success then showmessage(RESTResponse.StatusText + ‘ ‘ + inttostr(RESTResponse.StatusCode)) else begin memResponse.Lines.Add(RESTResponse.JSONText); end; finally end; end; This code will add new parameter to the TRESTRequest and set the subscription key. The subscription key must pass as an HTTP header and the name should be “Ocp-Apim-Subscription-Key“. The value parameter is the subscription key we copied earlier. Also it’s important to include the option “poDoNotEncode“, otherwise it will encode the key. Also the base URL of the TRESTClient needs to […]

Read More

Learn To Make Apps Beautiful, Not Beastly

The art of software development is a moving target. Just a handful of years ago most Windows apps were flat slabs of gray with uninspiring color schemes drawn from a color palette which could be best described as “all the colors of a cement works”. Those that were not part of this mono-tonal subscribed to a more “burn your eyes out” range of ultra-yellows and a color clashing scheme which users could only view behind the safety of sunglasses. The theme was either gray bleakness or garish migraine. Luckily things have moved on. Beautiful theme styles, top quality and free too! Similar to Windows themes, VCL styles make it easy to radically change the appearance of your VCL applications, giving your application that extra level of polish and professionalism. Thanks to the Per Control VCL Styles introduced in 10.4, a single form can take advantage of multiple styles giving you maximum customization and control. RAD Studio, Delphi, and C++Builder ship with a selection of VCL styles, with additional premium styles available in GetIt, or from DelphiStyles. Learn how to give your apps a high-quality modern look In this webinar replay join Alexey Sharagin, the creative genius behind DelphiStyles, to learn everything you ever wanted to know about working with VCL styles, including how to customize and make your own. Properties of TStyleManager to adjust VCL styles for forms, dialogs, and menus Specifics of High-DPI support Benefits of using VCL Styles in application Per-control styling support details Creating and customizing styles with the Bitmap Style Designer tool Using styles from GetIt and DelphiStyles.com

Read More

To Modernize Your App You Need To Do These Things

Modernizing your app is vital if you want to remain competitive in today’s very crowded market. The process of modernization is actually pretty straight-forward but there are some easy pitfalls – things you might miss – and they can make the difference between time well spent or time wasted. RAD Studio is a modern Windows application too! RAD Studio itself is obviously an application and like any other it has to constantly evolve to ensure it keeps up with design and usability trends as well as working with new and emerging technologies. The RTL; Delphi’s runtime library, also is continually being enhanced and added-to so that it keeps making your life easier as a developer by simplifying the addition of powerful new features to your apps. Modernization? Let RAD Studio do the hard work for you. The strength of RAD Studio Delphi is its ability to add this supercharge to your code while keeping it as simple as possible. After all, the “RAD” in RAD Studio means RAPID application development and it’s the reason why we choose to use RAD Studio to build modern robust applications in the fastest times possible with the minimum of effort. The smart way to modernize is making RAD Studio Delphi do the hard work for us. The Windows UI Library provides official native Windows UI controls and other user interface elements for Windows apps. It maintains down-level compatibility with earlier versions of Windows 10, so your app works even if users don’t have the latest OS. In this video Embarcadero MVP Holger Flick takes us through a series of easy and yet powerful things we can do with RAD Studio Delphi to bring our apps up to the next level.

Read More

How Can I Keep My Apps Relevant In A Modern World?

Developing a great application is not a “one and done” activity. In order to retain your hard-won users and remain competitive it’s essential for you to keep up with the trends in modern application design. New operating system versions can bring substantial changes to the expected look and behavior of your app. Not only that, when features are added such as notifications, alerts, user interaction models, your customer base will expect your application to take those changes on-board, embrace them and use them in ways they have come to expect by using other applications. RAD Studio makes it easier to keep up with new innovations in operating systems and devices It’s a constantly moving target but lucky for you RAD Studio and Delphi are also continually improving and adopting new technologies and functionality to help make your life easier and your applications at the cutting edge of design and UI. Here’s a great tutorial on how to modernize your legacy applications Stephen, Mary, and Al from the Migration Center are back to show you how easy and worthwhile it is to update your Delphi legacy projects to the latest devices, techniques and usability paradigms.

Read More

Add Amazing Automated AI Content Moderation To Your App, It’s Easy!

You might have an application with a huge amount of user-generated content coming daily and need to moderate content automatically. It’s a pain to moderate content manually because it takes lots of man-hours. How about using artificial intelligence with IDE Software for that? It will instantly detect inappropriate content prevent form going public. What is the Content Moderation API by DeepAI? DeepAI is a very popular source among artificial intelligence content seekers. It provide researches, guides, news and APIs of artificial intelligence. You can easily grab an API key by creating an account and access all of their artificial intelligence APIs. Just visit this link, create an account and then go to the dashboard and you will have your API key. https://deepai.org/ Is it free to use Deep.ai automated content moderation? When you register, you will have $5 USD free credit which is equivalent to 10,000 requests. No credit card required for the registration. After the registration, you only need to pay $0.50 USD per 1000 requests or there are some enterprise packages you can discuss with them. What Deep.ai artificial intelligence APIs are available to use in my Delphi application? They provide numerous amount of APIs. You can check their APIs form this list. Most of them also have a live demo in their product page. https://deepai.org/apis One of their powerful API is the “Content Moderation API”. This API give you the all details to moderate the content. Once you supply and image to the API, it will provide you “Not safe for work” score, description about inappropriate content, the rectangle area of the inappropriate content, and the confidence score which is one if 100% confidence. This API can detect adult content, hate symbols, guns and offensive words. How do I use the Content Moderation API? We can access all of the DeepAI APIs using a REST client including this content moderation API. A simple curl request for this API is like this: curl –data ‘image=YOUR_IMAGE_URL’ -H ‘api-key:API_KEY’ https://api.deepai.org/api/content-moderation It’s self-explanatory and you have provide the image URL or local image file as “image” and the API key as a header value. Once you send the request, server will send a JSON response and you can parse it to have all moderation information about the image. Sample moderation would be like this: { “id”: “UNIQUE_ID”, “output”: { “detections”: [{ “confidence”: “0.83”, “bounding_box”: [ 118, 89, 21, 29 ], “name”: “Female Breast – Exposed” }, { “confidence”: “0.92”, “bounding_box”: [ 142, 92, 27, 27 ], “name”: “Female Breast – Exposed” }, { “confidence”: “0.54”, “bounding_box”: [ 168, 153, 19, 30 ], “name”: “Male Genitalia – Exposed” } ], “nsfw_score”: 0.9997197985649109 } } You have to parse the JSON array inside the JSON to get the results. How do I access the Deep.ai Content Moderation API from Delphi? We can use REST client component to access the this API and easily build a demo application. Let’s make a demo application which will draw a rectangle if one of the restricted content found. First add a TRESTClient, TRESTRequest and TRESTResponse components in to a form. Set the base URL of the client to the following: https://api.deepai.org/api/content-moderation Set the method of RESTRequest to rmPOST because we going to securely post the data. Then it’s the coding time. We need to set the image, […]

Read More

Modernize Your Apps With The Beautiful Fluent User Interface

Join Delphi MVP Ian Barker as he shows how to get the modern Windows 10 look and feel using RAD Studio’s themes and some *very* cost-effective third-party controls. Get that truly modern WOW factor kickstarted with minimal effort – Ian will show you how. What is The Fluent UI? The Fluent UI Microsoft’s ‘design language’ for the Windows 10 operating system. It dictates how to modernize certain user interface elements to add depth, movement and affordance (whether or not a screen element looks like it can be clicked, slid or otherwise used by user interaction). This video takes us on a tour of what Fluent UI is along with some resources to look at and examples. At the bottom of this post you should see other suggested videos and resources about Fluent UI and user interface design in general.

Read More

Powerful, High Quality Data Visualization With TeeChart

Sooner or later software developers need to undertake the task of extracting data, transforming it into something useful and loading it into other forms of representation and storage (ETL). During that process we’ll often also need to then present that aggregated or extracted data as a visual representation. What is data visualization? Data visualization is the art of making the useful, usable. If we display a torrent of facts and figures such as city populations in the form of a table it is useful – but it’s not very usable or even readily understandable. It’s far easier for us to represent that collection of numbers as a graph; specifically a chart. We humans are very visual and we can absorb and comprehend quite substantial and even complex hordes of figures much more effectively when they are presented visually. How does TeeChart help with data visualization? Since the very early versions of the Delphi IDE a version of TeeChart from Steema has shipped as a free add-on. Even today with the far more comprehensive, evolved and advanced RAD Studio Delphi there is a free copy of TeeChart waiting for you to use if you tick the little checkbox during the installation process. This free copy of TeeChart has meant that many Delphi programmers have learned to use TeeChart to provide things like pie charts, line graphs and scatter plots in their programs to represent all sorts of data when the need arose. There is a paid version of TeeChart too which offers more advanced functionality but don’t be fooled by the “free” in the free version; it’s got plenty of power too and more than enough of it for many things you could find a use for. Here’s the video..

Read More

Build A Robust, Scalable, Real-time Websocket Client & Server

HTTP is one of, if not the most, widely used client-server protocols. It has been serving up our favorite web pages, blogs, and even this site for many years through its lifetime carried on the shoulders of the reliable TCP. But technology is evolving, and over time it has become clear there are some limitations with HTTP. The first thing is that HTTP is unidirectional. With HTTP, the client starts the request first and the server responds. So for every resource, the client is the one who polling for the resource. Added to that, HTTP expects that each interaction has a timeout before it’s assumed that the server is not responding. How can an IDE Software create a robust and scalable real-time Web Socket and Server? Let’s find out all the answers in this post. What are the solutions for the HTTP limitations? Long-polling serves as a solution to the limitations of HTTP based technology. In this case, the client sends request with a long timeout. This allows the server lots of time to reply without the connection expiring due to inactivity or an inability to respond. This was a solution for up to a certain level, but this is very resource hogging. It’s because the server resources are reserved and dedicated to the client during the long polling. Are Websockets a better solution for HTTP limitations? Yes, Websockets are a better solution to help mitigate some of the HTTP timeout limitation. Websockets can use HTTP to initialize the connection and, using the same TCP connection, upgrade to a websocket. With Websockets, we have a persistent bi-directional connection which is less resource intensive than long polling. Both the server and client can push messages any time. Today most of the web browsers support the Websocket protocol. Also the fifth version of HTML (HTML5) includes support for websockets. So in general, Websockets allow you to build real time client server applications. How do I implement websocket applications with Delphi or C++ builder? IPWorks has a complete solution to implement both Websocket server and client. It has following components: TipeCertMgr: This component used to store certificates. TipeWebSocketServer: This is the server component which accepts websocket client requests. TipeWebSocketClient: This is the client component which can connect to a websocket server and send or receive data. TipeWebSocketProxy: This component will accept Websocket connections for a websocket server and instead redirect to another server. By using these components you can develop a complete Websocket client and server application. These components are native and doesn’t need any external libraries. Also the components are optimized and work efficiently. It’s very secure with the WebSocket Secure 256-bit encryption. These components are thread safe. As an added bonus they also have a good documentation to get started: https://cdn.nsoftware.com/help/IWF/dlp/ How do I use IPWorks WebSockets? IPWorks provide a free trial version of their WebSocket component pack for both Delphi and C++ builder. You can evaluate those components in your application. You can acquire the components from this link: https://www.nsoftware.com/ipworks/ws/download.aspx You can also use the GetIt package manager to search for an find trial versions of IPWorks: https://getitnow.embarcadero.com IPWorks WebSockets component installer comes with a demo application which works out of the box. It has a nice little Websocket echo server and a client application to connect to the websocket […]

Read More