From the blog

What’s Coming in RAD Studio: Join The Upcoming Webinar!

Click here to save your seat RAD Studio 11 Alexandria has been a significant and very well received release. Landmark changes to the IDE and support for high-DPI 4k+ screens have completely changed the app design experience. Windows 11 provisioning and a multitude of updates ensure our customers can target the latest versions, platforms and hardware. Meanwhile, since the 11 Alexandria release we’ve been hard at work figuring out how to further improve your application development experience, and listening to your feedback in search of bugs to fix and features to improve. What’s more, we’re not keeping our plans for RAD Studio under wraps but sharing it with everyone who cares (that’s you). You’re Invited to the “What Coming in RAD Studio” Webinar On 16 March at 11am US Central Time, join Embarcadero’s Jim McKeeth, Marco Cantu, David Millington and Kyle Wheeler on a highly revealing webinar on the latest in RAD Studio Alexandria. See what’s new in your favorite development tools, and where things are headed.  This is a must-see webinar for all fans of Delphi, C++Builder, and RAD Studio! Click here to save your seat

Read More

The Big Problem With Windows Software Makers, And How You Can Fix It

There are dozens of windows software makers; the powerful tools and programming languages used to create Windows GUI applications. Most of them require you to write thousands of lines to do even the simplest, most basic things such as drawing UI elements. Yes, several of them have their own RAD (rapid application development) tool, yet when you compare Embarcadero’s RAD Studio with other GUI development tools, it is immediately obvious why RAD Studio is a superior RAD development tool. Why should you choose RAD Studio’s Delphi & C++ Builder? Since I started my Windows software-making experience with C++ Builder and Delphi, I believe that most Windows app developers are making problems for themselves by choosing the wrong software development ecosystem.  When the Delphi with its Visual Component Library was introduced to software developers, it showed an accurate, productive tool to create Windows applications. For over 27 years now Delphi is still one of the leading, most productive ecosystems for Windows development. With its intuitive visual design environment and the unrivaled performance of a world-class optimizing native code compiler, you can achieve the best results in no time.   Moreover, the FireMonkey cross-platform framework is also one of the gems in the cross-platform development industry. Why? Because the architecture of the FireMonkey framework provides native development for most major platforms. For instance, you can create Windows, macOS, Linux, Android, and iOS applications from a single code base. It is straightforward to access device-specific and operating-system-specific features with APIs. Can RAD Studio 11 really build apps 5x faster than other methods? The RAD Studio 11 release supports High-DPI and 4k+ screens, provisioning for Windows 11, Android 30 API, and the macOS 64-bit ARM M1 processor. RAD Studio 11 – Alexandria is the latest version of the RAD Studio and provides developers with many more functionalities.  To learn more about why you should choose the RAD Studio for your next project, check out this article that analyzes: Are the original tools for Windows development making things difficult? What is the alternative? What is the best Windows development tool alternative to Microsoft? Is it hard to deploy a Windows app to the Microsoft Store? Do I need to use Microsoft tools to develop Windows apps? Did you know how easy it is to design beautiful desktop and mobile app UIs with RAD Studio? RAD Studio’s award-winning VCL and FMX frameworks are the best options in the GUI app development market. With hundreds of visual and non-visual components (packages of ready-made functionality and code) available to Delphi and C++ programmers alike, you can create complex and responsive applications in no time. RAD Studio IDE gives you a great environment to prototype and build applications.  Here, in the article linked below, we show you how to create great Windows apps in 2022. Difference between Windows 10 and Windows 11 app development How to improve Windows apps How to use AI in your Windows apps How to modernize UI and UX with futuristic styles How to update data access pipeline How to use WinUI 3 Are Delphi programs really stable? As Ian Barker, MVP, puts it, “Delphi’s biggest problem is that it is just SO GOOD at being silently successful.” Delphi programs are extremely stable – they run, in some cases for many years, without needing to be restarted coupled with an unparalleled ease of distribution – often just needing to […]

Read More

Alister Christie And Serge Pilko Talk Delphi, Part 3 of 3: Why Delphi, And Why a New Book

On 12 January Serge Pilko, Embarcadero MVP and founder of Softacom, a world leading Delphi software development services and software solutions provider, published a video of his interview with Alister Christie, author of the legendary “Code Faster in Delphi” and the creator of hundreds of videos that have shown many of today’s Delphi developers around the world how to program and accomplish things with Delphi. Download Code Faster in Delphi for free here Alister also has an upcoming book, “Code Better in Delphi”, scheduled to hit bookstores soon. We have chosen to publish the transcript of their conversation in a three-part series of blog posts, of which this is the third. Read Part 1 here Read Part 2 here Alister Christie And Serge Pilko Talk Delphi, Part 3 of 3 Alister So it’s a fairly easy read, and I’ve been trying to write short books. If you look at the old Marco Cantu books, they’re 800 pages or something like that, especially, they’re huge tomes. And you know, back in the day big books sold, but now I think the trend is for shorter books on targeted topics. So, there’s now books on design patterns and memory management and writing high-performance applications and stuff that are available. So you don’t get this huge book which kind of covers everything and only a little bit of detail. You get these highly targeted books on very specific topics. So you get to learn something in great detail rather than having to sort of work it out or for yourself, which is really good. I think that’s a really positive thing that’s happened over the last… probably starting with Nick Hodges’ books, Coding in Delphi, and then you know, More Coding in Delphi, and then there’s the Dependency Injection book. So, and yeah. You know,[inaudible] has written books and Primož Gabrijelčič has written a couple books and yeah, there’s now [inaudible] on all sorts of topics. So… Serge You’re my hero because you have to be such a self-motivated guy for writing a book because I have a similar dream, but I have such a lot of professional, like routines, like daily routines. Of course I will spend my time with family, relatives. I don’t know how you can do that, especially, but you even have cows and dogs, I don’t have cows… Alister Yeah, I have the advantage that I have a regular job now as well. So I’ve got all the time for tinkering with projects. In theory I’ve got a lot of time. It doesn’t seem to materialize, I seem to be spending a lot of time doing chores and, now I’ve got a two-year-old son, which is, you know, I’ve got a lot of time with him, which is good. Serge Okay. Talking about “Code Better in Delphi”, you mentioned the better cleaner code, but did you have an experience, like a migration like from a Delphi legacy project to up-to-date Delphi because it’s a little bit like migration and the better code and refactoring are similar things, so maybe there was an insight or idea for the book. Alister Yeah. Certainly a bit of code is generally easier to migrate because it’s generally more consistent and, and what have you. So yeah, if you’re doing, you know, if you’re trying […]

Read More

Custom extensibility for your Miletus application

One of the new features of TMS WEB Core v1.9.7.0 was custom extensibility for Miletus applications. But what is that exactly? To put it simply, if you are after a native API we did not cover or you have custom routines you’d like to move separately you can take advantage of dynamic libraries and write your own extensions! How it works? As the intro suggests a custom dynamic library will be needed. We’ve built in support for 4 different method types that can be used in dynamic libraries to execute them directly from a Miletus application. These are the following: procedure MyProcedureWithParameter(AData: PChar); cdecl; procedure MyProcedureWithoutParameter; cdecl; function MyFunctionWithParameter(AData: PChar): PChar; cdecl; function MyFunctionWithoutParameter: PChar; cdecl; And the corresponding promises to execute these methods are: //Resolves with nil in case of await() function ExecProc(ALibraryPath: string; AProc: string; AData: string): TJSPromise;  function ExecProc(ALibraryPath: string; AProc: string): TJSPromise; //Resolves with a string in case of await() function ExecFunc(ALibraryPath: string; AFunc: string; AData: string): TJSPromise; function ExecFunc(ALibraryPath: string; AFunc: string): TJSPromise; It’s also possible to assign a callback that can be used to send custom messages to the Miletus application at any time. The only requirement for this is to implement RegisterCallback: type   TCallback = procedure(AMessageID: Integer; AData: PChar); cdecl; var   MyCallback: TCallBack; const    MYID = 123; procedure RegisterCallback(AFunction: Pointer); cdecl; begin   @MyCallback := AFunction; end; procedure MyProcedure; cdecl; begin   //Do something and call MyCallback   MyCallback(MYID, ‘{“Name”: “My data”, “Value”: “This is my JSON formatted data”}’); end; To capture the messages sent via the callback, use the MiletusCommunication.OnCustomMessage event. And of course let’s not forget that you can load a library by calling LoadLibrary(ALibraryPath: string) and unload it by UnloadLibrary(ALibraryPath). With all the puzzle pieces layed out, let’s see how to arrange them into a nice picture. Let’s see an example In our small example we’ll take a look at how to expose the GetUserNameW Windows API to a Miletus application. Keep in mind this is for Windows only! If you want to extend your dynamic library to get the current username for macOS or Linux too, you’ll need to use/implement the OS specific calls for those platforms as well. After creating a new dynamic library project in the Delphi IDE we’ll see an empty template. From here we only need to add one function that returns the result of GetUserName from the Winapi.Windows unit. library DemoLib; uses   System.SysUtils,   System.Classes,   Winapi.Windows; {$R *.res} function GetCurrentUsername: PChar; cdecl; var   buf: array[0..255] of Char;   bufsize: DWORD; begin   bufsize := SizeOf(buf);   GetUserName(buf, bufsize);   Result := buf; end; exports   GetCurrentUsername; begin end. The next step is to use this newly created library from our Miletus application. To keep the application simple, we’ll add a TWebLabel and use that to greet the user when the application starts. As mentioned above we can call the methods directly from the dynamic library via promises. This means we’ll need to mark the TMiletusForm.OnCreate event implementation as [async], which allows us to await the results of our async calls. [async] procedure MiletusFormCreate(Sender: TObject); Now we can use the TMiletusForm.OnCreate implementation to await the LoadLibrary and ExecFunc promises. LoadLibrary resolves with a Boolean value which indicates success of the library loading. ExecFunc resolves with a string that is the result from the DLL. […]

Read More

Automatically work with data backup in the cloud from your Delphi app

Automatically accessing files in cloud storage, making backups, sharing files with other users, distributing application resources via a cloud storage service … all these use-cases became a common practice in recent years. And with TMS FNC Cloud Pack, this becomes easy and seamless to add it to your Delphi VCL Windows applications, cross-platform FireMonkey applications for Windows, macOS, iOS, Android and Linux or TMS WEB Core web client applications. Our colleague Holger Flick explains how you can easily automate access to files stored in the cloud, on the biggest and most well-known cloud storage service providers. What’s more, when you write code once for a given cloud storage service, you can, with just switching properties, change to another cloud storage service provider and use 100% the same code. This includes Dropbox, Google Drive, Microsoft OneDrive, Hubic, Box, … This way, you can even let your end-users decide with what cloud storage service they want to work.  See how it works step by step in this new “How it works with Holger” video: Get started today Discover how TMS FNC Cloud Pack can save you tons of work and start taking advantage of cloud services seamlessly. TMS FNC Cloud Pack can be used simultaneously on these frameworks TMS FNC Cloud Pack can be used simultaneously on these operating systems/browsers TMS FNC Cloud Pack can be used simultaneously on these IDEs

Read More

6 Steps To Finding The Perfect JavaScript Grid

If you are an IT professional, you’ve probably heard of JavaScript, which is the most popular programming language that helped shape and implement changes to the World Wide Web into the form we know and love today. It is a force to be reckoned with, with over 97 percent of websites employing it and a large array of resources available via third-party libraries. Because it is crucial to the purpose of programming, you would have come across JavaScript Grid when utilizing JavaScript. It’s a type of user interface element that displays data in a tabular manner. Even though grids have been popular for a long time and have been in use for an extended period, their use is becoming more common, particularly in online Web App user interfaces. Every machine in the JavaScript Grid must do some work using software or a program. The aforementioned application splits the job among people by breaking it down into reasonable chunks so that everyone may work on his or her assigned duty. As a result of this division of labor, the hierarchy of the system becomes more organized, and small-scale sub-projects may be combined to execute large-scale projects when they are completed. Continue reading to learn more about the 6 steps to obtaining the ideal JavaScript grid and the essential characteristics to search for while making your decision. What Are the Steps to Finding the Ideal JavaScript Grid? In the Modern world of IT today where programming languages reign supreme and unmanaged workload is the biggest issue you seldom need a JavaScript Grid where you can divide and conquer the projects easily. Here we explain key steps and features which should look out for when finalizing your choice for JavaScript Grid. How to End Lack Of Versatility? Versatility is one of the most important characteristics to seek in a good JavaScript Grid. A multi-purpose and customizable Grid tool will increase your chances of success while also assisting you in effectively managing your task. This will guarantee that your data is not only properly structured, but also compatible with a wide range of browsers and devices, including PCs and mobile phones. Because each screen is distinct in size and has its own set of needs, a flexible tool ensures that your reputation is never jeopardized by precisely scaling and regulating the layout. How Fast Data Processing Impacts App Development? When dealing with large amounts of sensitive data that must be sorted and managed, fast data processing rates are critical. Sencha’s Ext JS is our recommendation since it is unparalleled in terms of functionality and crushes the competition. It not only guarantees that the grid loads and manipulates data sets in milliseconds, but it also assures that data processing is lightning fast thanks to a client and server-side buffered stores. It’s incredible how quick it is since standard vendors are 300 times slower than Sencha’s Ext JS. When your reputation is on the line, you can’t afford to take chances instead of opting for the best. Why Flexibility Ensures Cost-Efficiency? To organize and maintain your data while having the flexibility of cutting costs is a dream come true. But this is possible now, due to Ext JS which not only handles data requests from both local and remote data sources through Ajax, JSON, and RESTful […]

Read More

Native Windows Development Clean Code Has A Dirty Secret

There are many benefits of using clean code for native windows development, but increased productivity might be the most important. A productive development tool will save developers time and effort. Moreover, it will also minimize system downtime and customer frustration due to lower error counts. But clean code has a dirty secret. In an interesting article on TechCrunch, “Why productivity gains will define success for developers this decade,” the writer describes developers’ productivity as the number one reason for the success or failure of any native windows development tool. Let us review some key points from this article and the resulting insights. What is common between Schrödinger’s cat and Moore’s law? There should be no link between these diverse concepts, but it is interesting to observe that both Schrödinger’s cat and Moore’s law are dead and alive simultaneously. Moore’s law is alive because RAW CPU speed doubles every 18 months, but it is dead because end users’ software performance is slower and slower. If the complexity of the original problem is not doubling every 18 months, then who is killing Moore’s law? The biggest reason behind this sluggishness is bloated software. For example, a 6KB webpage of yesterday is well over 6MB containing all kinds of files, cookies, and JavaScript libraries ironically called “assets.” First-generation programmers knew bigger was not better, but careless design and relentless resources usage are prevalent today and, in many cases, those early lessons have been unlearned. Development tools like Electron are an obvious example of such methodology, requiring thousands of files and gigabytes of memory to perform a simple task. Everyone hates bloatware, but who creates them? Apart from the deliberately created bloatware, there is only one reason for this much bloatware to exist: Bloated development tools make bloated software. In the article, under the title, is the bloat sustainable we read that there has been an excessive growth in development tools in the last decade. We came a long way from pseudo-intelligent functionality generators to projects like GitHub’s CoPilot. Although AI-assisted coding is in its initial stages, the future looks promising. But all these tools assisting developers also means that programming is much more complex than in the past. We have come a long way from a simple product catalog to today’s complex shopping apps. Unfortunately, all this development has unwanted side effects. Thus many development systems and shippable code are becoming more and more bloated with every new version. If we do not choose our development IDE carefully, we will be part of the problem. How to find the right native windows development tool? The solution to the above problem is very simple. As most bloatware results from bad design and poor development tools, we can move towards the best available. Embarcadero’s RAD Studio is the top development tool to increase the developer’s productivity and is also very tight on quality control. Everything is available for the developers, but the generated output will only contain the minimum code needed for the required functionality. This optimized solution is excellent for performance and productivity and requires easier shipment and reduced maintenance costs. What is the meaning of productivity? This article raised another thought-provoking point under the title: What does productivity mean in software development? Traditionally, most People think that free software is excellent because it […]

Read More

Why You Should Focus on Improving Windows 10 Apps Development

It seemed like many people thought Windows 7 was great and Microsoft should stop there. However, Microsoft recognized that what people thought of as their primary computing device was changing. Apple’s iPad and the inexorable rise of the mobile phone meant people were starting to interact with the internet and the new streaming services in ways which threatened Microsoft’s traditionally desktop-bound Windows operating system. Microsoft’s response was Windows 8 which brought with it a new user interface paradigm which leaned hard on the lessons learned targeting mobile tablets: simplified user interface, touch-friendly controls, flatter, simpler UI elements. Windows 8 was to intended to be a new era where non-PC devices such as an XBox would merge with desktops running Windows 8, MS’ own Microsoft Surface tablet/touch friendly devices and the beleaguered and ultimately doomed Microsoft Surface phones. While the idea of “one Microsoft operating system user interface to rule them all” eventually floundered – the Microsoft phones which were hugely loved by their users but failed to ignite enough sales to capture the interest of the carriers – the experience ushered-in some magnificent changes and new technologies that helped thrive with Windows 10 like WinRT (Windows Runtime – Language-Independent Application Binary Interface). This gave rise to a better Windows 10 app development environment for developers.  How did Windows 10 make things better for developers? Applications built with Windows Runtime may run inside a sandboxed environment to allow greater security and stability and can natively support both x86 and ARM. To point out, you can use highly productive development tools like Delphi and C++ Builder to create modern Windows applications that support Windows Runtime among other new sets of features. What is the difference between Windows 10 and Windows 11 app development? Windows 11 operating system promises massive changes with various user experience transformations.  The new Microsoft Store New native features for Windows apps The Fluent Design System and WinUI Advanced technologies for the Game Development industry It seems like a significant number of Windows users are staying with Windows 10 either because they are concerned about change and wish to seek stability, or they are shut out due to Windows 11 having a more rigid set of hardware requirements which many devices cannot meet. How to improve your Windows Apps Before discussing improvement, I would like to discuss Embarcadero’s Delphi and Visual Component Library briefly. With its Visual Component Library (VCL), Delphi programming language brought new graphical user interface development concepts. Using Delphi and VCL, you can achieve 5x faster development and a massive pool of components to thrive in any development field.  By creating with Delphi and VCL, you can make native Windows-based applications with direct access to the hardware. Be sure to check out this article called: What You Need To Know – A Beginner’s Guide To Windows UI Toolkits. Improve your Windows Apps by adding this sophisticated feature which is actually easy to do Start using AI in your Windows applications! AI is one of the most significant trends in the app development industry. You do not need to create new machine learning models to use in your Windows apps. You can use AI APIs from Cloud Computing platforms like Google, APILayer, DeepAI APIs, and other services. Be sure to check out this tutorial to learn how to integrate those AI APIs! Quickly modernize your user interface […]

Read More

Android on Windows 11: A Developer’s Perspective

Webinar on Wednesday, March 2nd, 2022 at 11 AM CST The Windows Subsystem for Android (WSA) brings native Android applications to the Windows 11 desktop. Learn how to set up and configure Windows Subsystem for Android for use in software development. See what is required to run WSA as well as what is required to target it from your Android development. Windows Subsystem for Android is available for public preview on Windows 11. I’ll be joined by special surprise guest Scott Hanselman.  Come back to this blog post for slides, links, and the replay.

Read More

Calculate square meters of an area in your favorite map service

TMS FNC Maps v3.0 brings a major new feature (more about HTML/CSS element containers in this blog), but along with it, a lot of smaller fixes and improvements. Basically each update brings quality of life improvements. Moving forward from the legacy TMS WebGMaps & WebOSMaps, which were based on the deprecated Internet Explorer technology, we need to port features that were available in those products. We always ask ourselves the question whether those features were implemented in an easy and intuitive way and with TMS FNC Maps our goal is to strive towards a more complete experience by analyzing each feature and then implement it in a way that benefits your application and the developer behind it. One of those improvements is a function that allows polygon area calculation. GeoJSON Polygons in TMS FNC Maps can be displayed by adding a collection of coordinates. Typically, those coordinates come from a database, or a file, or requested from a REST service in GeoJSON format (https://geojson.org/). In this sample, we used the coordinates of Germany. The code below demonstrates how to load GeoJSON data from a file. TMSFNCMaps1.BeginUpdate; TMSFNCMaps1.LoadGeoJSONFromFile(‘germany.geojson’); TMSFNCMaps1.EndUpdate; This will render the following polygon on the map. (map service used in the screenshot is MapBox) The polygon appearance can be changed. The code below demonstrates how to change the opacity of the polygon as well as fill and stroke color. var p: TTMSFNCMapsPolygon; begin p := TMSFNCMaps1.Polygons[0]; p.FillOpacity := 0.4; p.FillColor := gcGreenyellow; p.StrokeOpacity := 0.4; p.StrokeColor := gcGreen; Measuring the area The purpose of this blog post is to show how to calculate the polygon area in square meters (or square kilometer in the demonstrated sample). In the unit *.TMSFNCMapsCommonTypes.pas there is a MeasureArea function that accepts an array of coordinates. We already loaded our polygon from a GeoJSON file and have the coordinates available. var p: TTMSFNCMapsPolygon; m: Double; begin p := TMSFNCMaps1.Polygons[0]; //calculate area in square kilometers m := MeasureArea(p.Coordinates.ToArray) / 1000000; Displaying the results We now have the area in square kilometers of our polygon area. We can display it anywhere in our application, but this sample would not be complete without a demonstration of one of the most exciting features since TMS FNC Maps v3.0. For displaying the results, we chose the Element Containers feature (see this blog for more information). The complete code snippet can be found below as well as the final result. procedure TMapForm.RenderPolygon; var p: TTMSFNCMapsPolygon; m: Double; h: TStringList; e: TTMSFNCMapsElementContainer; begin TMSFNCMaps1.BeginUpdate; TMSFNCMaps1.LoadGeoJSONFromFile(‘germany.geojson’); TMSFNCMaps1.EndUpdate; p := TMSFNCMaps1.Polygons[0]; p.FillOpacity := 0.4; p.FillColor := gcGreenyellow; p.StrokeOpacity := 0.4; p.StrokeColor := gcGreen; //calculate area in square kilometers m := MeasureArea(p.Coordinates.ToArray) / 1000000; h := TStringList.Create; try h.Add(‘The surface area of Germany is approximately ‘ + Format(‘%.0f km²’, [m]) + ”); e := TMSFNCMaps1.AddElementContainer(h, nil, nil, poTopRight); e.UseDefaultStyle := False; finally h.Free; end; TMSFNCMaps1.EndUpdate; end; procedure TMapForm.FormCreate(Sender: TObject); begin TMSFNCMaps1.HeadLinks.AddStyleSheetLink(‘https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css’); TMSFNCMaps1.HeadLinks.AddScript(‘https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js’); TMSFNCMaps1.HeadLinks.AddScript(‘https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js’); TMSFNCMaps1.ReInitialize; end; Excited? Go ahead and download TMS FNC Maps. Explore the features and demos and feel free to leave a comment on this blog.

Read More