Stay in touch

Add your e-mail address here to receive the monthly TMS Software alerts.


Product releases
Product articles
Technical articles
Website changes
Software development


<< >>
September 2015

Wednesday, August 12, 2015

Querying objects in your REST server with XData

One of my favourite features of TMS XData is its powerful querying capabilities. With no extra line of code in your server, clients can choose how to retrieve the server objects, filter them, set an order, etc..
For example, you can perform a GET request to get Customer objects but filter only those which name is John:
http://server:2001/tms/xdata/Customer?$filter=Name eq 'John'

You can also filter by properties of associated objects, at any level. The next example gets all customers which associated country name is "USA":
http://server:2001/tms/xdata/Customer?$filter=Country/Name eq 'USA'

You can use order, top and skip to get paged results (get next 20 orders from 41st one):

And, of course, you can combine all those with parenthesis and relational operators to build really complex queries:
http://server:2001/tms/xdata/Customer?$filter=(Name eq 'John' or Name eq 'Jack') and Country/Name eq 'USA'

But the purpose of this post is to tell about the new built-in functions introduced in version 1.5. They increase flexibility of the queries even more. Functions that extract part of of a date/time property were added, so now you can for example filter invoices for year 2014:
http://server:2001/tms/xdata/Invoice?$filter=year(IssueDate) eq 2014

There are of course similar functions to extract Month, Day, Hour, Minute and Second.
String-related functions were also added. Upper and Lower were introduced:
http://server:2001/tms/xdata/Customer?$filter=lower(Name) eq 'paul'

You can also use length function to retrieve the length of a string in characters:
http://server:2001/tms/xdata/Customer?$filter=length(Name) eq 15

And Position and Substring functions can also be used to retrieve the position of a substring in a string (Position) or to retrieve part of a string (Substring). They would be the equivalent of Delphi functions Pos and Copy, respectively:
http://server:2001/tms/xdata/Customer?$filter=substring(CompanyName, 2, 4) eq 'oogl'
http://server:2001/tms/xdata/Customer?$filter=position('jr', Name) gt 0

And it's worth to remember that having TMS Aurelius working behind the scenes, all those queries will work the same way regardless of the database your are using at the server side, be it MS SQL Server, MySQL, Oracle, or any supported database you want. Best part is that it's not going to stop here, stay tuned for future releases that will bring even more querying features!


Wagner Landgraf

This blog post has not received any comments yet. Add a comment.

Sunday, June 07, 2015

Weekend fun with Raspberry Pi 2 and TMS Cloud Pack

Thinking to myself, why go through the hassle of sacrificing a desktop computer or fiddle around with VMs to test something on a Linux machine when I have here several 85mmx56mm Raspberry Pi boards laying around capable of amazing things. For my experiments, I wanted to have an ownCloud available and first thing to do was getting an ownCloud up and running on the Raspberry Pi 2, which turned out to be a piece of cake. To do this, follow these instructions:

Step 1: getting Apache up and running

If Apache is already setup on your device, skip this step, otherwise, from the command line, execute:

$ sudo apt-get install apache2

The Raspberry Pi 2 LED flashes for a short while and when completed, verify it is working by opening a browser on a machine in the network and navigate to the IP address of the Raspberry Pi 2 like When install was successful, you'll be greeted with an "It works!" page.

Step 2: install PHP and tools

In case you had Apache already configured with PHP 5, you can also skip this step.
To install, execute following commands:

$ sudo apt-get install php5
$ sudo apt-get install php5-gd
$ sudo apt-get install sqlite
$ sudo apt-get install php5-sqlite
$ sudo apt-get install php5-curl

After some more LED flickering, these steps will also be executed and the Apache environment with PHP 5 is ready.

Step 3: install ownCloud

To install ownCloud, start by downloading the latest distribution. At this time, this is v8.0.3 and is downloaded with:

$ sudo wget

Next step is to unpack the ownCloud distribution and install it under Apache.

$ sudo mv owncloud-8.0.3.tar.bz2 /var/www
$ cd /var/www
$ sudo bunzip2 owncloud-8.0.3.tar.bz2
$ sudo tar xf owncloud-8.0.3.tar

Step 4: setting up ownCloud

To finalize, the data folder for ownCloud must be created and an admin account added.
The data folder is created with following steps:

$ sudo mkdir /var/www/owncloud/data
$ sudo chown www-data:www-data /var/www/owncloud/data
$ sudo chmod 750 /var/www/owncloud/data

At this time it is more convenient to continue the setup from a browser. Either start the graphical shell on the Raspberry Pi 2 or connect from a browser on an external machine and navigate to http://localhost/owncloud or from external machine
The first screen that appears is to create an admin account, so add the credentials for an admin account on this page. With this account added, owncloud is up and running and ready for use.

Step 5: Connecting from Delphi to ownCloud

Now Delphi kicks in and with a little help from the TMS Cloud Pack, let's start using ownCloud from a Delphi app.

Start your IDE, make sure TMS Cloud Pack is installed and drop the component TAdvCalDAV on the form. Configure the TAdvCalDAV component to access your ownCloud. Verify the ownCloud primary CalDAV address by opening the calendar app within ownCloud via: and in the bottom left corner, click on settings where this primary address is shown. By default, this should be:

So, now we can configure the TAdvCalDAV component to connect to ownCloud on Raspberry Pi 2:

  AdvCalDav1.URL := '';
  AdvCalDav1.Username := 'tms';
  AdvCalDav1.Password := 'tmsrocks!';
  AdvCalDav1.Active := true;

After a successful connect, the calendars and their events available on ownCloud can be retrieved, here by filling the info in a listview:

  i: integer;
  cdi: TCalDavItem;
  li: TListItem;
  // get events
  for i := 0 to AdvCalDav1.Items.Count - 1 do
    cdi := AdvCalDav1.Items[i];

    if cdi.vCalendar.vEvents.Count > 0 then
      li := ListView1.Items.Add;
      li.Caption := cdi.vCalendar.vEvents[0].Summary;
      li.SubItems.Add(FormatDateTime('dd/mm/yyyy hh:nn',cdi.vCalendar.vEvents[0].DTStart));
      li.SubItems.Add(FormatDateTime('dd/mm/yyyy hh:nn',cdi.vCalendar.vEvents[0].DTEnd));
      li.Data := cdi;     

Adding a new calendar item is equally easy:

  cdi: TCalDavItem;
  li: TListItem;
  // set the calendar for the event
  cdi := AdvCalDav1.Items.Insert('Personal');  // add item to the "Personal" calendar
  cdi.vCalendar.vEvents[0].Summary := 'Schloss Dyck Classic Days';
  cdi.vCalendar.vEvents[0].Location := 'Jüchen, Deutschland';
  cdi.vCalendar.vEvents[0].Description.Text := 'Automobile Kulturgeschichte auf der Museums-Insel';
  cdi.vCalendar.vEvents[0].DTStart := EncodeDate(2015,7,31);
  cdi.vCalendar.vEvents[0].DTEnd := EncodeDate(2015,8;2);

or modifying an existing item

  cdi: TCalDavItem;
  li: TListItem;
  cdi := ListView1.Selected.Data;
  cdi.vCalendar.vEvents[0].Summary := 'Schloss Dyck Classic Days 2015';

Similar to accessing the calendars of ownCloud, you can also access the contacts with the TAdvCardDAV component in a very similar way. And this rounded up my little weekend fun experiment. With so much ubiquitous computing power around and wonderful technology, aren't we living in very exciting times?


Bruno Fierens

This blog post has received 2 comments. Add a comment.

Tuesday, June 02, 2015

TMS Pack for FireMonkey v3.0: 3 new components: delivered

About 2 weeks ago we announced the upcoming new FireMonkey scheduling/planner component TTMSFMXPlanner here and revealed the first details about it. For quite some time, this was the number one requested component. Today we are excited to confirm its availability as part of TMS Pack for FireMonkey v3.0. So, we are happy to deliver on your requests. But there is more. Check here what TMS Pack for FireMonkey v3.0 brings:

TTMSFMXPlanner v1.0

Targetting Windows, Mac OS-X, iOS and Android devices, fine-tuned for desktop and mobile use and packed with features is our new scheduling/planner control TTMSFMXPlanner. It's suitable for a wide range of use-cases, from single resource day planning to multi-resource scenarios with fully customized timeline. In combination with TMS Cloud Pack for FireMonkey, it offers seamless connectivity to a cloud calendar like Google calendar or Microsoft Live calendar. Read more about TTMSFMXPlanner in this blog, the developers guide or check out the fully functional trial version.

TTMSFMXRatingGrid v1.0

Also new in TMS Pack for FireMonkey is this control for capturing ratings for different items, making questionaires or for presenting feature comparison lists. It supports customizable tickmarks, radiogroup or checkgroup behavior for items.

TTMSFMXPassLock v1.0

To protect the use of your applications or access to certain parts of your application, the TTMSFMXPassLock is a component for input of a configurable length pass code or pass pattern. One property controls in what mode the pass code can be entered and the component features a pass code learn mode as well. An event is triggered when the pass code is correct or wrong.

Other improvements

Other than these 3 new controls, there are several improvements to existing components as well. The full version history is here.

More good news

And to round up the good news, all customers with an active registration for TMS Pack for FireMonkey receive this v3.0 free. For customers with an expired registration, a renewal discount of about 50% is available for 30 days.

Call to action

Add your feature request or vote on existing feature requests. It is one of the tools that help us align our development efforts with your needs.


Bruno Fierens

This blog post has not received any comments yet. Add a comment.

Saturday, May 23, 2015

Introducing the upcoming TMS Planner for FireMonkey

We're thrilled to introduce to you the TMS Planner for FireMonkey, in short TTMSFMXPlanner that has been in development for many months and that is near to being released now.

While TMS Planner for FireMonkey design benefits from the significant experience the TMS team built-up with the award-winning VCL, IntraWeb and ASP.NET Planner components, the new component has been architected from the ground up for cross-platform, multi-device usage. This includes tuning for performance & footprint to run smoothly on Android or iOS smartphones and making the component flexible enough for complex scheduling applications in desktop or tablet applications.

In a nutshell, the TMS Planner for FireMonkey is a user-interface control representing a timeline and events for single or multiple resources.

The timeline in the TTMSFMXPlanner is configurable. Default, it represents the standard 24hr timeline but this can be easily changed to month mode, a day period mode, a half-day period mode, multi-month mode or a custom timeline mode. With the custom timeline mode, the unit of time along the timeline can be fully programmatically set. In one of the included demos will be a timeline in seconds mode that represents a schedule of TV-adds.
Within the displayed timeline, the TTMSFMXPlanner has the notion of active and inactive time, typically used for open office hours that can be shown in a different collor as well as various ways to to display the actual time on screen. In addition, for period, month, multi-month modes, specific days of the week can also be set as inactive time.

The TTMSFMXPlanner can display events for a single resource or can deal with multiple resources. Multiple-resources can be displayed in different columns (when the timeline is vertical) or different rows (when the timeline is horizontal). But there is more. Views with multiple resources can be combined with multiple days. In this way, multiple resources per day and multiple days per resource can be shown. And in addition to this, there is also the flexible capability to create groups of a different nr. of resources or days, like grouping a number of days in a week or grouping a number of resources to a company etc...

Event Editing
Also for editing events in a TTMSFMXPlanner view, we went to great lengths to offer built-in easy to use and flexible to customize editing capabilities. First of all, changing the start time, end time or dragging the event to a different day or resource is optimized for both classic desktop mouse & keyboard interaction as touch based mobile device operation. Editing of event notes can be done via inplace editing or via a popup dialog. Both inplace editing and use of popup dialogs can be fully customized.

Cloud connectivity
If you want to hookup your TTMSFMXPlanner to a cloud calendar service, we have the adapters ready for you that let you interface the TTMSFMXPlanner to a Google calendar or Microsoft Live calendar. This is achieved by an adapter that interfaces the TTMSFMXPlanner via TTMSFMXPlannerGoogleAdapter or TTMSFMXPlannerLiveAdapter to TMS Cloud Pack components for access to these cloud calendar services.

We realize that scheduling applications all have different rules and particularities. Therefore, the TTMSFMXPlanner has overall extensive customization capabilities. From putting custom text in timeslots, defining event conflict handling, restricting events to resources, custom drawing over events, timeline, resource header, editing validation and much much more. And of course, the TMSFMXPlanner also visually automatically integrates with the selected FireMonkey application style.

All this and more is coming to you in the next major release of TMS Pack for FireMonkey. This new version will be free for all active registered users.


Bruno Fierens

This blog post has received 7 comments. Add a comment.

Previous  |  Next  |  Index

Copyright © 1995 - 2015 TMS Software v4.0