FMX

#WEBWONDERS : Using device tech from your web app

In todays #WEBWONDERS blog, we uncover two new components from the latest TMS WEB Core v1.8.2.0 release that show how easy it is to access device hardware. As a bonus, there is a small free component based on one of these new system functionality components. Speech synthesis To bring your message with an extra touch, you can these days easily take advantage of speech synthesis that is built-in in any modern browser. The browser offers an API for it and a new TMS WEB Core non-visual component makes it extremely easy to use. It is literally not more difficult that dropping the component on the form and call: WebSpeechSynthesis.Speak(‘It cannot be easier to make me speak’); There are some additional settings that let you further customize this. If you do not like the default voice the browser offers, you can change the voice pitch and rate with the WebSpeechSynthesis.Pitch and WebSpeechSynthesis.Rate properties. And there is more, most browsers will offer different voices you can select from. The WebSpeechSynthesis component retrieves the available voices and makes these accessible via the WebSpeechSynthesis.Voices: TStringList property. This holds a descriptor name for the different voices offer and this descriptor name can be set toWebSpeechSynthesis.Voice to select another voice. Of course, you will want to experience this speech synthesis yourself first hand, so head-over to our demo and have fun playing with it or watch a recording Device orientation Most modern smartphones and tables come these days with a built-in device orientation sensor. And the modern browsers running on these devices already offer access to this sensor. So, in the same philosophy where the VCL offers Windows system functionality via components, TMS WEB Core offers browser functionality via easy to use components. The new TWebDeviceOrientation component is extremely simple to use. Drop it on the form, call the WebDeviceConnection.Start method to start retrieving the sensor info and the event OnHeadingChange is triggered whenever the physical orientation of the device changes. It returns in degrees the direction of the device.  Now, we have created a small free component that turns the non-visual device orientation sensor component into a visual compass component. You can use this easily from a TMS WEB Core web client application by including the unit WEBLib.Compass in the uses list and create the component:   compass := TWebCompass.Create(Self);   compass.Parent := Self;   compass.Top := 10;   compass.Left := 10;   compass.OnClick := CompassClick; Here the component is created and from an event handler for clicking the compass, the compass will start to capture the device orientation sensor info: procedure TCompassForm.CompassClick(Sender: TObject); begin if not compass.Started then begin compass.Start; end; end; One important notice: for the device orientation sensor data to be available for your web app, the app needs to be hosted on a HTTPS enabled domain! You can discover this demo from a device with such device orientation sensor here or watch this replay: Free compass component Finally, a small word about the free component to visualize the device orientation info via a compass. This is basically a visual component (so, it descends from TWebCustomControl) that shows a picture of a compass (a default one or a customized one) and internally, a non-visual TWebDeviceOrientation component is created and its OnHeadingChange event is handled by the component. From this event handler, a transform […]

Read More

TMS WEB Core for Visual Studio Code v1.8.2 released!

We are excited to announce the new TMS WEB Core for Visual Studio Code v1.8.2 is released! This new release brings following main new features: Project repository Miletus cross-platform desktop applications Framework sync with TMS WEB Core for Delphi All latest new features, enhancements from TMS WEB Core for Delphi 1.8.2 Project repository From the new project repository, it is possible to select the type of application you want to create from TMS WEB Core for Visual Studio Code. But you can as well create your own project templates and add these to the project repository. The new repository brings a convenient way to manage the many types and your custom project types that TMS WEB Core offers. Miletus cross-platform desktop apps Miletus technology allows you to create cross-platform single executable desktop applications for Windows, macOS and Linux based on web technology. This means highly reusable code, access to a wide range of existing web libraries and taking advantage of the rich rendering capabilities of HTML5/CSS3 and use application style templates to give your applications that extra look & feel.With this new release, whether you develop on a Windows machine, macOS device or Linux computer, you can create from your development machine executables for any of the three supported operating systems! See here what Miletus technology can do for you in this video: or learn more from a previous blog article. Framework sync From this new TMS WEB Core for Visual Studio Code release, update releases of TMS WEB Core for Delphi and TMS WEB Core for Visual Studio Code will come in sync. As the TMS WEB Core framework itself is now 100% identical between TMS WEB Core for Delphi and TMS WEB Core for Visual Studio Code, you can easily choose what IDE to use and we do not want to let you wait on framework updates if you use any of the two IDEs. From now on, we will release both versions together. New v1.8.2.0 framework features With this new release, you have all the new features that are also in the TMS WEB Core for Delphi release. This means the new components TWebDeviceOrientation, TWebSpeechSynthesis, TWebConsoleLog, TWebChatBox, TWebRatingControl are now all included as well as several features added to the WebGoogleMaps component or enhancements in the grid, treeview and some more. Check the version history for all details. Get started! Users with a TMS ALL-ACCESS license have instant access to the newest TMS WEB Core for Visual Studio Code release. For new users, there is now a fully functional* trial version to explore what new horizons you can discover with RAD, Object Pascal, component based development. (* Debugging from framework source code is not possible with the trial version)

Read More

What’s new in TMS FNC Maps v2.0

Introducing the TTMSFNCRouteCalculator component, OpenLayers polyline labels and Google Maps geodesic polylines with the release of TMS FNC Maps v2.0. Route calculator with map interaction The new TTMSFNCRouteCalculator component lets you create and edit routes based on existing directions and geocoding services. Routes can also be imported from GPX and exported to GPX. The TTMSFNCRouteCalculator allows you to create a new route, add, update and remove waypoints or segments. This standalone component can be used to manage routes programmatically, then save or export your routes for later use. The following directions & geocoding services are supported: Azure, Bing, Google, Here, MapBox In combination with TTMSFNCMaps routes can be created, edited and displayed by interacting with the map.Simply assigning a TTMSFNCRouteCalculator to the TTMSFNCMaps component will enable the map interaction as well as extra methods and events. TMSFNCRouteCalculator1.Active := True; TMSFNCMaps1.RouteCalculator := TMSFNCRouteCalculator1; The following mapping services are supported: Google Maps, Here, OpenLayers    The steps below require no additional code at all, this is done by interacting with the map only. Now the first step is to pick a start location with a single click on the map. The second click will set the first waypoint for your route Then every subsequent click will add a new waypoint Drag and drop an existing segment to insert a new waypoint Drag and drop an existing waypoint to a new location Waypoints and segments can also be selected and optionally removed from the route OpenLayers polyline & polygon labels It’s now possible to associate a label text with a polyline or polygon in TTMSFNCOpenLayers. This feature is currently only available for: OpenLayers This sample demonstrates how to add a label text to an existing polyline, configure the label’s appearance and position, then make sure the polyline is updated on the map. TMSFNCOpenLayers1.BeginUpdate; TMSFNCOpenLayers1.Polylines[0].&Label.Text := ‘Route from New York to Washington’; TMSFNCOpenLayers1.Polylines[0].&Label.FontColor := gcRed; TMSFNCOpenLayers1.Polylines[0].&Label.FontSize := 18; TMSFNCOpenLayers1.Polylines[0].&Label.OffsetX := 170; TMSFNCOpenLayers1.Polylines[0].Recreate := True; TMSFNCOpenLayers1.EndUpdate; Google Maps geodesic polylines Another new features is the possibility to display geodesic polylines with Google Maps. This feature is currently only available for : Google Maps Just set the polyline’s Geodesic property to True to make it display as a geodesic line. TMSFNCGoogleMaps1.Polylines[0].Geodesic := True; That’s it for this TMS FNC Maps v2.0 update. I hope you’ll enjoy all these exciting new features!

Read More

Code completion on steroids for Object Pascal

At the end of June, Microsoft revealed its GitHub Copilot project. The Microsoft GitHub Copilot project is a sort of AI driven code completion on steroids. It’s both amazing and controversial at the same time and for sure generates a lot of debate among software developers.  Regardless of the opinions, it is for sure an interesting enough technology for us to investigate and José Leon Serna, our chief architect of the TMS WEB Core for Visual Studio Code project, investigated if the Microsoft GitHub Copilot could have any meaning for us, Object Pascal developers.  And surprisingly, it is already feasible to use the Copilot AI for Object Pascal developers from TMS WEB Core for Visual Studio Code as you can see and enjoy in this video from José:  as well as this video, exploring next steps in AI assisted code completion: If you signup for getting Copilot access, you could already experiment yourself with this new technology from TMS WEB Core for Visual Studio Code. We are for sure living in interesting times with possible changes having an impact on our lives all the time on the horizon! We’re curious to hear what is your take on AI starting to play a role in the software development process?

Read More

TMS FNC Core update: Printing and Design-time Editors

Included in the version 2.6 release of the TMS FNC Core package is a print library that is capable of creating files and send them to the printer. And two design-time editors to make it easier to customize the TTMSFNCGraphicsFill and TTMSFNCGraphicsStroke in your FNC products. The print library supports creating documents, adding pages and page content such as HTML formatted text, plain text, drawing primitives and images, with practically the same code on all different frameworks. This has been implemented on three different levels. The lowest level of implementation for the print library is the use of TMSFNCPrinter, this is done in a similar way as TPrinter is used on VCL, Lazarus, FMX Windows and MacOS. With TMSFNCPrinter there is now support for FMX Android and iOS and for TMS WEB Core. The difference with TPrinter is that the drawing should be defined in the OnDrawContent procedure.  uses …, FMX.TMSFNCPrinters, FMX.TMSFNCGraphicsTypes; procedure Click(Sender:TObject); begin TMSFNCPrinter.OnDrawContent := procedure begin TMSFNCPrinter.Graphics.Font.Color := gcBlue; TMSFNCPrinter.Graphics.Font.Size := 40; TMSFNCPrinter.Graphics.DrawText(0, 20, TMSFNCPrinter.PageWidth, 100, ‘Hello’, False, gtaCenter, gtaCenter); TMSFNCPrinter.Graphics.Fill.Color := gcRed; TMSFNCPrinter.Graphics.DrawEllipse(100,200, TMSFNCPrinter.PageWidth – 100, 300); TMSFNCPrinter.Graphics.DrawBitmap(50,400,TMSFNCPrinter.PageWidth – 50, TMSFNCPrinter.PageHeight – 50, Image1.Bitmap, True, True); TMSFNCPrinter.EndDoc; end; TMSFNCPrinter.BeginDoc; end; On top of the TMSFNCPrinter, there is the TMSFNCGraphicsPrintIO component, which gives the ability to further define the layout of the document with a header, footer and page number and to add certain FNC components. The TTMSFNCRichEditorPrintIO and TTMSFNCGridPrintIO are added In the TMS FNC UI Pack. These components have some additional properties to make the export of the TTMSFNCRichEditor or TTMSFNCGrid even more customizable. Working with FNC controls should be fast and simple. And for that reason we’re adding two new design-time editors in TMS FNC Core. These help with setting the properties for the TTMSFNCGraphicsFill and TTMSFNCGraphicsStroke.

Read More

New hands-on book for Delphi Devs

We’re very happy, proud and relieved that we can inform that the newest book in the series “Hands on with Delphi” is available for purchase now via Amazon. It’s the newest seminal work from our colleague and evangelist Dr. Holger Flick for Delphi developers. It has been over 9 months in the works and it is the biggest book so far in the “Hands on” series, counting 467 pages!  The past months have been extremely hard and focused work for Holger assisted by our developer team to help Holger understand and uncover every little detail in the many controls, components, libraries that are handled in the book. Book theme The central theme in the book is data access & visualization, something all Delphi developers deal with on a daily basis when creating applications. There is a large section on grids as this is a commonly used control for visualizing & manipulating data. There is of course also a lot of attention on multi-tier and REST based access to databases as this is typically where the data comes from in the first place. And there are some lesser-known and newer areas in connection to creating data visualization apps like using vector graphics (SVG) in Delphi apps or use brand new Miletus web technology for creating desktop data visualization apps! In a nutshell, there is enough content to learn many new techniques to create better Delphi applications during this summer period.     First test hard-copy edition of the book                                      Official book cover How to order The book is internationally available in all international Amazon stores: Book recognition Last week, we also got the heartwarming news that the first book about TMS WEB Core from Dr. Holger Flick was recognized in the list of “Best web application books of all time“. It is not only nice that the book from Holger appeared in the list but it is even more remarkable that a web application book for Delphi developers is in this list as most books are on JavaScript, TypeScript, Java, PHP, ASP.NET, etc….  In fact, it is the only book that relates to Delphi in the list. Quite a noteworthy feat from Holger we think! Fwiw, this book is of course also still for sale internationally via Amazon: Amazon USA Amazon UK Amazon Germany

Read More

Delphi Community Edition 10.4.2 & TMS Academic program

Earlier this week, Embarcadero published the newest version of the Delphi Community Edition v10.4.2! It is fantastic news that students can now freely and easily discover the latest & greatest Object Pascal RAD component based development IDE. Navigate to https://www.embarcadero.com/products/delphi/starter to get your free Delphi Community Edition v10.4.2.And your red carpet into the wonderful world of Object Pascal programming doesn’t end here. We have our TMS Academic Program where we offer free & fully functional versions of several products for students and teachers. Immediately supercharge your Delphi Community Edition with several of our free academic products. TMS WEB Core v1.8.0.0 Academic  Yesterday we have released the major update v1.8 Sirolo of TMS WEB Core. Today, we are happy to announce that the TMS WEB Core Academic version was also updated to v1.8.0.0.  A summer of learning With Delphi Community Edition and TMS Academic products, you’re in a first class seat to fill your long hot summer with expanding your horizons. Embarcadero helps you even more with the Summer Camp 2021 and don’t forget to keep an eye on our free webinars at TMS Web Academy. Enjoy!

Read More

TMS WEB Core v1.8 Sirolo in videos

Yesterday we released TMS WEB Core v1.8 Sirolo. You can read all about this exciting new release that extends our Miletus technology to macOS and Linux among many other new features. We have already prepared several videos to let you discover the new features via video in addition to the usual text information. In this blog, we bundled a fresh new series of videos we already have: TMS WEB Core Miletus goes cross platform TMS WEB Core new chatbox control TMS WEB Core new rating control Get started – Learn – Stay tuned Start: Either use the TMS WEB Core trial version to explore new territories for your Object Pascal development, or if you are a student get the brand new Delphi Community Edition v10.4.2 and supercharge it with TMS WEB Core Academic. Learn: Watch webinar replays, read blog posts, get new books Stay tuned: A lot of things are cooking in the labs, it’s getting really hot in the kitchen, we have a couple of surprises coming up. Watch this blog to discover it first.  

Read More

TMS WEB Core v1.8 Sirolo released

TMS WEB Core v1.8 Sirolo is released! We are excited to inform that TMS WEB Core v1.8 Sirolo is released today. This new version is the result of months of hard work of the team to bring several new milestones. Take advantage of the summer-time to expand your horizons and dive into the wonderful web world for Object Pascal developers. Here is a brief overview of the core new features included in TMS WEB Core v1.8  1) Miletus support for macOS and Linux After Miletus targeted Windows in TMS WEB Core v1.7, our team now accomplished the phenomenal next step to create cross-platform web technology based desktop applications for Windows, macOS and Linux. And all that with a minimal footprint. On Windows and Linux this means single executable file apps and for macOS the typical application folder but also here with a single application executable file. Deployment can be done via ultra simple XCOPY deployment. In a nutshell, you can create desktop applications from a single source code base from your Delphi IDE on Windows. You do actually not need an Apple mac machine or Linux box to create these applications. The GUI of these applications is rendered in the browser and therefore empowered by HTML5 and CSS3. You can take advantage of existing web application templates to create stunning GUIs. Not familiar with Miletus? You can learn all about it from this webinar replay 2) New Miletus Interbase and Firebird local database support In this new version, we added two more possible local databases that can be directly used from a Miletus application and that is Interbase and Firebird. No need here to create a REST API interface, you can directly connect a client dataset to local databases. In v1.8 this is now: MS Access, MS SQL, mySQL, SQLite, Interbase and Firebird.               3) Miletus support to access INI files, registry, OS version info Convenient for storing application settings, INI files or registry is what developers frequently use. So, from a Miletus app you can now easily access these INI files and the registry in the same way as you can from a VCL or Firemonkey application. Of course, there is no registry on macOS or Linux and here there is automatic fallback on INI files. In addition, a new API is added to retrieve operating system version information about the operating system where the Miletus executable is running. 4) Two new UI components: chatbox + rating control We have added two new controls to TMS WEB Core v1.8. This is a chatbox control and a rating panel. With the TWebChatbox control, you can write web chat applications with little to no code. Drop this component on the form and all you need to do is write some lines of code to send the message to your chat server of choice or receive messages from there. The other new component is the TWebRatingPanel. This is the classic UI pattern of rating via clicking a number of stars (or other icons of choice). The rating panel offers setting rates in units of 1, 0.5 or fully fractional. 5) SHA1 hashing support in the TWebCrypto component As SHA1 is still from time to time needed in specific communication protocols, we extended the TWebCrypto component that is internally using […]

Read More

TMS WEB Core v1.8 Sirolo beta available

TMS WEB Core v1.8 beta is here It was of course highly anticipated and awaited, this new version of TMS WEB Core v1.8 named Sirolo. Sirolo is a small but beautiful town along the Italian coast at the Adriatic sea. After city Ancona (name of TMS WEB Core v1.7 release), it is a nearby little town the Mille Miglia race in 1955 crossed. Other than the reference to this beautiful place, what does TMS WEB Core v1.8 brings on the table for Delphi developers: 1) Miletus support for macOS and Linux After Miletus targeted Windows in TMS WEB Core v1.7, our team now accomplished the phenomenal next step to create cross-platform web technology based desktop applications for Windows, macOS and Linux. And all that with a minimal footprint. On Windows and Linux this means single executable file apps and for macOS the typical application folder but also here with a single application executable file. Deployment can be done via ultra simple XCOPY deployment. In a nutshell, you can create desktop applications from a single source code base from your Delphi IDE on Windows. You do actually not need an Apple mac machine or Linux box to create these applications. The GUI of these applications is rendered in the browser and therefore empowered by HTML5 and CSS3. You can take advantage of existing web application templates to create wonderfull GUIs. Not familiar with Miletus? You can learn all about it from this webinar replay 2) Extended Miletus local databases support In this new version, we added two more possible local databases that can be directly used from a Miletus application and that is Interbase and Firebird. No need here to create a REST API interface, you can directly connect a client dataset to local databases. In v1.8 this is now: MS Access, MS SQL, mySQL, SQLite, Interbase and Firebird.               3) Miletus support to access INI files and registry Convenient for storing application settings, INI files or registry is what developers frequently use. So, from a Miletus app you can now easily access these INI files and the registry in the same way as you can from a VCL or Firemonkey application. Of course, there is no registry on macOS or Linux and here there is automatic fallback on INI files. 4) Two new UI components We have added two new controls to TMS WEB Core v1.8. This is a chatbox control and a rating panel. With the TWebChatbox control, you can write web chat applications with little to no code. Drop this component on the form and all you need to do is write some lines of code to send the message to your chat server of choices or receive messages from there. The other new component is the TWebRatingPanel. This is the classic UI pattern of rating via clicking a number of stars (or other icons of choice). The rating panel offers setting rates in units of 1, 0.5 or fully fractional. 5) SHA1 encryption support in the TWebCrypto component As SHA1 is often needed in communication protocols, we extened the TWebCrypto component that is internally using the browser crypto API to also offer SHA1 support. 6) Lots of smaller improvements and new features Based on your feedback and that of our team, we did […]

Read More