Calling Objective C API’s with Delphi and Appmethod

Jacob Thurman from TwoDesk Software did a great developer skill sprint session on “Integrating more iOS with an Objective-C Call in your Delphi App” last week. If you have not been on them, the developer skill sprints series are excellent 20 minute deep dives into specific technologies in RAD Studio and Appmethod using both Delphi programming and C++ programming language.

What I like about this video is that it assumes no knowledge of Objective C and explains excellently the difference between Delphi, C++ and Objective C.

AppTethering Leaderboard – Passing Objects Remotely and using Resources

AppTethering opens up a range of powerful features for coupled applications. Beyond the basic features for calling remote actions (which is rather cool and quick to setup) it is also possible to share resources between applications.

To give you an example I have built a Scoreboard that records the best scores in a simple game. As the scores come in and the leaderboard is updated, it rebuilds the resource that is then automatically sent out to the connected clients.

Using the TTetheringAppProfile.Resources you can add at Design time or run time a TLocalResource. The TLocalResource has a concept of being either Shared or Mirrored (set via the Kind property). In the example of the leaderboard both the Game (clients) and Leaderboard (server) have the same resource added to their TetheringAppProfile with the difference being that the clients have the kind as Mirror rather than Shared.  As the central Shared resource is updated this is broadcast to the clients and the TLocalResource then fires its OnResourceReceived event.

So with that in mind, see it in action and download the code sample.

How to convert an object to JSON and back with a single line of code

Ever wanted to take an Object into a format that is easily persisted and back? Well now you can. New in XE6 is the REST.JSON unit. This allows you access to TJSON a class with some very helpful class methods. Using TJSON you can convert an object to a JSON string and back with a little help from generics along the way.

The following code uses a class called TFoo that has a Foo and a Fee property (string and Integer) Using TJson you can then see how to covert the object to a string and back ready for storage, transport etc.

uses REST.JSON; // Also new System.JSON
procedure TForm1.Button1Click(Sender: TObject);
var
  Foo: TFoo;
begin
  Foo := TFoo.Create;
  try
    Foo.Foo := 'Hello World';
    Foo.Fee := 42;
    Memo1.Lines.Text := TJson.ObjectToJsonString(Foo);
  finally
    Foo.Free;
  end;
  Foo := TJson.JsonToObject<TFoo>(Memo1.Lines.Text);
  try
    Foo.Fee := 100;
    Memo1.Lines.Add(TJson.ObjectToJsonString(Foo));
  finally
    Foo.Free;
  end;
end;

If you want to watch this being demo’ed this very show video shows it in action http://youtu.be/TSqWoFvjj5g

@Appmethod and @InterBase in Sweden

Yesterday I had the pleasure of speaking at the 2014 Dev:Mobile event in Gothenburg on Navigating the enterprise road to mobile with @Appmethod and also around Secure Multi-platform database development with @InterBase.

Stephen Ball in Gothenburg with Appmethod

The sessions had lots of Interesting questions, some of which from the database side will be covered in the next weeks webinar “Rising to the data security challenge” (Wednesday 28th May)

There were lots of amazed faces seeing how with Appmethod you can develop fast applications faster with Visual Live Bindings, access to BaaS etc and still have the applications as compiled native code! For those wanting to learn more quickly then I recommend the new series of 20 minute drop in Developer Skill Sprints running every Tuesday and Thursday (starting on the 29th May)

Looking to rise to the data security challenge?

Join me on Wednesday 28th May as we rise to the database security challenge on Windows, Android, iOS, Mac OSX, Linux and Solaris.

Data security is a hot topic right now, and one that is causing a lot of headaches. When it comes to securing your data and applications, small changes can make a massive difference. During the webinar there will be a number of tips relevant to whatever platform or database you develop with. We will also look at how to address a number of these challenges easily by exploring secure database storage with InterBase.

To find out more on this topic, or even if you can’t make it and want to catch the replay later, register now and “Rise to the Data Security Challenge”.

Wednesday, May 28, 2014

  • 6AM San Francisco / 9AM New York / 2PM London / 3PM Milan
  • 11AM San Francisco / 2PM New York / 7PM London / 8PM Milan
  • 5PM San Francisco / 29-May 9AM Tokyo / 29-May 10AM Sydney

Mobilizing Enterprise data – Free White Paper.

If you want to get a head start before the webinar, then it may also be worth downloading this free white paper

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.

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. https://www.openssl.org/news/secadv_20140407.txt and http://heartbleed.com/

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 http://www.embarcadero.com/products/InterBase

InterBase XE3 update 4 released

We are proud to announce InterBase XE3 Update 4 is now available for download for registered users: http://cc.embarcadero.com/reg/interbase

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. http://docs.embarcadero.com/products/interbase/IBXE3Update4/Readme.html

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 http://docs.embarcadero.com/products/interbase/IBXE3Update4/ToGoQuickStart/Introduction.htm 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