Watch, Follow, &
Connect with Us

Stephen Ball

Remote Object Persistence with Parse and Kinvey

New BaaS components introduced in RAD Studio XE6 now make it easily to use remote data storage services offered by Kinvey and Parse along with Push notifications, File Storage and user authentication.

This can greatly reduce the infrastructure that you need to code, develop and manage with your application which speeds up time to market for including these features and can drastically reduce cost.

In the typical RAD, Object Orientated style there are a set of new interfaces behind the scenes that are implemented by new provider components that hook into the core components that work across providers, allowing you to code this effort once and work with it over Windows, Mac, iOS and Android.

In this short introduction video you will see how to work with the remote data store as an object persistence layer, learn about the new TBackendObjectList that contains the objects along with TBackendEntityValue to give you unique ID’s for each object without having to code that yourself, which is very cool indeed!

The video uses demo code that is in code central, submission 29846. NOTE: You will need to have a Kinvey or Parse account to use the demo, but a suitable accounts is quick and free to setup.

Posted by Stephen Ball on April 23rd, 2014 under Delphi, FireMonkey | Comment now »

OpenSSL and InterBase = all is OK!

I am sure many of you have seen in the news this week the well publicised vulnerability in OpenSSL that has been named Heartbleed. and

InterBase is not affected by this issue. InterBase encryption uses OpenSSL versions that are NOT affected by this vulnerability.

For more information on InterBase please visit

Posted by Stephen Ball on April 10th, 2014 under InterBase | 1 Comment »

InterBase XE3 update 4 released

We are proud to announce InterBase XE3 Update 4 is now available for download for registered users:

New platform on XE3!

Along with the regular speed improvements, bug fixes etc, this release also brings the InterBase Linux engine up to XE3 from the previous InterBase XE edition.

Full details of what is contained in the update are available in the readme.

InterBase XE3 versions

If you are developing business applications, InterBase gives a real edge around data security and best practice in data protection across all supported platforms, including mobile.

InterBase XE3 Update 4 - editions includes

Server Edition Desktop Edition ToGo and IBLite (embeddable)
  • Windows (32bit & 64bit)
  • Linux
  • Windows
  • Windows (32bit & 64bit)
  • Mac OS X
  • iOS Simulator and Device
  • Android

There is an Update/Patch installer for existing installations of InterBase XE3 Server/Desktop/Developer Edition on Windows. Trial editions will be updated soon.

Embedding InterBase

The quick guide for ToGo has also been updated and is available here or if you prefer video’s check out InterBase Labs

Why InterBase?

If you want to know more about why customers are upgrading to the latest versions of InterBase and using InterBase in their current applications please read this Mobilising Enterprise Data - free white paper and also visit the InterBase pages

Posted by Stephen Ball on April 8th, 2014 under InterBase | Comment now »

RAD lectures at Jyväskylä University, Finland

Last week I was on the road again, this time visiting Finland for customer meetings but mainly to lecture and help with student lab time at Jyväskylä University. This trip was part of our commitment towards education and arranged by the local partner for Delphi and C++ Builder in Finland, Moonsoft - @MoonsoftOy

Jyväskylä is about 4 hours drive from Helsinki and so I’m told the heart of a technical area where a lot of Nokia is based, so it was kind of fun to show off the Nokia X with Delphi App running that I picked up in Barcelona.

The lecture was hosted both in the university and streamed live and was the follow on to a number of sessions run earlier in the year by Juha Piispa from Moonsoft. After the lecture in the morning I had the pleasure of lunch with the dean before looking at some really old hardware, including what I was told was Finland’s first super computer and a massive IBM hard drive from before I was even born! Kind of geeky cool; before heading to the labs, where we had not 1 but 4 labs booked out (around 50 PCs) with students working together through a number of tutorials on learning about Visual LiveBindings, FireDAC and also the base language capabilities before running the output to both Windows preview and Android emulators / devices.

Students learning from

Unfortunately, I was so focused on what I was doing I forgot to take a load of pictures!

Posted by Stephen Ball on April 8th, 2014 under C++ Builder, Delphi, Events | Comment now »

Are you sleep walking into XP end of life?

Today I came across an excellent blog post by Simon Rice from the ICO looking at the business reasons you and your customers need to look to get off XP. Microsoft XP goes end of life on 8th April.

If you are still developing on XP and on an old edition of Delphi of C++ Builder then now is a great time to upgrade with special offer running to the end of March for those on any old edition.

For more about the latest offers on RAD Studio, Delphi and C++ Builder, including a current promotion of 50% off the mobile pack for XE5 then visit now!

Posted by Stephen Ball on March 11th, 2014 under Uncategorized | 4 Comments »

NokiaX + DelphiApp = Shipped;

Following on from my last blog post about the development of the 3D application created using Delphi Programming for iOS, Android, Windows and Mac from the same code base, I am now happy to confirm that the application is submitted, accepted and live on the Nokia App Store.

Nokia’s new direction seems to be to focus on earning money from the backend services serviced by Nokia and Microsoft. In a similar way Amazon took a base version of Android and added their own store etc, Nokia have done something very similar with then new phones. They have also gone to the length of wrapping a number of 3rd party API’s to their own services to make it easier for developers to migrate over to the Nokia store. This should solve the issue of developers not targeting the Nokia phones (due to WindowsRT) and will allow a great phone manufacturer to regain market share and value.

Honestly, I was surprised how easy it was to get the app published. To publish onto the Nokia app store (ready for the Nokia X being sold) you need to setup an account via You can also easily check your APK compatibility by uploading your APK file onto the website and get immediate feedback which was great (but not this is not acceptance of the app, just that it seems to be compatible). The hardest part of submitting my application was actually creating the icon and having to get screen shots in the right screen resolution, but this was easily solved with a device to hand by just running the APK on the device. Here is me doing this last week at the mobile world congress in Barcelona on the Nokia bus (note the Android Green colour scheme lol).

Following on from the initial submission, there is then a review process at Nokia that hopefully results in acceptance emails being sent over to you and your application shows as submitted. The Nokia development portal online is easy to navigate and under published content you can see the details of your submission and the current state of review.

Nokia Store Accepted Application

Once approved, you can then use a Nokia X to download the application from their store. I think that as the store is in Beta right now the links are not publicly visible, but as soon as this goes live I will post that link up.

Anyway - As you can see I downloaded the approved application from the app store and by using the power and volume buttons was able to get a screen shot.

Nokia App Store download screen shot

I actually really like the Nokia X from first glance and I think its going to be a great (budget) phone, and the choice to use Android under the Windows Tile look and feel is a great move to gain share and developers to use the services that make the money behind the scene and help people get used to the Microsoft driven style.

The process of posting the application to the store was relatively simple and painless, but I was not using any advertising or anything else so I can’t comment on the experience of doing this, but over all, so far so good!

Will be really interesting to see what this means for the future of Windows Mobile, but right now: Nokia + DelphiApplication := Shipped!

Posted by Stephen Ball on March 4th, 2014 under Delphi, Events, FireMonkey | 4 Comments »

Java student builds 3D Othello game on FireMonkey in 3 days

In the week before Mobile World Congress, Daniel Messias joining us in the UK office on work placement. Daniel is a 17 year old student who has been programming some Java for a couple of years and is looking to study computing at University. It was great while he was with us that he transitioned skills over to programming with object pascal / Delphi programming exceptionally quickly; learn from some articles on he was able to really expand his capabilities and achieve things he never attempted before thanks to the FM Application Framework. In this video, you will see him explain in his own words how he got on and how Delphi really makes learning programming easy and cool as he built Othello in 3D for iOS, Android, Windows and Mac all from the same code base!

Finally, at the mobile world congress I visited the Nokia stand and had got this running on the new Nokia X immediately! Pretty Cool! :-)

Posted by Stephen Ball on March 2nd, 2014 under Delphi, FireMonkey | 6 Comments »

Creating an InterBase database on the fly with FireDAC

Recently I have been creating a number of applications using InterBase on iOS and Android using FireDAC components to talk to the database. One route to achieving this is by create the database file and table structure either via iSQL or using IBConsole GUI first before using it in your project. Once you have the database file (which is simple enough to do) you then have to deploy the file along with the application using the deployment wizard. This all adds a little size to the application package initially along with some extra configuration.

In the attempt to be lazy (and to save a few bytes in my application package), I decided that as most the time, I only really want to connect to a database that I then add the data to that maybe I should do this via code. This would save me having to deploy a database file and also setup the paths for deployment reducing my work upfront.

Luckily, this is easy to achieve with FireDAC.

Creating a blank database from the IDE

You can actually create a blank database file directly from the IDE by adding a TFDConnection to your application code. Double clicking on the connection opens the FireDAC Connection Editor. If you choose IB as the driver you will then see a list of values. You can set the username and password (e.g. SYSDBA / masterkey) to any registered local user. If you set the Database property to a local file path and then choose CreateDatabase and set it to True and "Test" the connection it will create a database file. Obviously, if the file exists it will error as the file is already there, but this is what you need to be able to do from code to get a blank database.

Creating a blank database on the fly

Understanding what properties need to be set, you can now call them directly from code at run time. To test this, I created a single TButton application with a TMemo to show output in a new FireMonkey Mobile Application.

Setting database file path

First task is setting the local file path at run time. There are two ways to do this with FireDAC. You can either set the path yourself e.g.

DBPath := TPath.GetDocumentsPath+PathDelim+'interbase'+PathDelim+'MyDB.ib';
FDConnection1.Params.Values['Database'] := DBPath;

or you can use ask FireDAC to sort out the documents path using $(doc) variable in the path string. This is useful if you want to hardcode this into the path property.

Setting CreateDatabase paramater

To avoid creating an error, we can set the CreateDatabase to True if the database file does not exist by using the function FileExists(FilePath : string) to check for the local file. This can be done as the database is local and we are running embedded.

    FDConnection1.Params.Values['CreateDatabase'] := BoolToStr(not FileExists(DBPath),True);
Now when the database is connected it will open or create the database.

Creating a table, inserting values, reading them back.

Now there is access to a local database file, the next step is to create the table if it does not exist already. This can be done using calls to query the database meta data easily. While InterBase does not yet support language syntax for creating a table if it does not exist, you can collect the tables easily.

To try this on mobile a simple one button application with a memo for the output is enough

Using a TFDConnection, TFDGUIxWaitCursor and TFDPhysIBDriverLink I have also used TFDQuery and TFDTransaction to run the database transaction.

The following code block is my entire demo button click. You can see how it uses the FDConnection to GetTableNames into a StringList and then check for the value in the string list. Following that if the table doesn’t exist, it creates the table and inserts a number of records using the block insert support that InterBase has that FireDAC supports. Once the data is inserted, then it is fetched all using the same query.

procedure TForm4.Button1Click(Sender: TObject);
  I: Integer;
  Tables : TStringList;
  DBPath: string;
// Here to make it easier to debug to my standard local DB store on WIndows.
  DBPath := TPath.GetDocumentsPath+PathDelim+'interbase'+PathDelim+'MyDB.ib';
  DBPath := 'c:\data\MyDB.IB';
    FDConnection1.Params.Values['Database'] := DBPath;
    FDConnection1.Params.Values['CreateDatabase'] := BoolToStr(not FileExists(DBPath),True);
    Tables := TStringList.Create;
      FDConnection1.GetTableNames('','','',Tables); // Get Tables
      if Tables.IndexOf('FOO') = -1 then begin
        FDQuery1.SQL.Text := 'INSERT INTO FOO (FOO_ID) VALUES (:FOO)';
        FDQuery1.Params.ArraySize := 10;
        for I := 0 to 9 do 
          FDQuery1.ParamByName('FOO').AsIntegers[I] := I;
    FDQuery1.SQL.Text := 'SELECT * FROM FOO'; // Selecting values
      while not FDQuery1.Eof  do begin
    on e:exception do


Running the application provides the following output

To Conclude

Using InterBase on mobile you can get a lot of benefits, especially when you are storing local data. Using the properties exposed in FireDAC you can easily create and manage a local database on the device without having to deploy one from the start. This helps with making deployment simpler. If you do need to deploy a database you can still do this as InterBase supports the same on disk structure for Windows, Mac, Linux, Solaris, Android and iOS.

Posted by Stephen Ball on February 14th, 2014 under Delphi, InterBase | Comment now »

Writing a book application with FireDAC, InterBase IBLite, Visual LiveBindings and more

The question?

Being part of a team that travels around talking to developers you can imagine we get quite a range of questions. One of the more obscure in December as "Can you fit the bible into InterBase IBLite?"

The real question was…

Although that is a interesting question, the question really being asked here (due to the context of the session) was "Can we develop an application with InterBase’s IBLite database for Android and iOS that contains the text for the bible and get that to Android and iOS from the same code base?"

Although the bible is a big book, its just text and is under 8mb (well within the 100mb IBLite allows for free). So no matter what text you are looking to store, you have loads of space with IBLite.

So to answer the questions in a little more detail, one way to do this is to cover the following challenges.

  • Creating a data source that we can show on mobile on multiple platforms.
  • Using master detail relationships to make that data accessible and understandable, e.g. have a list of books, chapters and verses.
  • Keeping those master detail relationships in sync
  • Creating easy navigation in the UI
  • Compiling it to Android and iOS

The process in summary…

In short, I managed to find a copy right free edition of the bible translated into English, parse it and import it into InterBase in to a set of tables for Books, Chapters, Verses. Each record has an ID field that linked the Chapter to the Book and the Verses to the Chapters. Relational databases are great for this kind of storage.

Having tested my data was accurate, it was time to build a UI that listed the books and had master detail relationships built into the queries. Using datasets to manage the master-detail relationships, Visual Live Bindings was able to manage the display of the data into a couple of TListViews that I was able to navigate between (so clicking on the book goes to the chapter, and chapter onto the verses) I was also able to add navigation between record using the in built actions for supporting Visual Live Bindings. Finally, I was able to look up the verses for the chapter when the chapter changed to show the text.

How I got there…

In short: using a lot of the skills described in the Delphi Programming - Free Summer School 2013 lessons I built a multi-tab form that moved from page to page with List Views linked via LiveBindings to datasets on my data module.

The key thing with the data was getting the master detail relationship setup. Luckily this is really simple with FireDAC and with Visual Live Bindings.

Using Params.

Params are nothing new, infact they have been a stable of master detail relationships for all time. In short, In your SQL statement, rather than entering the value, you enter a param name prefixed with a full colon ":" - Params are great as they also can be used in any form of SQL statement, and help protect your code from threats like SQL overloading as well. - Not that we expect that to be an issue in this application, but great to know if your writing applications that allow the user to enter values to search on. - anyway - Once the param has been entered, you just need to tell it where to get the value. To do this with master detail, you enter the param name as the field name in the master detail set and connect to the MasterSource to a TDataSource that is linked to the master query. So in the example above, qryBooks has a field called BOOK_ID that the value is automatically collected through the datasource named dsBooks that is read by the query qryChapters.

So thats the data side sorted because when you navigate, the data sets will now update with the correct data for their new master record without having to write any more code!!

Visualising the data

With the data looking after its self, its now just a case of showing it on the screen. This is a simple process and requires zero coding. Using the feature on TFDQuery of storing design time connection only its possible to set the query to Active and view the live data in the IDE at design time. Then using the Visual Live Bindings designer (either right click on the form and choose Bind Visually or go to View > LiveBindings Designer) you can click on the dataset fields and link them to the properties of the list view. In the image above, you can see the ItemHeader.Text being populated with the BOOK_TITLE (green arrow to show that on the screen for illustration) and the Item.Text (which is shown for each record) populating a list of chapter numbers to choose from. The key here thought to ensuring that the list is kept up to date with the current master detail is to draw the line between the Synch property of the list view and the * on the data source. This ensures that all is kept is sync as the data changes.

What is also great with RAD Studio, is that you can see as you build the application, how it looks on other platforms along the way - with live data! All you have to do is choose the platform and device and off you go.

Choosing Android view on Nexus device

Choosing Android view on Nexus device

Swapping between iOS6 and iOS7

Swapping between iOS6 and iOS7

The final app!

I intend to create more details around the application at some point just because of the technologies it uses. Would be great if someone wants to take the same structure and add in other books that follow the same structure of Books, Chapters and Verses. You can download the full multi-platforms source code from code central

Notes about IBLite & ToGo

IBLite is a run time royalty free mobile database version of InterBase - Embarcadero’s multi-platform database for Windows, Mac, Linux, Solaris, iOS and Android that is currently available to developers through RAD Studio developing for Mobile. While IBLite supports all the key features that SQLite supports, plus it also includes additional support for the full SQL92 standard, including Stored Procedures. - InterBase is ideal for the entire product lifecycle as it supports the same in disk structure on all platforms, and with the InterBase ToGo inbuilt Encryption (256bit AES strength), it is the ideal secure data storage to support complete Data Governance initiatives in mobile

Posted by Stephen Ball on January 25th, 2014 under Delphi, InterBase | 2 Comments »

Why Database Encryption Matters: Is the NSA reading this?

Before I start. I just want to say, this is your last chance to get your free InterBase licenses. This offer ends 31st December 2013 - See for details:

Now… the reason this is important!

Are your business applications using old versions of InterBase or FireBird? Is so you may be at risk!

If you are working on business applications that store any data that can be used to identify people you need to read this post! In short… If you don’t have your data encrypted at rest then you could be leaving the users of the application open to large fines if the data is compromised at any point.

Some older versions of InterBase including what was taken to create Firebird do not support encryption. Data is stored in clear text in the database file, anyone can open the file in a text editor like notepad to view customer data. To prevent this, the file needs to be encrypted.

Theft is not a defence!

Regulatory action is typically pursued when data is lost and its not encrypted
It also doesn’t matter if the data is on mobiles, desktop machines, servers or external disk. Wherever it is at rest it needs to be encrypted. There are notable cases world wide of how customers have had large fines when they have missed this key requirement.

Two such case studies; The NHS in the UK received a £200,000 fine for unencrypted data that was left on hard drives, even though they had written assurances the drives were going to be physically destroyed. In the USA Blue Cross Blue Shield received a $1.5m fine for unencrypted data and had to agree to a 450 day corrective action plan.

The costs don’t stop there!

Above the regulatory fines that come from data protection acts around the world, typically customers will notice around a 4% churn in their customer base when they suffer a data breach, not to mention the impact on brand. They also end up with costs associated with help lines, credit check monitoring over a period of time, discounts they have to offer to customers to retain their customer etc.

So how can you reduce the risk? - Encryption!

Now the great news is that by moving up to InterBase XE3 you can get full 256bit AES strength encryption straight out the box that is easily enabled and ensure that your database is encrypted at the file level wherever it goes. And with InterBase ToGo you have a foundation for managing data safely even on iOS and Android. It can be as simple as a short script on the database and 1 line of code to pass the additional parameter for the database connection.

On the page there is a great bit of text that mentions for those of you upgrading to Enterprise (or higher) edition of RAD Studio, Delphi of C++ Builder right now, you will received InterBase Server edition with 5 user licenses – full production database server. If you are developing Internally, what are you waiting for.

This offer is only running to the end of the month, so get in now!

You can watch more about this topic here on YouTube. 1 hour well spent!

Posted by Stephen Ball on December 18th, 2013 under C++ Builder, Delphi, InterBase | 2 Comments »

Server Response from: BLOGS2