From the blog

TMS WEB Core for Visual Studio Code v1.8.5 is here!

A new week and a new milestone with the TMS team. We have released today a major update for TMS WEB Core for Visual Studio Code.The big new feature in this new release is that from now on, there is support for frames in TMS WEB Core for Visual Studio Code. This not only brings the compatibility between TMS WEB Core for Delphi & TMS WEB Core for Visual Studio Code to a higher level, but of course brings the advantages of using frames to your web client development experience on TMS WEB Core for Visual Studio Code running on Windows, macOS and Linux. Frames support With frames, you can significantly enhance your productivity for creating web client applications. Frames not only reduce repeating the same form logic within a project but can also be shared among different projects. Our chief architect for TMS WEB Core for Visual Studio Code José Leon Serna explains how you can work with frames from TMS WEB Core for Visual Studio Code in detail in this video: Framework improvements Other than frames support, the TMS WEB Core framework also got numerous new features andimprovements. The list is long, we cover in this blog only the major new features: New: Support for annotations & chart area optionsn in TWebGoogleChart New: ColAlignments[] public property for TWebStringGrid and TWebDBGrid New: GetSize() function and OnProgress() event added in TWebHttpRequest New: TStopWatch class in WEBLib.Diagnostics unit added New: Hints for menu items in TWebMainMenu, TWebPopupMenu New: Properties to set Title, Text, URL at design-time for TWebShare New: More design-time customizations for TWebFileUpload like ShowPicture, FontHoverColor, DragColor Improved: Enhanced Bootstrap 5 compatibility Lots of smaller improvements & fixes Get started TMS WEB Core for Visual Studio Code brings a fresh touch to the experience of developing Object Pascal based web client applications with RAD component-based methodology. It adds to that a WYSIWYG web technology-based form designer, can run directly on the operating system of your choice (Windows, macOS or Linux) and it is the IDE of choice for web developers withan abundance of other useful IDE extensions targeted to make the web client development experience as pleasant as possible.Get Visual Studio Code for free from and install the TMS WEB Core for Visual Studio Code extension today and explore this wonderful new world. What’s next Several exciting new features are meanwhile also well advanced in the pipeline. Expect shortly the release v1.9 with support for inherited forms, Bootstrap project template and Miletus targeting macOS ARM CPUs as well as Raspberry Pi among the highlights. So, stay tuned!

Read More

Delphi 11 high DPI? SVG has you covered!

Intro On top of high DPI support at run-time, RAD Studio 11 Alexandria adds support for high DPI at design-time. This means applications/components will need to be modified to live up to this new requirement. This is a tedious job, but nevertheless, one that can be made easier when picking the right tools and libraries. High DPI has been around for quite some time now, impacting the way controls are designed. An important aspect when designing controls is image resources. Typically 16×16 or 24×24 PNG resources are used for non high DPI applications, when running your application on a high DPI screen however (for example at 150%), those sizes are too small. We would need to make sure that each resolution has its image resources available and also dynamically switches between those resources when the scale changes. To take away the need for adding multiple image resources for every possible scale, we designed and integrated SVG into our products and automatically made it available to you.  What is SVG? SVG stands for Scalable Vector Graphics, an XML based graphic format completely built up from vectors. This basically means that an SVG file can be used without quality loss. Coming back to our requirements for high DPI, SVG fits in really nicely. No more numerous image resources for different screen resolutions. Designing various elements of your application based on SVG drastically reduces the time you need to make sure your application looks and feels nice on all various screen resolutions.  SVG also allows you to maintain only one resource. If your application is using one resource for multiple elements, for various sizes, changing only that single resource is sufficient to update your application, not having to worry about the behaviour and look and feel of that resource in all those different situations. In practice SVG support is available when installing one of the following 2 products. After starting the IDE, SVG is already available. This is not only registered for our products, but also available in default VCL controls. We start by adding VCL.TMSFNCTypes or AdvTypes unit (depending on the installed product). The unit will register the SVG type at runtime. At designtime, the package already registers SVG support. For this sample, we take 2 TButtons, one with a PNG and one with an SVG image resource. We drop a TVirtualImageList and a TTMSFNCSVGImageCollection on the form. The TTMSFNCSVGImageCollection can be used to add both image resources. After feeding the TTMSFNCSVGImageCollection to the TVirtualImageList, we are ready to connect our buttons. After connecting everything together, filling up the TVirtualImageList, the buttons look similar, because the resolution of the PNG is 24×24 and no scaling is applied.  TVirtualImageList has the option to scale images, so when we change the resolution from 28×28 to 128×128 making our buttons larger, we see the quality of the PNG is no longer good. The resolution of the SVG however, nicely scales to the new requested size. For PNG, this means we would need to create a TVirtualImageList for different resolutions, managing each list, detecting which scale is applied and applying the correct TVirtualImageList. While the SVG stays nice and sharp, and only one TVirtualImageList is required independent of the initial resolution, or the resolution of the screen. Additionally, using SVGs also immediately provides a clean and […]

Read More

All You Need To Know About Using Low Code REST

REST is a type of software architecture that was designed to ensure interoperability between different Internet computer systems. Basically the idea is that services that comply with REST architecture can more easily communicate with one another. REST stands for representational state transfer and it was proposed by computer scientist Roy Fielding’s 2000 PhD thesis, Architectural Styles and the Design of Network-based Software Architectures, in which he introduced and described REST. What is REST and why should I learn more about it? The goal of REST is to increase performance, scalability, simplicity, modifiability, visibility, portability, and reliability. This is achieved through following REST principles such as a client–server architecture, statelessness, cacheability, use of a layered system, support for code on demand, and using a uniform interface. You can have access to the complete original Roy Fielding’s 2000 PhD thesis here: https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm Who is Roy Fielding? Dr. Fielding was deeply involved in the web’s early development and standardization, he began working at and for the World Wide Web Consortium in 1994 and co-authored the HTTP 1.0 specification. Later he was the main author behind the HTTP 1.1 and URI specs also co-founded the Apache web server project. The name “Representational State Transfer” is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through the application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use. Fielding’s approach was to make sure that the REST architectural style emphasises the scalability of interactions between components, uniform interfaces, independent deployment of components, and the creation of a layered architecture to facilitate caching components to reduce user-perceived latency, enforce security, and encapsulate legacy systems. Are there rules on how to implement REST? REST does not enforce any rule regarding how it should be implemented at lower level, it just put high level design guidelines and leaves you to think of your own implementation. What we do have is the definition of 6 architectural constraints which make any web service – a true RESTful API. Client–server: By separating the user interface concerns from the data storage concerns, we improve the portability of the user interface across multiple platforms and improve scalability by simplifying the server components. Stateless: Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client. Cacheable: Cache constraints require that the data within a response to a request be implicitly or explicitly labeled as cacheable or non-cacheable. If a response is cacheable, then a client cache is given the right to reuse that response data for later, equivalent requests. Uniform interface: By applying the software engineering principle of generality to the component interface, the overall system architecture is simplified and the visibility of interactions is improved. In order to obtain a uniform interface, multiple architectural constraints are needed to guide the behavior of components. REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state. Layered system: The layered system style allows […]

Read More

New milestone:TMS FNC WX Pack released

We’re pleased and proud that after numerous months of hard work, we have reached the milestone of the first TMS FNC WX Pack release! A brand new product TMS FNC WX Pack is a brand new product in the FNC family, that is the family of our universal components or in other words, components you can choose to use in VCL applications, FireMonkey cross-platform applications, LCL Lazarus applications or TMS WEB Core based web, PWA and cross platform desktop applications. TMS FNC WX Pack is available as standalone product and as expected, it is also part of TMS ALL-ACCESS and TMS FNC Component Studio. What is WX Pack? With TMS FNC WX Pack, you can leverage existing web libraries in VCL Windows applications, FMX cross-platform applications for Windows, macOS, iOS, Android & Linux, or TMS WEB Core Web applications for any device running a modern browser. The integration is seamless and in almost all cases the functionality is offline usable as components from your Delphi or C++Builder applications. No extra files need to be deployed along with your applications, the components are designed in such a way they look, feel, behave just like other framework components. What components are included? At this moment there are following components included: TTMSFNCWXBarCode Bar code generating component with close to hundred bar code types and extensive customization TTMSFNCWXQRCode QR code generating component with several settings  TTMSFNCWXGHTMLMemo Editor component to edit HTML formatted text, including support for tables, hyperlinks, images, styles, undo/redo, … TTMSFNCWXCamera Access your device cameras and take pictures or record videos TTMSFNCWXPDFViewer Add the capability to render PDF files in your application, page by page and with optional thumbnails TTMSFNCWXVideoPlayer Play videos from local files or from URLs directly in your application TTMSFNCWXJSONFormatter Show JSON data in pretty format in your application TTMSFNCWXSpeechSynthesis Have text spoken with different voices directly from your app. TTMSFNCWXOCR Add an OCR engine to your Object Pascal app. Feed the OCR engine with an image with text and have the text extracted. Includes support for different languages. Returns in the result an accuracy score for the OCR process. Read our first announcement blog for more detailed information but here in this blog we also have two new videos showing and explaining several components in the TMS FNC WX Pack: Curious? If you are curious to see what is possible and how without immediately heading over to the fully functional trial download and experiment with the components, you can also follow our webinar we gave on TMS Web Academy: What’s next This release is only the first small step in this new direction. This new technique offers unseen capabilities to bring non-trivial functionality and new technology to Delphi developers. Several more such functionality that is not readily available at this moment for Delphi developers is on the radar to bring to Delphi developers. So, expect our team to bring new components over the coming months in this category. Our team is also listening to your suggestions and ideas for other functionality to leverage this way and in addition, we will bring more detailed information how you can use the FNC bridging technology yourself to wrap & expose existing web libraries as components in your Delphi apps.

Read More

Gain A Python Performance Revolution With Delphi

According to TIOBE Python has overtaken Java and is most likely to overtake C in the near future. Python is the most searched language according to PYPL Index. There are some advantages to using Python for this popularity. Here are some advantages: Python is easy to read, learn and write. Improved productivity due to its simplicity. Effectively executes the code sequentially line by line which can make it easier to debug than event-driven code. Automatically assigns the data type during execution. Free and Open-Source. Huge standard library of read-made functions and features. Code once and run on many platforms. Why is the source code of a typical Python program so short? This brevity comes about because Python has a huge standard library allowing many activities and functionality to be expressed with smaller and more succinct program statements compared to many other languages. There is a test in Github to prove this code-brevity hypothesis. It is called Raytracer benchmarks and it’s based on examples from Typescript. Python got second place with just 275 lines of code. You can check that here. https://github.com/edin/raytracer How can I run Python scripts in Delphi? It’s great if we can take the advantage of Python’s advantages in our Delphi application, combing the best of both worlds. Let’s see how we can run a Python script inside a Delphi application. The easiest way to do that is by using Python for Delphi (P4D). Python for Delphi (P4D) is an open-source project by pyscripter. You can find the source code of Python for Delphi (P4D) from this link. https://github.com/pyscripter/python4delphi You can clone the source and install components by using the packages in the packages folder. Then add the source path to the library and you are ready to go. Are there any demo applications of using Python in Delphi programs? There are many Demo applications you can run out of the box. There are two components we use often. TPythonEngine: We use this component to execute Python scripts. TPythonGUIInputOutput: We use this component to get output to a UI component (Eg: TMemo). By using those components, we can execute a Python script and get the result with just a single line of code. procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings( Memo1.Lines ); end; procedure TForm1.Button1Click(Sender: TObject); begin    PythonEngine1.ExecStrings( Memo1.Lines ); end; You can run the Demo projects and get results from a Python script at runtime. Did you know you can run Python programs with Delphi? These two languages combined together make a remarkably comprehensive solution to almost any software problem you can imagine. Why not download a free trial of RAD Studio Delphi and try out the power of Delphi and Python combined today?

Read More

Get To Know This Industry-Leading Mobile Lighting Delphi App

MyInterface is the deceptively simple yet powerful client application for the industry-leading LightFactory system from New Zealand developer Dream Solutions Limited. The MyInterface app, which is written using the excellent cross-platform features of the RAD Studio Delphi Firemonkey FMX framework, runs on iOS and Android devices. Dream Solutions say, “This app connects to LightFactory or NEO systems and displays the interfaces build using the Mobile Interface Builder. When started the app will show a list of available interfaces that are being served by the system. Using this tool, you can click and drag buttons, sliders, images, text and switches onto a custom mobile form. You can save as many layouts as you want that are then served to the mobile device from LightFactory. Open the MyInterface app on your iOS or Android device and a list of available layouts is shown. When selected the layout you created will show and can be used to control your LightFactory system.” The Lightfactory Website Dream Solutions have a number of other apps in the Android Play and Apple App Stores. We’ve written about one or two of them before here: https://blogs.embarcadero.com/lframote-a-gorgeous-light-remote-android-mobile-app-integration/ Thanks to Dream Solutions for choosing the power of RAD Studio to make their solutions available. App Website MyInterface Apple Store MyInterface Google Play MyInterface Screenshot Gallery

Read More

Free (Reverse)Geocoding with OpenStreetMap Nominatim in TMS FNC Maps

TMS FNC Maps v2.2 now includes a new free geocoding service in addition to the existing supported geocoding services from Azure, Bing, Google, Here and MapBox. OpenStreetMap Nominatim The OpenStreetMap Nominatim API service provides geocoding and reverse geocoding free of charge and does not require an API key. This service can be used in combination with all supported mapping services in TMS FNC Maps. Specifically in combination with the OpenLayers mapping service this is a worthwhile free alternative to comparable paying services. Geocoding A geocoding request converts a text address to a latitude & longitude coordinate. The coordinate can then be used to display a location on the map. With the following code we are going to look up the location of “Baker Street, London” and display it on the center of the map with a marker and a title that contains the address.Note that this example uses the asynchronous method with a callback. procedure TForm1.Button1Click(Sender: TObject); var Item: TTMSFNCGeocodingItem; begin TMSFNCGeocoding1.Service := gsOpenStreetMap; TMSFNCGeocoding1.GetGeocoding(‘Baker Street, London’, procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult) begin if (ARequestResult.Success) and (ARequest.Items.Count > 0) then begin Item := ARequest.Items[0]; TMSFNCMaps1.BeginUpdate; TMSFNCMaps1.SetCenterCoordinate(Item.Coordinate.ToRec); TMSFNCMaps1.AddMarker(Item.Coordinate.ToRec, Item.Address); TMSFNCMaps1.EndUpdate; end; end ); end; Reverse Geocoding A reverse geocoding request converts a latitude & longitude coordinate to a text address. The text address can then be used to display an address associated with a location on the map. With the following code we are going to track a click on the map, retrieve the address for that location and display it on the map with a marker and a title that contains the address Note that this example uses the synchronous method that provides an immediate result without a callback. procedure TForm1.TMSFNCMaps1MapClick(Sender: TObject; AEventData: TTMSFNCMapsEventData); var Address: string; begin TMSFNCGeocoding1.Service := gsOpenStreetMap; Address := TMSFNCGeocoding1.GetReverseGeocodingSync(AEventData.Coordinate.ToRec); TMSFNCMaps1.BeginUpdate; TMSFNCMaps1.SetCenterCoordinate(AEventData.Coordinate.ToRec); TMSFNCMaps1.AddMarker(AEventData.Coordinate.ToRec, Address); TMSFNCMaps1.EndUpdate; end; Available Now The TMS FNC Maps v2.2 update is available now for Delphi & Visual Studio Code (with TMS WEB Core). You can download the latest version and start using the new features right away!

Read More

The Inexorable Rise Of The Supercharged Developer

Over time, software development has experienced a major drift not just in implementation, but in terms of the mindset as well. Back in the day, the engineering teams had clear, specific, and defined roles. The individuals in the team were expected to perform their part of the duty with minimalistic involvement and participation in other fields. Now that we are living in an agile world, the engineering mindset has been revamped and every individual is regarded as a full-stack package and should have the knowledge and expertise to execute the end-to-end cycle of software development. In this article, we’ll look at some of the key points of focus for software developers as an all-in-one package, especially when it comes to desktop and native application development. How can I make a full-fledged application using third-party APIs? Nowadays, when we talk of disruption and breakthrough technologies, it is highly dependent on time investment. Disruption in technology comes with effective use and management of time. Therefore, it is useless to recreate the wheel and engineer things from scratch that are already available in the form of open-source projects, SDKs, toolkits, packages, and libraries. When it comes to desktop or native ecosystems, we know that desktop apps are powerful execution tools that can natively run on your local machine to provide holistic application navigation and utilization experiences. With the advancement of modern web technologies, the desktop application development paradigm also experienced a major drift in terms of implementation. Technologies such as JavaScript and Python have inspired the hybrid implementation of desktop apps. Delphi is by far one of the most popular choices for native desktop application development. To develop a full-fledged application, you can easily integrate third-party APIs in your Delphi code and create exciting desktop applications as an all-in-one developer. For instance, you need to create an application that involves some modules related to maps. For this problem statement, you already have Google Maps APIs readily available. You can simply utilize these ready-to-use Google Maps APIs and map them according to your use case. Similarly, there are tons of other APIs, libraries, and SDKs for different use cases that you can use and integrate without starting the development process of these modules from scratch. Leveraging APIs such as those from API Layer among others is the smart way to use other people’s hard work to inject that kind of capable broad-strength modernity into your apps. Supercharged developers employ smart techniques to reach their targets – and there’s nothing smarter than standing on the shoulders of giants who have already done the hard work for you. What is an easy way to develop an end-to-end artificial intelligence-based application? Undoubtedly, artificial intelligence is at a boom right now and there’s every sign that this is a trend which is very much here to stay. There are tons of applications and use cases where AI has proved beneficial. From the technology and development perspective as well, researchers and engineers are actively working on producing dynamic and scalable frameworks that facilitate the development of AI applications. As the AI offerings improve and new techniques are refined many of the things we previously only thought possible in science fiction or would require vast computing resources are becoming available to regular developers at extremely affordable pricing plans and with easy […]

Read More

Introducing the new TMS Aurelius Dictionary

TMS Aurelius 5.6 has been released, and the major feature is a brand new, full-feature dictionary. Aurelius dictionary is intended to be used in Aurelius queries. The idea is that instead of using strings to reference entity properties, you use the dictionary properties directly. For example, a usual Aurelius query is like this: Results := Manager.Find   .Where(Linq[‘Name’].Like(‘M%’))   .List; But the above approach is error prone, the ‘Name’ string can be wrong, it can be wrongly typed, or the name might be modified. You will only find the errors at runtime. With the dictionary, you can write the query like this: Results := Manager.Find   .Where(Dic.Customer.Name.Like(‘M%’))   .List; You can also reference associated objects, for example, querying all invoices where the country of the customer of the invoice is from Brazil:   Manager.Find     .Select(Dic.Invoice.Total.Sum)     .Where(Dic.Invoice.Customer.Country.Name = ‘Brazil’) It’s a simple thing that makes a huge difference when you are using it daily. You have code completion, you have compile-time check, you minimize the errors at runtime. In summary, it increases your productivity a lot. TDictionaryGenerator.GenerateFile(‘C:SomeFolderMyDictionary.pas’); Or from command-line using the AureliusDictionaryGenerator.exe tool, which generates it from a BPL package: AureliusDictionaryGenerator.exe -i:Default -p:”C:MyProjectBplEntities” “C:MyProjectMyDictionary.pas” Last but not least, the dictionary can be validated at runtime! This way, if somehow the dictionary and the real classes do not match (for example, you might modify your classes and forget to generate the dictionary again), the dictionary will tell you the differences: TDictionaryValidator.Check(Dic); It’s as simple as that. This way you make sure you don’t have surprises at runtime and your dictionary is correct! This is an awesome new feature that brings a night-and-day difference when writing Aurelius queries. If you want to have more detailed information, of course please refer to the documentation where all the above features are explained in details. Wagner R. Landgraf

Read More

Do You Know The German Word For “Sauerkraut”?

You know, the hardest part about learning a new language is remembering some of the more esoteric words and phrases. Does that error message say “syntax error” or “successful compilation”? Does that button really say “end” in Danish or has there been some kind of horrible misunderstanding? How do I exit VIM? Just kidding – nobody knows that. But seriously, it’s not just the rote learning of words which are direct equivalents of your own first language, it’s also about noting down phrases which mean something entirely different in the one you are trying to master. My own favorite is the French phrase “il s’offre des fleurs“, literally, “he gives himself flowers” but it actually is used to mean that a particularly vain man thinks a little too highly of himself. Audio notebook to the rescue! This offline Audio Notebook helps you learn a new foreign language. According to the developer, “The own individual vocabulary (words, phrases, idioms) for learning a foreign language is entered from you in your native language (left) and in the foreign language (right). In addition, an audio note (for example, the debate in the foreign language) be included. Thus you can specifically customize the learning to your own needs the new language. Listen to the audio recording on the bus or on the train and thus strengthening your sense of language and your vocabulary. The lyrics and the audio example: you can at any time and thus adapt easily. The detained words, phrases or expressions can be corrected and completed. You can also add or remove new superfluous. For learning a language you put just a new language (language folder) and you add your own lessons. The foreign-language expression can be shown or hidden. This facilitates learning. If you are looking for something, then use the full-text search, so you can browse through all lessons and display the desired text and then edit them as necessary.” Oh, and Sauerkraut? It’s a Chinese invention…. but the word is totally German. Google Play Sprachen Lernen-AudioNotizbuch Screenshot Gallery RAD Studio Delphi can help you turn your great ideas into reality. Why not download a free trial copy today and see what it can do for you?

Read More