TMS Software. All-Access

Sneak preview of what’s coming in FNC

Intro There are a lot of things going on in the TMS labs at the moment. We announced a lot of great improvements and new features for the upcoming TMS WEB Core 1.7 (https://tmssoftware.com/site/blog.asp?post=772) as well as a couple of past and future platforms FNC runs on (April Fools’ Day joke …). Today we are proud to announce a new platform is coming for FNC. (NOT an April Fools’ Day joke !). Sneak preview Before we want to announce exactly which platform is going to be supported in all it’s glory, here is a sneak preview. What’s coming? FMXLinux official support is coming in the near future! We are currently working hard to make all FNC components compatible with FMXLinux which means there will be a TTMSFNCWebBrowser based on WebKit (https://webkitgtk.org/), a REST based TTMSFNCCloudBase working with Curl (https://curl.se/), PDF export based on our own implementation and much much more! Of course, you can also expect all components that are working based on TMS FNC Core to have FMXLinux support. Stay tuned for more info coming real soon!

Read More

TMS FNC Maps v1.4 released!

What’s new?  The second TMS FNC Maps update of 2021 includes integrated directions for Google Maps and MapKit along with map rotation in TTMSFNCMapKit. Introducing TTMSFNCMapKit A new stand-alone component for Apple MapKit JS is available in TMS FNC Maps v1.4.: TTMSFNCMapKit includes integrated directions and map rotation as component specific features with more to come in the near future. Integrated directions with step by step instructions TTMSFNCGoogleMaps and the new TTMSFNCMapKit component now include support for directions out of the box. All you have to do is drop one component on the form, assign a valid API Key and you’re good to go! Addresses and locations are geocoded automatically and the calculated route is displayed on the map with just a single line of code.     TMSFNCMapKit1.AddDirections(‘New York’, ‘Washington DC’); Optional configuration parameters are available including but not limited to: Polyline color and width Hide markers or polyline or both Indicate if travelling by car or on foot Also, step by step instructions and route details (displayed in the bottom-left corner of the screenshot below) are returned in an event.  Map Rotation Another new feature exclusive to the TTMSFNCMapKit component is the ability to rotate the map programmatically. Again with only one line code the rotation of the map can be changed.   TMSFNCMapKit1.Options.MapRotation := TMSFNCMapKit1.Options.MapRotation + 45; Update Now! Update now to get all the latest and greatest TMS FNC Maps updates and get started exploring the new features!

Read More

Your familiar HotSpot Image comes to the TMS FNC UI Pack v3.3

We have a new major release of the TMS FNC UI Pack, next to some fixes and new features, we have added the TTTMSFNCHotSpotImage to the already extensive set of powerful and feature-rich UI controls that can be used cross framework and cross platform with just one code base. TMS FNC Controls can be simultaneously used on these frameworks: TMS FNC Controls can be simultaneously used on these operating systems/browsers:TMS FNC Controls can be simultaneously used on these IDE’s:   TTMSFNCHotSpotImage This component is already known to VCL and FMX users and for the TMS WEB Core users who don’t know the component, you can compare it with the idea of an Image Map. The TTMSFNCHotSpotImage (further referred to as ‘hotspotimage’) gives you the ability to choose one image and then add different areas (hotspots) with which you can interact and each of them can have their own appearance. TTMSFNCHotSpotImageEditor Our team considers the convenience of visually creating and configuring your components, that is why an editor was created to help you design your hotspots. This can be done in designtime by a double click or right-click on the hotspotimage. To give you full control over your hotspotimage, the editor is also available in runtime. Hotspotimage Demo To let you get more familiar with the component, we have created a demo application that you can find here. This topic describes the steps we have taken to create such a demo application. It is a simple example of a selection game that shows a lot of features. You’ll need to find the correct country for a given capital. The TTMSFNCHotSpotImageEditor (further referred to as ‘hotspotimage editor’) can be used to create the hotspots of the different countries. All of the following can be done in the code as well. But to give an example of the possibilities, we will explain how to this visually. The image can be added in the editor or with the Bitmap property. On the top of the editor there is a toolbar that can be used to create or manipulate the poylgons. Because there is a high contrast and the edgy shape of the different countries, the Magic Wand was the perfect tool to create the polygons. In the panel on the right, you have the buttons ‘Hover’, ‘Selected’ and ‘Down’. With these buttons you can change the appearance for the different states. If none of the hotspots are selected in the listbox, then you are able to change the default appearance used on newly created hotspots in the different pages. On the other hand, if you select a hotspot, you can change the appearance for the specific hotspot. This way, I’ve changed the Fill kind of the polygon to a texture with an image of the flag. You can also change the stroke and font used by the hotspot. To change the name of the different hotspots, select the hotspot in the listbox, edit the text in the edit box and click on the ‘Change Name’ button. Now let’s have a look at the code that is used. Besides the code used to change the settings between game mode and normal selection mode, only two specific events are needed. The event OnSelectedHotSpotChange where the check is added to see if the selection is allowed.As it would not be helpful to unselect a hotspot while playing the game. […]

Read More

Workflow visualization and organization in FMX

Intro The multi-device, true native app platform The FireMonkey® framework is the app development and runtime platform behind RAD Studio, Delphi and C++Builder. FireMonkey is designed for teams building multi-device, true native apps for Windows, OS X, Android and iOS, and getting them to app stores and enterprises fast. source: https://www.embarcadero.com/products/rad-studio/fm-application-platform FMX (FireMonkey) released in 2011 and shortly after we delivered a first set of components. Today, we want to show you the TTMSFNCKanbanBoard component, a highly configurable workflow visualization and organization component. Features Below is a list of the most important features the TTMSFNCKanbanBoard has to offer. The features are not limited to this list, but this will give you a quick insight on what we offer to be able to create an application that visualizes a workflow environment in FireMonkey. Multi collapsible column support Filtering and Sorting Item autosizing HTML formatted text support Collapsible items Database adapter Drag & Drop support Editing support Fully customizable column & item appearance & custom Kanban board item drawing Optional header & footer per column Learn More! Want to learn more about what the TTMSFNCKanbanBoard can do? Here is a video that highlights some of the above features through a demo application. Download & Explore! The TTMSFNCKanbanBoard component is part of the TMS FNC UI Pack, which, on top of FMX, also offers the ability to write your code once and target other frameworks (VCL, LCL and WEB). You can download a full featured trial version of the TMS FNC UI Pack and start exploring the capabilities of the TTMSFNCKanbanBoard component. Coming up The TTMSFNCKanbanBoard is the fourth of a series of components that is covered to empower your FMX (FireMonkey) developments. We started the series with a general overview of the most important components that we have to offer, followed by the TTMSFNCRichEditor, TTMSFNCPlanner and the TTMSFNCTreeView. Next up will be the TTMSFNCGrid, a feature rich and powerful grid component.

Read More

REST API Server with Delphi and XData 5: Read and Watch

TMS XData 5 has been released with lots of new features! Photo by Glenn Carstens-Peters on Unsplash In addition to the recent release of TMS Aurelius 5, a new major version of TMS XData has been also released. TMS XData 5 is the fifth major version of our framework to build multitier applications, including REST API server, and interface-based API client. It makes it easy to build server-side services that reach a broad range of clients, including browsers and mobile devices. Among several features, TMS XData provides: Automatic serialization/deserialization of pure Delphi objects, primitive types, method parameters; Authentication and Authorization; Powerful routing mechanism: route endpoints to methods in your code; Automatic, zero-code Swagger/SwaggerUI support; Interface-based client allows type-safe client applications without additional code; Smooth TMS Aurelius integration allows CRUD endpoints of database entities automatically. The new features released with XData 5 were also antecipated in a previous blog post, The what’s new section in the documentation provides you with a full list, but here we will list a few: Attribute-based Authorization Developers will be able to just add authorization attributes to methods (service operations) or entities (automatic CRUD endpoints) and everything will be applied accordingly. Fine-tuning the protection of your REST API will never be as simple. [Authorize] IDocumentService = interface(IInvokable) procedure Insert(Value: TDoc); [AuthorizeScopes(‘user, editor’)] procedure Modify(Value: TDoc); [AuthorizeScopes(‘admin’)] procedure Delete(DocId: string); [AuthorizeClaims(’email’)] procedure Approve(DocId: string); end; In the example above, all methods (endpoints) require authentication, because the interface has an Authorize attribute that propagates to all methods. So, to invoke Insert, user must be authenticated. Still, to invoke Modify, the user must be authenticated and have either user or editor scope in its credentials. He must be admin to invoke Delete, and finally to approve a document, user must have an email in its claims. It’s also worth noting that the same strategy applies to entities that generate automatic CRUD endpoints: [Entity, Automapping] [EntityAuthorize] [EntityAuthorizeScopes(‘editor’, [TEntitySetPermission.Modify, TEntitySetPermission.Insert])] [EntityAuthorizeScopes(‘admin’, [TEntitySetPermission.Delete])] TCustomer = class {…} public property Id: Integer read FId write FId; property Name: string read FName write FName; end; To access customer endpoints, user must be authenticated. But he must have editor privileges to modify and insert (PUT and POST) and must be admin to invoke DELETE. Easy and straightforward. Async/Await Support in Web Applications TMS XData is smoothly integrated with TMS Web Core, the TMS framework to build web applications. Now your can use async/await mechanism in TXDataWebClient methods that invoke XData server endpoints. As an example, invoking a XData REST API endpoint asynchronously will be as easy as doing this: PendingOrders := await(XClient.List(‘$filter=Status eq pending’)); if PendingOrders.Count = 0 then Exit; // no pending orders to process The single line above will build the HTTP request with proper URL endpoint and HTTP method, invoke it, deserialize the returned JSON into a list of TOrder objects, and all asynchronously! The await function will guarantee that the next line will be executed only after the async execution is executed. Can’t get easier than that. Multitenant Servers This is a feature released with TMS Aurelius, which now has the global filter mechanism, allowing you to build multitenant applications. But XData now includes a few nice mechanisms to integrate with such Aurelius filters that makes building multitenant servers very easily! From a single handler for the event OnManagerCreate, you can […]

Read More

What’s coming in TMS WEB Core v1.7 Ancona

The new version v1.7 of TMS WEB Core has been in development for about 6 months by now. Many of its features were already in development in parallel to v1.6. And yes, our team already is working on v1.8! It will not come as a surprise to you that in v1.7 there are new game-changing features in TMS WEB Core also. Those who have been following the TMS WEB Core development since the first version TMS WEB Core v1.0 Brescia will know that we name the releases after cities along the famous historic race “MilleMiglia”. To be more precise, the legendary race of 1955. And as such, after we visited the city Pesaro with v1.6, for v1.7 we land in Ancona. The historical meaning of the word “Ancona” is elbow which is commonly associated with the shape of the coastline. After the ‘elbow’ Ancona, there are new sights towards the more southern coasts of Italy. Enough history! Let’s bring an overview of what our team has been working on for TMS WEB Core v1.7 Ancona. 1) Components wrapping browser API for local file access The W3C consortium proposed an API forlocal file access from Web browser applications and Google Chrome implements it already. Given that Microsoft uses the Google Chromium engine, it is also available in Microsoft Edge Chromium. With TMS WEB Core, you can take a head start, explore, and start using this with its three components today: TWebLocalTextFile TWebLocalBinaryFile TWebLocalFolder. These components allow you to directly open text and binary files from the local file system as well as traverse the local file system’s folder structure from a Web application. Of course, for security reasons, the users have to give their consent first. 2) Popup menu component and popup menu support in components In TMS WEB Core, we offered the regular TWebMainMenu since its inception and now we completed this trend with the new TWebPopupMenu. It works very similar to a Windows VCL TPopupMenu. Simply drop a TWebPopupMenu on your Web forms and assign it to control.PopupMenu to obtain an automatic context menu for controls. 3) USB device access The times that software developers thought you could never use a Web application for controlling your machine’s hardware are officially over. We already introduced support for Bluetooth with our TWebBluetooth component, and with this release we add two new components TWebUSBSerial and TWebUSBHID that allow you to write applications communicating with locally connected USB devices using a serial protocol or the HID protocol. This opens up a whole new field of applications that can be implemented using Web technologies. 4) TWebStringGrid & TWebDBGrid extensions We added a whole range of new grid features in TWebStringGrid and TWebDBGrid. There are now: Methods to insert & remove rows A range of different inplace editor types Cell merging and cell splitting Loading and saving to streams Loading from a stringlist with CSV data Direct access to grid data as TJSArray Add checkboxes to the grid 5) Async methods There is no way around it in the Web browser, there are different APIs that can only be used in an asynchronous way. The reason for this is very clear: Always guarantee a responsive UI even when lengthy operations are taking place in the application. Many developers struggle with implementing sequential logic for processes […]

Read More

Qualicodex Software: new TMS consulting partner

  We are proud to announce a new collaboration with the team from Qualicodex Software in Brazil to assist users of Delphi in combination with TMS products. From today, Qualicodex Software is our consulting partner for Portuguese and English speaking software developers and software development companies. Ivan Souza is a Software Engineer and a certified Delphi developer since the first version and professor of the Distributed Systems discipline at the West University of Santa Catarina, he started his career in the first versions of Object Pascal, even before Delphi and today he is always looking for updates on new technologies. He worked at Embarcadero Brasil as a Senior Consultant, is an active member of the Delphi community and coordinates the DelphiCodex channel on Youtube. He participated in several conferences and webinars, always providing high quality content to the community. In addition to consulting with Delphi, Ivan also has knowledge and expertise in the technologies that are used by incredible tools, like Web, application servers, databases, distributed systems, IoT, etc. He started his qualification in the tools of tmssoftware with TMS WEB Core, TMS XData and TMS Aurelius. At the moment he is developing an entire ecosystem where these tools are used together with the best in information processing environment (Linux, Desktop, Mobile, Databases, NoSQL, IA, etc …) This partnership is the beginning of a great friendship! Doing it with love, dedication and respect is the secret. Delphi is the key! At the same time, we would like to take the opportunity to mention that we still wish to extend our consulting partner network, foremost in the Asia area, Australia, Canada, South Africa. If you are Delphi developer with TMS component expertise and offering consulting services, get in touch and we will be happy to discuss how we can move forward!

Read More

Lambdas in FlexCel

As you might know, some months ago Microsoft released support for lambda functions in Excel. It was no small change: Lambdas turned the calculation engine into turing-complete, and they can change your spreadsheets in fundamental ways. The main reason why you might want lambdas is that they allow you to define user-defined functions in a spreadsheet, using only other formulas. No VBA or macros required. But Lambda functions are much more: they are real first-class functions that you can pass around. They can even do variable captures like a Lambda in C# or an anonymous method in Delphi. Even with them being only months old, there are a lot of articles and posts about them. So we will not repeat those here, and we will instead focus on a question that we have heard a lot lately: When is FlexCel going to support Lambdas? And the answer is, of course, today. But wait! Let me look at the date… and let me look at the other post today on this site about running FNC in a Sperry Univac Uniscope 200… What can I say? Lambdas weren’t supposed to ship on April 1st; they were supposed to ship weeks ago. But we kept finding small stuff to polish. As it is usual in FlexCel development, we wanted to cover all cases that we could and make sure everything worked as it should. And as it is usual too, we were late and I am writing this post in April 1st. You can download FlexCel 7.9 on our site, and start adding lambdas and lets everywhere. Just the usual advice: “With great power comes great responsibility”. As powerful as they are, it is simple to abuse them and end up with spreadsheets only a mother could love. Or understand. I’ve already seen pages-long lambdas written in many places, and one has to wonder how you are supposed to debug those formulas once something goes wrong. Right now, Excel tools for debugging lambdas are quite poor. Tales from the trenches Following a one post tradition, I am reviving the “tales from the trenches” section for this post. This is the section where I write about small details we find in our daily development. Of course, every day has a different tale, so I’ve chosen one at random to close this entry. Schrödinger parameter names. When we wrote the validation code for parameter names, we assumed that they would follow the same rules as Excel names. In particular, you can’t have a name that is also a valid cell reference. So you can’t have a name named “A1” or “R1C1”. You can’t either name a name “R” or “C” since that means “Full Row” and “Full Column” in R1C1 notation. But, while you can’t name a parameter “A1”, you can name it “C”. So how does this work? How does Excel know that when I write “=Sum(C)” I refer to the parameter C and not to the entire column? The only way to find out was to try it, so I set the reference mode in Excel to R1C1, and went to write the formula `=Lambda(C,Sum(C))` It gave an error of invalid name. So I tried now with `=Lambda(A1,Sum(A1))`, and Excel happily accepted it. Valid parameter names depend on the reference mode you are […]

Read More

What’s cooking in the TMS Labs: moving Delphi and FNC forward (and backward)!

Our ever growing FNC framework now already brings a whole portfolio of components to a myriad of devices and operating systems: Windows, Android, iOS, macOS, Linux, Raspbian, Web …. So, it is clear that our R&D team is always looking out for new technology and trying to be ahead of the curve. For this reason, our team was excited to be involved in a very forward looking project for a customer that brings Delphi and our FNC framework again on the bleeding edge of technology.  For this project, we researched how we could bring the FNC framework to a new M1 CPU + NVidia Titan V based device that features an AI driven holographic display. We tweaked the Delphi OSX64 compiler to produce M1 CPU code as well as NVidia SIMD GPU instructions to render FNC on the holographic display. When we received the test device here, the results are without a doubt stunning! You can see a glimpse here: While playing with this cutting-edge technology, our team mesmerized how predictions of technology in movies of the seventies and eighties already got real and we wondered therefore, if we could bring Delphi and FNC at the same time to this for us nostalgic area. A first attempt was to port FNC to the Sharp LR35902 processor and after this was successful, it permitted us to run FNC on the Nintendo Game Boy. It is surprising how crisp the FNC graphics are rendered on the small Game Boy LCD screen as you can witness here: And this achievement inspired us to go back in time even further. Surprisingly this was somewhat easier as making Delphi compile on a Intel 8080 CP/M machine. We tweaked the original Turbo Pascal 8086 compiler to use only 8080 instructions and got it working. It was however a lot more effort to downscale the FNC graphics abstraction layer to a 80×25 character CRT screen. But as you know by now, we are not scared to make our hands dirty in such challenging task. It is with pride that we can share the first FNC components now also running on a CP/M driven Intel 8080 machine from 1974 connected to a Sperry Univac Uniscope 200 terminal.  Are you still using devices for which you like to use Delphi and FNC? Let us know, it could become the next challenge of our team! We look forward to hear what nostalgic or futuristic device you would which to bring alive with your beloved development tools.

Read More

Multi component, multi data source binding in FNC

Intro We have been working on multi component, multi data source binding for quite some time now, providing a foundation for future improvements and new features and today we can proudly announce that TMS FNC Core 2.5 makes the first version available via the TTMSFNCDataBinder component. The TTMSFNCDataBinder component is a non-visual component that acts as a bridge between components and datasources and uses RTTI to detect bindable properties. Read-only Important to know is that this initial release of the TTMSNCDataBinder component supports read-only data binding. It listens to dataset changes, and automatically updates values in the component. In future updates, writing data to the dataset is planned as well as updating the active record based on the selection. Supported modes The TTMSFNCDataBinder component supports 4 modes: single value list column/list grid (via interface) To point out how a binding is done, below is a sample of binding a single value and a list component. (Based on TTMSFNCHTMLText and TTMSFNCListBox) single value procedure TFormDataBinding.UpdateLinks; var it: TTMSFNCDataBinderItem; begin TMSFNCDataBinder1.BeginUpdate; it := TMSFNCDataBinder1.Items.Add; it.&Object := TMSFNCHTMLText1; it.BindType := dbbtSingleValue; it.DataSource := DataSource1; it.FieldName := ‘Common_Name’; it.PropertyName := ‘Text’; TMSFNCDataBinder1.EndUpdate; TMSFNCDataBinder1.Active := True; end; The below code actually sets up the same binding as the code above with a convenience method ConnectSingle. procedure TFormDataBinding.UpdateLinks; begin TMSFNCDataBinder1.ConnectSingle(TMSFNCHTMLText1, DataSource1, ‘Text’, ‘Common_Name’); TMSFNCDataBinder1.Active := True; end; list procedure TFormDataBinding.UpdateLinks; var it: TTMSFNCDataBinderItem; begin TMSFNCDataBinder1.BeginUpdate; it := TMSFNCDataBinder1.Items.Add; it.&Object := ListBox1; it.BindType := dbbtList; it.DataSource := DataSource1; it.FieldName := ‘Common_Name’; it.PropertyName := ‘Items’; TMSFNCDataBinder1.EndUpdate; TMSFNCDataBinder1.Active := True; end; Again as with the single value binding, the below code uses a convenience method to add an item and set all the properties in one go. procedure TFormDataBinding.UpdateLinks; begin TMSFNCDataBinder1.ConnectList(ListBox1, DataSource1, ‘Items’, ‘Common_Name’); TMSFNCDataBinder1.Active := True; end; HTML template For the single value and list bindings, there is support to add a HTML template instead of binding to a specific field name. The HTML template supports multiple fields as long as they follow a specific kind of format. The HTML itself is based on the mini HTML reference (https://www.tmssoftware.com/site/minihtml.asp) The format for adding fields is: . So when applying this to the single value binding for example we can add an item using the TMSFNCDataBinder1.ConnectSingleHTMLTemplate(TMSFNCHTMLText1, DataSource1, ‘Text’, ‘Name: ‘); or procedure TFormDataBinding.UpdateLinks; var it: TTMSFNCDataBinderItem; begin TMSFNCDataBinder1.BeginUpdate; it := TMSFNCDataBinder1.Items.Add; it.&Object := TMSFNCHTMLText1; it.BindType := dbbtSingleValue; it.DataSource := DataSource1; it.PropertyName := ‘Text’; it.HTMLTemplate := ‘Name: ‘; TMSFNCDataBinder1.EndUpdate; TMSFNCDataBinder1.Active := True; end; Editor The databinder component installs an editor that is available at designtime and at runtime. The editor allows to visually edit the bindings that you have set up. You can also create, update and delete new or existing bindings. To start it at runtime, call TMSFNCDataBinder1.ShowEditor; At designtime, you can right-click the TTMSFNCDataBinder component and select “Edit…” to start the editor. Want to know more? Active registered users of FNC (TMS FNC Core) can download the update and get started right away! A demo (“Databinding”), is included in the distribution and there is separate documentation that gives more details on what the TTMSFNCDataBinder component can do and can mean for your application.

Read More